From b743c9953c9523a3f36f1f0602684529e72e8c07 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 1 Nov 2018 14:45:28 -0400 Subject: [PATCH] Improve Debian packages --- packaging/debian-multiarch/control | 19 +----- .../debian-multiarch/control-no-openchange | 59 ------------------- packaging/debian-multiarch/rules | 27 +-------- .../debian-multiarch/sogo-openchange.install | 2 - packaging/debian-multiarch/sogo.overrides | 3 - packaging/debian-multiarch/sogo.postinst | 3 + packaging/debian/compat | 2 +- packaging/debian/control | 4 +- packaging/debian/rules | 29 ++------- packaging/debian/sogo.install | 2 +- packaging/debian/sogo.postinst | 12 ---- packaging/debian/sogo.prerm | 12 ---- 12 files changed, 18 insertions(+), 156 deletions(-) delete mode 100644 packaging/debian-multiarch/control-no-openchange delete mode 100644 packaging/debian-multiarch/sogo-openchange.install diff --git a/packaging/debian-multiarch/control b/packaging/debian-multiarch/control index 919a6ee69..02315694b 100644 --- a/packaging/debian-multiarch/control +++ b/packaging/debian-multiarch/control @@ -1,7 +1,7 @@ Source: sogo Priority: optional Maintainer: Inverse Support -Build-Depends: debhelper (>= 8.0.0), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libmapi-dev, libmapistore-dev, libmapiproxy-dev, libwbxml2-dev (>= 0.11.2), liblasso3-dev (>= 2.3.5) +Build-Depends: debhelper (>= 8.0.0), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libwbxml2-dev (>= 0.11.2), liblasso3-dev (>= 2.3.5) Section: web Standards-Version: 3.9.2 @@ -11,8 +11,7 @@ Multi-Arch: same Section: web Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, sope4.9-libxmlsaxdriver, sope4.9-db-connector, gnustep-make, libcurl3 | libcurl4, zip, liblasso3 (>= 2.3.5) -Recommends: memcached -Suggests: nginx +Recommends: memcached, apache2 | nginx | httpd Description: a modern and scalable groupware SOGo is a groupware server built around OpenGroupware.org (OGo) and the SOPE application server with focus on scalability. @@ -36,20 +35,6 @@ Description: a modern and scalable groupware - development files . This package contains the development files for developing SOGo modules. -Package: sogo-openchange -Pre-Depends: ${misc:Pre-Depends} -Multi-Arch: same -Section: net -Priority: extra -Architecture: any -Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} -Description: a modern and scalable groupware - OpenChange backend - SOGo is a groupware server built around OpenGroupware.org (OGo) and - the SOPE application server with focus on scalability. - . - This package contains the backend plugin for using SOGo as a backend - to OpenChange. - Package: sogo-activesync Section: web Priority: extra diff --git a/packaging/debian-multiarch/control-no-openchange b/packaging/debian-multiarch/control-no-openchange deleted file mode 100644 index eb5a32520..000000000 --- a/packaging/debian-multiarch/control-no-openchange +++ /dev/null @@ -1,59 +0,0 @@ -Source: sogo -Priority: optional -Maintainer: Inverse Support -Build-Depends: debhelper (>= 8.0.0), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libwbxml2-dev (>= 0.11.2), liblasso3-dev (>= 2.3.5) -Section: web -Standards-Version: 3.9.2 - -Package: sogo -Pre-Depends: ${misc:Pre-Depends} -Multi-Arch: same -Section: web -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, sope4.9-libxmlsaxdriver, sope4.9-db-connector, gnustep-make, libcurl3 | libcurl4, zip, liblasso3 (>= 2.3.5) -Recommends: memcached -Suggests: nginx -Description: a modern and scalable groupware - SOGo is a groupware server built around OpenGroupware.org (OGo) and - the SOPE application server with focus on scalability. - The Inverse edition of this project has many feature enhancements: - * CalDAV and GroupDAV compliance - * full handling of vCard as well as vCalendar/iCalendar formats - * support for folder sharing and ACLs - . - The Web interface has been rewritten in an AJAX fashion to provide a faster - UI for the users, consistency in look and feel with the Mozilla applications, - and to reduce the load of the transactions on the server. - -Package: sogo-dev -Section: devel -Architecture: any -Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} -Replaces: sogo (<< ${binary:Version}) -Description: a modern and scalable groupware - development files - SOGo is a groupware server built around OpenGroupware.org (OGo) and - the SOPE application server with focus on scalability. - . - This package contains the development files for developing SOGo modules. - -Package: sogo-activesync -Section: web -Priority: extra -Architecture: any -Depends: sogo (= ${binary:Version}), libwbxml2-0 (>= 0.11.2), ${shlibs:Depends}, ${misc:Depends} -Description: a modern and scalable groupware - ActiveSync module - SOGo is a groupware server built around OpenGroupware.org (OGo) and - the SOPE application server with focus on scalability. - . - This package provides Microsoft EAS support for SOGo. - -Package: sogo-dbg -Section: debug -Priority: extra -Architecture: any -Depends: sogo (= ${binary:Version}), ${misc:Depends} -Description: a modern and scalable groupware - debugging symbols - SOGo is a groupware server built around OpenGroupware.org (OGo) and - the SOPE application server with focus on scalability. - . - This package contains the debugging symbols for SOGo. diff --git a/packaging/debian-multiarch/rules b/packaging/debian-multiarch/rules index bdf71b21f..c64589a40 100755 --- a/packaging/debian-multiarch/rules +++ b/packaging/debian-multiarch/rules @@ -4,7 +4,6 @@ export DH_VERBOSE=1 # export DH_OPTIONS="-p sogo" DESTDIR=$(CURDIR)/debian/tmp -DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) SAML2_CONFIG=--enable-saml2 @@ -22,9 +21,6 @@ build-arch: build-arch-stamp build-arch-stamp: config.make # Add here commands to compile the arch part of the package. $(MAKE) - if pkg-config --atleast-version=1.0 libmapi; \ - then (cd OpenChange; $(MAKE)); \ - fi (cd ActiveSync && $(MAKE)) touch $@ @@ -37,15 +33,10 @@ clean: -find Tests -name "*.pyc" -exec rm -f {} \; if [ -f config.make ]; \ then \ -# if pkg-config --atleast-version=1.0 libmapi; \ -# then \ -# (cd OpenChange; make clean); \ -# fi; \ - make clean; \ + $(MAKE) clean; \ fi -# -rm -f OpenChange/MAPIStorePropertySelectors.* -rm -f config.make - (cd ActiveSync; make clean); \ + (cd ActiveSync; $(MAKE) clean); \ dh_clean install: install-arch @@ -62,18 +53,6 @@ install-arch: build-arch # dh_installdirs -s $(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install -# if pkg-config --atleast-version=1.0 libmapi; \ -# then \ -# (cd OpenChange; \ -# $(MAKE) \ -# DESTDIR=$(DESTDIR) \ -# GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ -# install); \ -# rm -f $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/libMAPIStoreSOGo.so.1; \ -# rm -f $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/libMAPIStoreSOGo.so; \ -# mv -f $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/libMAPIStoreSOGo.so.1.0.0 \ -# $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends/SOGo.so; \ -# fi (cd ActiveSync; $(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install) install -D -m 644 Scripts/sogo-default debian/tmp/etc/default/sogo @@ -103,7 +82,7 @@ binary-arch: build-arch install-arch ln -s GNUstep/Frameworks/SOGo.framework/Versions/*/libSOGo* ./ ) dh_compress -X.py -X.sh dh_fixperms - dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends +# dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/mapistore_backends dh_shlibdeps dh_installdeb dh_gencontrol diff --git a/packaging/debian-multiarch/sogo-openchange.install b/packaging/debian-multiarch/sogo-openchange.install deleted file mode 100644 index d3f119d33..000000000 --- a/packaging/debian-multiarch/sogo-openchange.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/*/mapistore_backends/* -usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore diff --git a/packaging/debian-multiarch/sogo.overrides b/packaging/debian-multiarch/sogo.overrides index d5dad073b..ecb5c768a 100644 --- a/packaging/debian-multiarch/sogo.overrides +++ b/packaging/debian-multiarch/sogo.overrides @@ -1,4 +1 @@ -sogo: embedded-javascript-library usr/lib/GNUstep/SOGo/WebServerResources/prototype.js -sogo: extra-license-file usr/lib/GNUstep/SOGo/WebServerResources/scriptaculous/MIT-LICENSE -sogo: embedded-javascript-library usr/lib/GNUstep/SOGo/WebServerResources/scriptaculous/scriptaculous.js sogo: package-name-doesnt-match-sonames libGDLContentStore4.9 libNGCards4.9 libSOGoUI1.0 diff --git a/packaging/debian-multiarch/sogo.postinst b/packaging/debian-multiarch/sogo.postinst index dfc86ca21..cba01a26f 100644 --- a/packaging/debian-multiarch/sogo.postinst +++ b/packaging/debian-multiarch/sogo.postinst @@ -41,6 +41,9 @@ the packaging system. Please check the list of database schema upgrade scripts inside /usr/share/doc/sogo/ and apply them if needed. +More details can be found in the Upgrading section: +https://sogo.nu/files/docs/SOGoInstallationGuide.html#_upgrading + EOF # Apache 2.2 / 2.4 kungfu diff --git a/packaging/debian/compat b/packaging/debian/compat index 45a4fb75d..7f8f011eb 100644 --- a/packaging/debian/compat +++ b/packaging/debian/compat @@ -1 +1 @@ -8 +7 diff --git a/packaging/debian/control b/packaging/debian/control index 6dea3a00c..bc1a5d28a 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -1,9 +1,9 @@ Source: sogo Priority: optional Maintainer: Inverse Support -Build-Depends: debhelper (>= 8.0.0), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libwbxml2-dev (>= 0.11.2), liblasso3-dev (>= 2.3.5) +Build-Depends: debhelper (>= 7.0.15), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libwbxml2-dev (>= 0.11.2), liblasso3-dev (>= 2.3.5) Section: web -Standards-Version: 3.9.2 +Standards-Version: 3.9.1 Package: sogo Section: web diff --git a/packaging/debian/rules b/packaging/debian/rules index 041f1accb..9f8a55be8 100755 --- a/packaging/debian/rules +++ b/packaging/debian/rules @@ -4,8 +4,11 @@ export DH_VERBOSE=1 # export DH_OPTIONS="-p sogo" DESTDIR=$(CURDIR)/debian/tmp +DIST_CODENAME=$(shell lsb_release -cs) +#ifeq ($(DIST_CODENAME), squeeze) SAML2_CONFIG=--enable-saml2 +#endif include /etc/GNUstep/GNUstep.conf include /usr/share/GNUstep/Makefiles/common.make @@ -21,9 +24,6 @@ build-arch: build-arch-stamp build-arch-stamp: config.make # Add here commands to compile the arch part of the package. $(MAKE) - if pkg-config --atleast-version=1.0 libmapi; \ - then (cd OpenChange; $(MAKE)); \ - fi (cd ActiveSync && $(MAKE)) touch $@ @@ -36,13 +36,8 @@ clean: -find Tests -name "*.pyc" -exec rm -f {} \; if [ -f config.make ]; \ then \ -# if pkg-config --atleast-version=1.0 libmapi; \ -# then \ -# (cd OpenChange; make clean); \ -# fi; \ - make clean; \ + $(MAKE) clean; \ fi -# -rm -f OpenChange/MAPIStorePropertySelectors.* -rm -f config.make (cd ActiveSync; $(MAKE) clean); \ dh_clean @@ -61,26 +56,14 @@ install-arch: build-arch # dh_installdirs -s $(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install -# if pkg-config --atleast-version=1.0 libmapi; \ -# then \ -# (cd OpenChange; \ -# $(MAKE) \ -# DESTDIR=$(DESTDIR) \ -# GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ -# install); \ -# rm -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so.1; \ -# rm -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so; \ -# mv -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so.1.0.0 \ -# $(DESTDIR)/usr/lib/mapistore_backends/SOGo.so; \ -# fi (cd ActiveSync; $(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install) install -D -m 644 Scripts/sogo-default debian/tmp/etc/default/sogo install -D -m 644 debian/sogo.overrides debian/tmp/usr/share/lintian/overrides/sogo - install -D -m 644 Apache/SOGo.conf debian/tmp/etc/apache2/conf-available/SOGo.conf + install -D -m 644 Apache/SOGo.conf debian/tmp/etc/apache2/conf.d/SOGo.conf install -D -m 644 Scripts/sogo.cron debian/tmp/etc/cron.d/sogo install -D -m 644 Scripts/logrotate debian/tmp/etc/logrotate.d/sogo - install -d -m 750 debian/tmp/etc/sogo + install -d -m 750 debian/tmp/etc/sogo/ install -D -m 640 Scripts/sogo.conf debian/tmp/etc/sogo/sogo.conf # Build architecture dependant packages using the common target. diff --git a/packaging/debian/sogo.install b/packaging/debian/sogo.install index e6de0eda6..ba044b824 100644 --- a/packaging/debian/sogo.install +++ b/packaging/debian/sogo.install @@ -1,4 +1,4 @@ -etc/apache2/conf-available/SOGo.conf +etc/apache2/conf.d/SOGo.conf etc/cron.d/sogo etc/default/sogo etc/logrotate.d/sogo diff --git a/packaging/debian/sogo.postinst b/packaging/debian/sogo.postinst index cba01a26f..8227c196a 100644 --- a/packaging/debian/sogo.postinst +++ b/packaging/debian/sogo.postinst @@ -45,18 +45,6 @@ More details can be found in the Upgrading section: https://sogo.nu/files/docs/SOGoInstallationGuide.html#_upgrading EOF - - # Apache 2.2 / 2.4 kungfu - COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) - - if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then - . /usr/share/apache2/apache2-maintscript-helper - apache2_invoke enconf SOGo || exit $? - elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then - if [ -d /etc/apache2/conf.d/ -a ! -e /etc/apache2/conf.d/SOGo.conf ]; then - ln -s ../conf-available/SOGo.conf /etc/apache2/conf.d/SOGo.conf - fi - fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/packaging/debian/sogo.prerm b/packaging/debian/sogo.prerm index 35f46aa4a..914a28b5e 100644 --- a/packaging/debian/sogo.prerm +++ b/packaging/debian/sogo.prerm @@ -13,17 +13,5 @@ set -e # for details, see /usr/share/doc/packaging-manual/ #DEBHELPER# -if [ "$1" = "deconfigure" ] ; then - # Apache 2.2 / 2.4 kungfu - COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) - - if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then - . /usr/share/apache2/apache2-maintscript-helper - apache2_invoke disconf SOGo || exit $? - elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then - [ ! -L /etc/apache2/conf.d/SOGo.conf ] || rm /etc/apache2/conf.d/SOGo.conf - fi - -fi exit 0