From 47bdbb4aab0785ec779dbc8c418026ed5e3bed1c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 11 Aug 2017 08:50:28 +0200 Subject: [PATCH 1/6] enable TLS 1.1 and 1.2 by default there is no reason not to, and debian even disabled 1.0 globally, because it's (theoretically) too insecure in some contexts (BEAST attack). in the compat wrapper, the UseTLSv1 option has been re-interpreted as v1.x, to avoid adding new options. --- src/compat/config.c | 5 +++-- src/compat/isync.1 | 2 +- src/drv_imap.c | 4 ++-- src/mbsync.1 | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/compat/config.c b/src/compat/config.c index 746b46a..9ce9a98 100644 --- a/src/compat/config.c +++ b/src/compat/config.c @@ -316,9 +316,10 @@ write_imap_server( FILE *fp, config_t *cfg ) if (cfg->pass) fprintf( fp, "Pass %s\n", quotify( cfg->pass ) ); fprintf( fp, "RequireCRAM %s\nRequireSSL %s\n" - "UseSSLv2 %s\nUseSSLv3 %s\nUseTLSv1 %s\n", + "UseSSLv2 %s\nUseSSLv3 %s\nUseTLSv1 %s\nUseTLSv1.1 %s\nUseTLSv1.2 %s\n", tb(cfg->require_cram), tb(cfg->require_ssl), - tb(cfg->use_sslv2), tb(cfg->use_sslv3), tb(cfg->use_tlsv1) ); + tb(cfg->use_sslv2), tb(cfg->use_sslv3), + tb(cfg->use_tlsv1), tb(cfg->use_tlsv1), tb(cfg->use_tlsv1) ); if ((cfg->use_imaps || cfg->use_sslv2 || cfg->use_sslv3 || cfg->use_tlsv1) && cfg->cert_file) fprintf( fp, "CertificateFile %s\n", quotify( cfg->cert_file ) ); diff --git a/src/compat/isync.1 b/src/compat/isync.1 index fb9900f..aad06aa 100644 --- a/src/compat/isync.1 +++ b/src/compat/isync.1 @@ -278,7 +278,7 @@ Should \fBisync\fR use SSLv3 for communication with the IMAP server over SSL? .. .TP \fBUseTLSv1\fR \fIyes\fR|\fIno\fR -Should \fBisync\fR use TLSv1 for communication with the IMAP server over SSL? +Should \fBisync\fR use TLSv1.x for communication with the IMAP server over SSL? (Default: \fIyes\fR) .. .TP diff --git a/src/drv_imap.c b/src/drv_imap.c index 3d66243..7aacb95 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -2767,7 +2767,7 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) arg += 6; server->ssl_type = SSL_IMAPS; if (server->sconf.ssl_versions == -1) - server->sconf.ssl_versions = SSLv2 | SSLv3 | TLSv1; + server->sconf.ssl_versions = SSLv2 | SSLv3 | TLSv1 | TLSv1_1 | TLSv1_2; } else #endif if (starts_with( arg, -1, "imap:", 5 )) @@ -2930,7 +2930,7 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) } } else { if (server->sconf.ssl_versions < 0) - server->sconf.ssl_versions = TLSv1; /* Most compatible and still reasonably secure. */ + server->sconf.ssl_versions = TLSv1 | TLSv1_1 | TLSv1_2; if (server->ssl_type < 0) server->ssl_type = server->sconf.tunnel ? SSL_None : SSL_STARTTLS; } diff --git a/src/mbsync.1 b/src/mbsync.1 index 51f356a..d2d5bd8 100644 --- a/src/mbsync.1 +++ b/src/mbsync.1 @@ -337,8 +337,8 @@ right after connecting the secure IMAP port 993. Select the acceptable SSL/TLS versions. Use of SSLv2 is strongly discouraged for security reasons, but might be the only option on some very old servers. -Generally, the newest TLS version is recommended, but as this confuses some -servers, \fBTLSv1\fR is the default. +Use old versions only when the server has problems with newer ones. +(Default: [\fBTLSv1\fR] [\fBTLSv1.1\fR] [\fBTLSv1.2\fR]). .. .TP \fBSystemCertificates\fR \fByes\fR|\fBno\fR From d529bc3887f852446ac82746dbfff76f7374e5d6 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 19 Aug 2017 13:22:26 +0200 Subject: [PATCH 2/6] use autoconf's built-in pkg-config support for OpenSSL the hand-crafted suppport did not work with cross-builds. --- configure.ac | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 6f8d44a..362b02b 100644 --- a/configure.ac +++ b/configure.ac @@ -54,13 +54,13 @@ if test "x$ob_cv_with_ssl" != xno; then dnl Detect the pkg-config tool, as it may have extra info about the openssl dnl installation we can use. I *believe* this is what we are expected to do dnl on really recent Redhat Linux hosts. - AC_PATH_PROG(PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin) - if test "$PKGCONFIG" != "no" ; then + PKG_PROG_PKG_CONFIG + if test "x$PKG_CONFIG" != "x" ; then AC_MSG_CHECKING([OpenSSL presence with pkg-config]) - if $PKGCONFIG --exists openssl; then - SSL_LIBS=`$PKGCONFIG --libs-only-l openssl` - SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl` - SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl` + if $PKG_CONFIG --exists openssl; then + SSL_LIBS=`$PKG_CONFIG --libs-only-l openssl` + SSL_LDFLAGS=`$PKG_CONFIG --libs-only-L openssl` + SSL_CPPFLAGS=`$PKG_CONFIG --cflags-only-I openssl` have_ssl_paths=yes AC_MSG_RESULT([found]) else From 8bab938f6966626656ffde3f6365c450ee8811bb Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sun, 1 Oct 2017 08:15:07 +0200 Subject: [PATCH 3/6] bump version --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 362b02b..57edd15 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([isync], [1.2.2]) +AC_INIT([isync], [1.2.3]) AC_CONFIG_HEADERS([autodefs.h]) AM_INIT_AUTOMAKE From 33ee4a4ffed94164fd20c397b214101e07fcbe66 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sun, 1 Oct 2017 10:04:00 +0200 Subject: [PATCH 4/6] fixes for -Wimplicit-fallthrough --- src/common.h | 6 ++++++ src/compat/isync.h | 6 ++++++ src/compat/main.c | 8 ++++---- src/main.c | 6 +++--- src/socket.c | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/common.h b/src/common.h index 18390f3..f876381 100644 --- a/src/common.h +++ b/src/common.h @@ -49,6 +49,12 @@ typedef unsigned int uint; # define ATTR_PRINTFLIKE(fmt,var) #endif +#if __GNUC__ >= 7 +# define FALLTHROUGH __attribute__((fallthrough)); +#else +# define FALLTHROUGH +#endif + #ifdef __GNUC__ # define INLINE __inline__ #else diff --git a/src/compat/isync.h b/src/compat/isync.h index 0473900..71d19ea 100644 --- a/src/compat/isync.h +++ b/src/compat/isync.h @@ -34,6 +34,12 @@ # define ATTR_PRINTFLIKE(fmt,var) #endif +#if __GNUC__ >= 7 +# define FALLTHROUGH __attribute__((fallthrough)); +#else +# define FALLTHROUGH +#endif + typedef struct config { struct config *next; diff --git a/src/compat/main.c b/src/compat/main.c index 2ad6f07..6b00547 100644 --- a/src/compat/main.c +++ b/src/compat/main.c @@ -64,14 +64,14 @@ struct option Opts[] = { }; #endif -static void +static void ATTR_NORETURN version( void ) { puts( PACKAGE " " VERSION ); exit( 0 ); } -static void +static void ATTR_NORETURN usage( int code ) { fputs( @@ -194,13 +194,13 @@ main( int argc, char **argv ) switch (i) { case 'W': outconfig = optarg; - /* plopp */ + FALLTHROUGH case 'w': writeout = 1; break; case 'l': list = 1; - /* plopp */ + FALLTHROUGH case 'a': all = 1; break; diff --git a/src/main.c b/src/main.c index 23b6931..27ef8d7 100644 --- a/src/main.c +++ b/src/main.c @@ -51,14 +51,14 @@ int new_total[2], new_done[2]; int flags_total[2], flags_done[2]; int trash_total[2], trash_done[2]; -static void +static void ATTR_NORETURN version( void ) { puts( PACKAGE " " VERSION ); exit( 0 ); } -static void +static void ATTR_NORETURN usage( int code ) { fputs( @@ -573,7 +573,7 @@ main( int argc, char **argv ) goto cop; case 'F': cops |= XOP_PULL|XOP_PUSH; - /* fallthrough */ + FALLTHROUGH case '0': ops[M] |= XOP_HAVE_TYPE; break; diff --git a/src/socket.c b/src/socket.c index 9357b8c..65f51b6 100644 --- a/src/socket.c +++ b/src/socket.c @@ -72,7 +72,7 @@ ssl_return( const char *func, conn_t *conn, int ret ) return ret; case SSL_ERROR_WANT_WRITE: conf_notifier( &conn->notify, POLLIN, POLLOUT ); - /* fallthrough */ + FALLTHROUGH case SSL_ERROR_WANT_READ: return 0; case SSL_ERROR_SYSCALL: From a9feea71feb05ad8520212e96e69ec85f9bb9970 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Sat, 23 Sep 2017 12:32:48 +0200 Subject: [PATCH 5/6] Fix spelling of error messages --- src/drv_imap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drv_imap.c b/src/drv_imap.c index 7aacb95..6787e17 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -2902,7 +2902,7 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) #ifdef HAVE_LIBSSL if ((use_sslv2 & use_sslv3 & use_tlsv1 & use_tlsv11 & use_tlsv12) != -1 || use_imaps >= 0 || require_ssl >= 0) { if (server->ssl_type >= 0 || server->sconf.ssl_versions >= 0) { - error( "%s '%s': The deprecated UseSSL*, UseTLS*, UseIMAPS, and RequireSSL options are mutually exlusive with SSLType and SSLVersions.\n", type, name ); + error( "%s '%s': The deprecated UseSSL*, UseTLS*, UseIMAPS, and RequireSSL options are mutually exclusive with SSLType and SSLVersions.\n", type, name ); cfg->err = 1; return 1; } @@ -2937,7 +2937,7 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) #endif if (require_cram >= 0) { if (server->auth_mechs) { - error( "%s '%s': The deprecated RequireCRAM option is mutually exlusive with AuthMech.\n", type, name ); + error( "%s '%s': The deprecated RequireCRAM option is mutually exclusive with AuthMech.\n", type, name ); cfg->err = 1; return 1; } From f2524d082bbb5e788580e4c955e264cff46d6c6a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 23 Sep 2017 12:52:10 +0200 Subject: [PATCH 6/6] update debian packaging --- Makefile.am | 8 +--- debian/.gitignore | 4 +- debian/README.Debian | 12 ++++++ debian/changelog | 94 ++++++++++++++++++++++++++++++++++++++++++++ debian/compat | 2 +- debian/control | 45 ++++++++++++--------- debian/copyright | 59 +++++++++++++-------------- debian/dirs | 1 - debian/docs | 3 -- debian/generate-deb | 39 ------------------ debian/rules | 59 ++++----------------------- debian/source/format | 1 + debian/watch | 2 +- 13 files changed, 178 insertions(+), 151 deletions(-) create mode 100644 debian/README.Debian delete mode 100644 debian/dirs delete mode 100644 debian/docs delete mode 100755 debian/generate-deb create mode 100644 debian/source/format diff --git a/Makefile.am b/Makefile.am index b47edf6..865094f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -54,12 +54,8 @@ log: git log --date=iso --log-size --name-only --no-merges | \ perl -e '$(LOG_PL)' > ChangeLog ) -deb: deb-clean - CFLAGS= fakeroot debian/rules binary - -deb-clean: - dh_clean -Xsrc/ - fakeroot debian/rules clean +deb: + CFLAGS= INSTALL= dpkg-buildpackage -b --no-sign dist-hook: find $(distdir)/debian \( -name .#\*# -o -type l \) -print0 | xargs -0r rm -rf diff --git a/debian/.gitignore b/debian/.gitignore index 3a7be5b..4ea3ab6 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -1,5 +1,7 @@ +.debhelper +autoreconf.after +autoreconf.before files isync isync.debhelper.log -isync.postrm.debhelper isync.substvars diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..250c106 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,12 @@ +A note from isync's web site: + +isync can be integrated into Mutt fairly easily with a few hooks: + + folder-hook ~A bind index $ + folder-hook +maildir 'macro index $ "!isync -e maildir\n"' + +where maildir is the name of the local mailbox (or its alias). This works well +so long as you are not modifying the IMAP mailbox outside of Mutt. However, if +you are using another mail program simultaneously Mutt will have the wrong idea +of the local mailbox flags and messages will start disappearing from its index +display (don't worry, they are still on disk). diff --git a/debian/changelog b/debian/changelog index efea80d..9a04bbe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,97 @@ +isync (1.2.3-0) unstable; urgency=low + + * Upload to unstable (with urgency=low) + + -- Oswald Buddenhagen Sun, 01 Oct 2017 12:12:12 +0000 + +isync (1.2.1-2) unstable; urgency=low + + * Upload to unstable (with urgency=low) + * Don't call uupdate after uscan + * Import patch to fix build with OpenSSL 1.1 (Closes: #828357) + * Bump Standards-Version to 3.9.8 (no changes needed) + * Add pkg-config to Build-Depends + * Update Vcs-* URLs + * Fix spelling-error-in-binary + + -- Alessandro Ghedini Sat, 19 Nov 2016 17:14:42 +0000 + +isync (1.2.1-1) experimental; urgency=medium + + [ Evgeni Golov ] + * New upstream release. + * Explicitly Build-Depend on zlib1g-dev + + -- Alessandro Ghedini Sat, 09 Jan 2016 12:56:39 +0000 + +isync (1.2.0-1) experimental; urgency=medium + + * New upstream release + - Only show sync progress by default (Closes: #765052) + * Enable libsasl support + + -- Alessandro Ghedini Mon, 06 Apr 2015 13:42:24 +0200 + +isync (1.1.2-1) unstable; urgency=medium + + * New upstream release + * Bump Standards-Version to 3.9.6 (no changes needed) + + -- Alessandro Ghedini Sun, 01 Feb 2015 20:42:25 +0100 + +isync (1.1.1-1) unstable; urgency=medium + + * New upstream release + - Don't lie about the default of User (Closes: #744389) + - Don't forget to reset message counts when skipping scan (Closes: #744259) + - Rework maildir store mapping (Closes: #737708) + * Drop 01_fix-manpages.patch (merged upstream) + * Drop 02_fix-empty-folder-sync.patch (merged upstream) + + -- Alessandro Ghedini Tue, 03 Jun 2014 21:00:44 +0200 + +isync (1.1.0-2) unstable; urgency=medium + + * Drop 02_fix-duplicate-changelog.patch + (rm the file after installation instead) + * Update 01_fix-manpages.patch + * Add 02_fix-empty-folder-sync.patch (Closes: #738873) + + -- Alessandro Ghedini Fri, 14 Feb 2014 20:41:49 +0100 + +isync (1.1.0-1) unstable; urgency=low + + * New upstream release (Closes: #674403) + - Fix overlapping memcpy (Closes: #650373) + - Fix segfault while syncing mailboxes (Closes: #411120) + - Fix segfault when invoked with arguments without configuration + (Closes: #727239) + * Bump debhelper compat level, update Build-Depends + * Switch to short-form dh rules, remove useless files + * Switch to 3.0 (quilt) source format + * Remove empty patches/ directory + * Drop local source modifications + * Update short/long descriptions + * Add 01_fix-manpages.patch to fix manpage errors and typos + * Add Homepage field + * Update copyright file to Copyright-Format 1.0 + * Add Vcs-* fields + * Add 02_fix-duplicate-changelog.patch to avoid duplicate changelog install + * Add myself to Uploaders + * Bump Standards-Version to 3.9.5 (no changes needed) + * Use dh-autoreconf instead of autotools-dev + + -- Alessandro Ghedini Sun, 12 Jan 2014 16:35:52 +0100 + +isync (1.0.4-2.2) unstable; urgency=low + + * Non-maintainer upload. + * Apply upstream patch for CVE-2013-0289. + Fix incorrect server's SSL x509.v3 certificate validation when + performing IMAP synchronization. (Closes: #701052) + + -- Salvatore Bonaccorso Sun, 24 Feb 2013 09:27:55 +0100 + isync (1.0.4-2.1) unstable; urgency=low * Non-maintainer upload. diff --git a/debian/compat b/debian/compat index b8626c4..ec63514 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -4 +9 diff --git a/debian/control b/debian/control index 51a65b5..2359576 100644 --- a/debian/control +++ b/debian/control @@ -2,33 +2,42 @@ Source: isync Section: mail Priority: optional Maintainer: Nicolas Boullis -Uploaders: Theodore Y. Ts'o -Standards-Version: 3.7.3 -Build-Depends: libssl-dev (>= 0.9.8), debhelper (>= 4.1.16), dpkg-dev (>= 1.9.0), libdb-dev +Uploaders: Theodore Y. Ts'o , + Alessandro Ghedini +Standards-Version: 3.9.8 +Build-Depends: debhelper (>= 9), + dh-autoreconf, + libdb-dev, + libsasl2-dev, + libssl-dev, + pkg-config, + zlib1g-dev +Vcs-Git: https://anonscm.debian.org/git/collab-maint/isync.git +Vcs-Browser: https://anonscm.debian.org/gitweb/?p=collab-maint/isync.git +Homepage: http://isync.sourceforge.net/ Package: isync Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: mutt -Description: Synchronize Maildir and IMAP4 mailboxes - A command line application which synchronizes mailboxes; currently - Maildir and IMAP4 mailboxes are supported. - New messages, message deletions and flag changes can be propagated both ways. - It is useful for working in disconnected mode, such as on a laptop or with a - non-permanent internet collection (dIMAP). +Description: IMAP and MailDir mailbox synchronizer + mbsync/isync is a command line application which synchronizes mailboxes; + currently Maildir and IMAP4 mailboxes are supported. New messages, message + deletions and flag changes can be propagated both ways. isync is suitable + for use in IMAP-disconnected mode. . - The main application was much improved in version 1.0. Those - improvements lead to interface changes and the application being - renamed to mbsync. The application isync is now only a wrapper to - keep compatibility with earlier versions. + The main application was much improved in version 1.0. Those improvements + lead to interface changes and the application being renamed to mbsync. The + application isync is now only a wrapper to keep compatibility with earlier + versions. . Features: * Fine-grained selection of synchronization operations to perform * Synchronizes single mailboxes or entire mailbox collections * Partial mirrors possible: keep only the latest messages locally * Trash functionality: backup messages before removing them - * IMAP features: - * Supports TLS/SSL via imaps: (port 993) and STARTTLS (RFC2595) - * Supports CRAM-MD5 (RFC2195) for authentication - * Supports NAMESPACE (RFC2342) for simplified configuration - * Pipelining for maximum speed + IMAP features: + * Security: supports TLS/SSL via imaps: (port 993) and STARTTLS; SASL + for authentication + * Supports NAMESPACE for simplified configuration + * Pipelining for maximum speed diff --git a/debian/copyright b/debian/copyright index c1bb05f..627e0d6 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,32 +1,33 @@ -This package was debianized by Tommi Virtanen and is now -maintained by Nicolas Boullis . +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: isync +Source: http://isync.sourceforge.net -It was downloaded from http://isync.sourceforge.net/ +Files: * +Copyright: 2000-2002, Michael R. Elkins + 2002-2017, Oswald Buddenhagen + 2004, Theodore Y. Ts'o +License: GPL-2+ -Upstream Author: Michael R. Elkins , - Oswald Buddenhagen +Files: debian/* +Copyright: 2013, Alessandro Ghedini +License: GPL-2+ -Copyright: - - * isync - IMAP4 to maildir mailbox synchronizer - * Copyright (C) 2000-2002 Michael R. Elkins - * Copyright (C) 2002-2006 Oswald Buddenhagen - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * As a special exception, isync may be linked with the OpenSSL library, - * despite that library's more restrictive license. - -On Debian systems, the complete text of the GNU General Public -License can be found in /usr/share/common-licenses/GPL +License: GPL-2+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + As a special exception, mbsync may be linked with the OpenSSL library, + despite that library's more restrictive license. + . + On Debian systems, the complete text of the GNU General Public License version + 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index e772481..0000000 --- a/debian/dirs +++ /dev/null @@ -1 +0,0 @@ -usr/bin diff --git a/debian/docs b/debian/docs deleted file mode 100644 index 5502ed8..0000000 --- a/debian/docs +++ /dev/null @@ -1,3 +0,0 @@ -NEWS -README -TODO diff --git a/debian/generate-deb b/debian/generate-deb deleted file mode 100755 index f9d1603..0000000 --- a/debian/generate-deb +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# Intended to be run from the root of the isync source tree in the repository. -# -VERSION=`dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-[^-]\+$/\1/p'` -OLDVERSION=$VERSION - -if echo $VERSION | grep +cvsXXXXXXXX; then - DATE=`date +%Y%m%d` - VERSION=`echo $VERSION | sed -e s/+cvsXXXXXXXX/+cvs${DATE}/` -else - if [ ! -f ../isync_$VERSION.orig.tar.gz ]; then - echo isync_$VERSION.orig.tar.gz must be found in the parent directory. - exit 1 - fi -fi -rm -rf ../isync-$VERSION - -fakeroot ./debian/rules clean -cp -rl . ../isync-$VERSION -cd ../isync-$VERSION -if [ "$OLDVERSION" != "$VERSION" ]; then - sed -e s/+cvsXXXXXXXX/+cvs${DATE}/ < debian/changelog > debian/changelog.new - mv debian/changelog.new debian/changelog -fi -find . -name .git -print0 | xargs -0r rm -rf -find . -name .gitignore -print0 | xargs -0r rm -find . -type l -print0 | xargs -0r rm -find . -name .#\*# -print0 | xargs -0r rm -aclocal -autoheader -automake --add-missing --copy -autoconf -if [ -n "$DOSIGN" ]; then - SIGNOPTS= -else - SIGNOPTS="-us -uc" -fi -dpkg-buildpackage -rfakeroot $SIGNOPTS diff --git a/debian/rules b/debian/rules index 6f16737..d11b1a3 100755 --- a/debian/rules +++ b/debian/rules @@ -1,55 +1,10 @@ #!/usr/bin/make -f -CFLAGS = -Wall -g -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) -CFLAGS += -O0 -else -CFLAGS += -O2 -endif +%: + dh $@ --with=autoreconf -DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -build: build-stamp -build-stamp: - dh_testdir - ./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) --prefix=/usr --mandir=/usr/share/man - $(MAKE) CFLAGS="$(CFLAGS)" - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - [ ! -f Makefile ] || $(MAKE) distclean - dh_clean Makefile config.log config.status - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs usr/bin usr/share/man/man1 - $(MAKE) DESTDIR=$(CURDIR)/debian/isync install - rm -r $(CURDIR)/debian/isync/usr/share/doc - mv $(CURDIR)/debian/isync/usr/bin/get-cert $(CURDIR)/debian/isync/usr/bin/mbsync-get-cert - -binary-indep: build install - -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs ChangeLog - dh_installdocs AUTHORS NEWS README TODO - dh_installexamples src/mbsyncrc.sample src/compat/isyncrc.sample - dh_installman - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +override_dh_auto_install: + dh_auto_install + mv $(CURDIR)/debian/isync/usr/bin/get-cert \ + $(CURDIR)/debian/isync/usr/bin/mbsync-get-cert + $(RM) $(CURDIR)/debian/isync/usr/share/doc/isync/ChangeLog diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch index 6bb4e20..4e0c7f3 100644 --- a/debian/watch +++ b/debian/watch @@ -1,2 +1,2 @@ version=3 -http://sf.net/isync/ isync-(.*)\.tar\.gz debian uupdate +http://sf.net/isync/ isync-(.*)\.tar\.gz