From c49f4ea27fc44266cb455422f759a0a5948818a8 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 23 Jul 2015 04:37:48 +0200 Subject: debianization --- debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 24 ++++++++++++++++++++++++ debian/copyright | 15 +++++++++++++++ debian/gbp.conf | 6 ++++++ debian/imapsync.install | 2 ++ debian/rules | 4 ++++ debian/source/format | 1 + 8 files changed, 58 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/gbp.conf create mode 100644 debian/imapsync.install create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..77fb0c4 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +imapsync (0.1-1) UNRELEASED; urgency=low + + * Initial release. + + -- Guilhem Moulin Sat, 21 Mar 2015 15:04:45 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..55ab86d --- /dev/null +++ b/debian/control @@ -0,0 +1,24 @@ +Source: imapsync +Section: mail +Priority: optional +Maintainer: Guilhem Moulin +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.6 +Vcs-Git: https://git.guilhem.org/imapsync +Vcs-Browser: https://gitweb.guilhem.org/imapsync + +Package: imapsync +Architecture: all +Depends: ${misc:Depends}, ${perl:Depends}, + libconfig-tiny-perl, libdbi-perl, libdbd-sqlite3-perl +Recommends: libio-socket-ssl-perl +Description: IMAP-to-IMAP synchronization program for QRESYNC-capable servers + IMAPSync is a synchronization program between two QRESYNC-capable (RFC 7162) + IMAP4rev1 servers. Other required IMAP capabilities are LIST-EXTENDED (RFC + 5258), LIST-STATUS (RFC 5819) and UIDPLUS (RFC 4315), in addition to which + LITERAL+ (RFC 2088) and MULTIAPPEND (RFC 3502) are recommended for performance + reasons. + . + Furthermore if both servers support the NOTIFY capability (RFC 5465), it is + possible to keep the connection alive and be notified of new updates as soon + as they arrive. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..f5063cb --- /dev/null +++ b/debian/copyright @@ -0,0 +1,15 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: native package + +Files: * +Copyright: © 2015 Guilhem Moulin +License: GPL-3+ + +License: GPL-3+ + This package 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 3 of the License, or + (at your option) any later version. + . + On Debian systems, the complete text of the GNU General Public License + version 3 can be found in file "/usr/share/common-licenses/GPL-3". diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..f1d77f6 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,6 @@ +[DEFAULT] +upstream-branch = master +debian-branch = debian +upstream-tag = release/%(version)s +debian-tag = debian/%(version)s +pristine-tar = False diff --git a/debian/imapsync.install b/debian/imapsync.install new file mode 100644 index 0000000..95d027c --- /dev/null +++ b/debian/imapsync.install @@ -0,0 +1,2 @@ +lib/Net/IMAP/Sync.pm /usr/share/perl5/Net/IMAP +imapsync /usr/bin diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..2d33f6a --- /dev/null +++ b/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ 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) -- cgit v1.2.3 From deec7db3634d252228f67446564776b96e3ad0ca Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 23 Jul 2015 04:37:48 +0200 Subject: debianization --- debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 24 ++++++++++++++++++++++++ debian/copyright | 15 +++++++++++++++ debian/gbp.conf | 6 ++++++ debian/imapsync.install | 2 ++ debian/rules | 4 ++++ debian/source/format | 1 + 8 files changed, 58 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/gbp.conf create mode 100644 debian/imapsync.install create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..77fb0c4 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +imapsync (0.1-1) UNRELEASED; urgency=low + + * Initial release. + + -- Guilhem Moulin Sat, 21 Mar 2015 15:04:45 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..55ab86d --- /dev/null +++ b/debian/control @@ -0,0 +1,24 @@ +Source: imapsync +Section: mail +Priority: optional +Maintainer: Guilhem Moulin +Build-Depends: debhelper (>= 9) +Standards-Version: 3.9.6 +Vcs-Git: https://git.guilhem.org/imapsync +Vcs-Browser: https://gitweb.guilhem.org/imapsync + +Package: imapsync +Architecture: all +Depends: ${misc:Depends}, ${perl:Depends}, + libconfig-tiny-perl, libdbi-perl, libdbd-sqlite3-perl +Recommends: libio-socket-ssl-perl +Description: IMAP-to-IMAP synchronization program for QRESYNC-capable servers + IMAPSync is a synchronization program between two QRESYNC-capable (RFC 7162) + IMAP4rev1 servers. Other required IMAP capabilities are LIST-EXTENDED (RFC + 5258), LIST-STATUS (RFC 5819) and UIDPLUS (RFC 4315), in addition to which + LITERAL+ (RFC 2088) and MULTIAPPEND (RFC 3502) are recommended for performance + reasons. + . + Furthermore if both servers support the NOTIFY capability (RFC 5465), it is + possible to keep the connection alive and be notified of new updates as soon + as they arrive. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..f5063cb --- /dev/null +++ b/debian/copyright @@ -0,0 +1,15 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: native package + +Files: * +Copyright: © 2015 Guilhem Moulin +License: GPL-3+ + +License: GPL-3+ + This package 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 3 of the License, or + (at your option) any later version. + . + On Debian systems, the complete text of the GNU General Public License + version 3 can be found in file "/usr/share/common-licenses/GPL-3". diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..f1d77f6 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,6 @@ +[DEFAULT] +upstream-branch = master +debian-branch = debian +upstream-tag = release/%(version)s +debian-tag = debian/%(version)s +pristine-tar = False diff --git a/debian/imapsync.install b/debian/imapsync.install new file mode 100644 index 0000000..95d027c --- /dev/null +++ b/debian/imapsync.install @@ -0,0 +1,2 @@ +lib/Net/IMAP/Sync.pm /usr/share/perl5/Net/IMAP +imapsync /usr/bin diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..2d33f6a --- /dev/null +++ b/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ 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) -- cgit v1.2.3 From 8f6b36ba462b55ea9f600e4402e10672bf2f73ef Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 23 Jul 2015 19:15:22 +0200 Subject: bugfix --- lib/Net/IMAP/Sync.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/Net/IMAP/Sync.pm b/lib/Net/IMAP/Sync.pm index 517270b..0b95276 100644 --- a/lib/Net/IMAP/Sync.pm +++ b/lib/Net/IMAP/Sync.pm @@ -1182,7 +1182,7 @@ sub _select_or_examine($$$) { $command .= " (QRESYNC ($pcache->{UIDVALIDITY} $pcache->{HIGHESTMODSEQ} " ."1:".($pcache->{UIDNEXT}-1)."))" if $self->_enabled('QRESYNC') and - ($pcache->{HIGHESTMODSEQ} // 0) > 0 and ($pcache->{UIDNEXT} // 0) > 0; + ($pcache->{HIGHESTMODSEQ} // 0) > 0 and ($pcache->{UIDNEXT} // 0) > 1; if ($self->{_STATE} eq 'SELECTED' and ($self->_capable('CONDSTORE') or $self->_capable('QRESYNC'))) { # A mailbox is currently selected and the server advertizes @@ -1198,11 +1198,8 @@ sub _select_or_examine($$$) { } $self->{_STATE} = 'AUTH'; - if ($self->_send($command) eq 'OK') { - $self->{_STATE} = 'SELECTED'; - } else { - delete $self->{_SELECTED}; - } + $self->_send($command); + $self->{_STATE} = 'SELECTED'; } -- cgit v1.2.3 From 3b250b214ead4c8491db91fae7e913e2f98d2265 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 23 Jul 2015 21:26:15 +0200 Subject: Ignore custom lib PATH. --- debian/patches/0001-Ignore-custom-lib-PATH.patch | 24 ++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 25 insertions(+) create mode 100644 debian/patches/0001-Ignore-custom-lib-PATH.patch create mode 100644 debian/patches/series diff --git a/debian/patches/0001-Ignore-custom-lib-PATH.patch b/debian/patches/0001-Ignore-custom-lib-PATH.patch new file mode 100644 index 0000000..0786ffa --- /dev/null +++ b/debian/patches/0001-Ignore-custom-lib-PATH.patch @@ -0,0 +1,24 @@ +From 5c814e42f3eb9d638c6cb6fd4bc8a7d0ed020cfc Mon Sep 17 00:00:00 2001 +From: Guilhem Moulin +Date: Thu, 23 Jul 2015 19:19:25 +0200 +Subject: [PATCH] Ignore custom lib PATH. + +--- + imapsync | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/imapsync b/imapsync +index 4ef47b3..f932686 100755 +--- a/imapsync ++++ b/imapsync +@@ -30,7 +30,6 @@ use List::Util 'first'; + use DBI (); + use POSIX 'strftime'; + +-use lib 'lib'; + use Net::IMAP::Sync qw/read_config compact_set $IMAP_text $IMAP_cond/; + + # Clean up PATH +-- +2.4.6 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..ba71084 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-Ignore-custom-lib-PATH.patch -- cgit v1.2.3