added debian build files
fixed indentation added bug note to manpage about db file format not being architecture independent
This commit is contained in:
parent
cb0d4b54b3
commit
d6fe5a92bd
6
debian/changelog
vendored
Normal file
6
debian/changelog
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
isync (0.8-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Initial Release.
|
||||||
|
|
||||||
|
-- Michael Elkins <melkins@debian> Wed, 16 Jan 2002 13:36:52 -0800
|
||||||
|
|
23
debian/control
vendored
Normal file
23
debian/control
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
Source: isync
|
||||||
|
Section: unknown
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Michael Elkins <me@mutt.org>
|
||||||
|
Build-Depends: debhelper (>> 3.0.0)
|
||||||
|
Standards-Version: 3.5.2
|
||||||
|
|
||||||
|
Package: isync
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${shlibs:Depends}
|
||||||
|
Description: Synchronize a local maildir with a remote IMAP4 mailbox
|
||||||
|
A command line application which synchronizes a local maildir-style
|
||||||
|
mailbox with a remote IMAP4 mailbox, suitable for use in
|
||||||
|
IMAP-disconnected mode. Multiple copies of the remote IMAP4 mailbox
|
||||||
|
can be maintained, and all flags are synchronized.
|
||||||
|
.
|
||||||
|
Features:
|
||||||
|
* Fast mode for fetching new mail only
|
||||||
|
* Supports imaps: (port 993) TLS/SSL connections
|
||||||
|
* Supports STARTTLS (RFC2595) for confidentiality
|
||||||
|
* Supports NAMESPACE (RFC2342)
|
||||||
|
* Supports CRAM-MD5 (RFC2095) for authentication
|
||||||
|
|
26
debian/copyright
vendored
Normal file
26
debian/copyright
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
This package was debianized by Michael Elkins <melkins@debian> on
|
||||||
|
Wed, 16 Jan 2002 13:36:52 -0800.
|
||||||
|
|
||||||
|
It was downloaded from http://www.sigpipe.org:8080/isync/
|
||||||
|
|
||||||
|
Upstream Author(s): Michael Elkins <me@mutt.org>
|
||||||
|
|
||||||
|
Copyright:
|
||||||
|
|
||||||
|
* isync - IMAP4 to maildir mailbox synchronizer
|
||||||
|
* Copyright (C) 2000-2 Michael R. Elkins <me@mutt.org>
|
||||||
|
*
|
||||||
|
* 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, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
4
debian/docs
vendored
Normal file
4
debian/docs
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
NEWS
|
||||||
|
README
|
||||||
|
TODO
|
||||||
|
sample.isyncrc
|
85
debian/rules
vendored
Executable file
85
debian/rules
vendored
Executable file
|
@ -0,0 +1,85 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
# Sample debian/rules that uses debhelper.
|
||||||
|
# GNU copyright 1997 to 1999 by Joey Hess.
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
# This is the debhelper compatability version to use.
|
||||||
|
export DH_COMPAT=3
|
||||||
|
|
||||||
|
configure: configure-stamp
|
||||||
|
configure-stamp:
|
||||||
|
dh_testdir
|
||||||
|
# Add here commands to configure the package.
|
||||||
|
./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
|
||||||
|
|
||||||
|
touch configure-stamp
|
||||||
|
|
||||||
|
build: build-stamp
|
||||||
|
|
||||||
|
build-stamp: configure-stamp
|
||||||
|
dh_testdir
|
||||||
|
|
||||||
|
# Add here commands to compile the package.
|
||||||
|
$(MAKE)
|
||||||
|
#/usr/bin/docbook-to-man debian/isync.sgml > isync.1
|
||||||
|
|
||||||
|
touch build-stamp
|
||||||
|
|
||||||
|
clean:
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
rm -f build-stamp configure-stamp
|
||||||
|
|
||||||
|
# Add here commands to clean up after the build process.
|
||||||
|
-$(MAKE) distclean
|
||||||
|
|
||||||
|
dh_clean
|
||||||
|
|
||||||
|
install: build
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_clean -k
|
||||||
|
dh_installdirs
|
||||||
|
|
||||||
|
# Add here commands to install the package into debian/isync.
|
||||||
|
$(MAKE) install prefix=$(CURDIR)/debian/isync
|
||||||
|
|
||||||
|
|
||||||
|
# Build architecture-independent files here.
|
||||||
|
binary-indep: build install
|
||||||
|
# We have nothing to do by default.
|
||||||
|
|
||||||
|
# Build architecture-dependent files here.
|
||||||
|
binary-arch: build install
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
# dh_installdebconf
|
||||||
|
dh_installdocs
|
||||||
|
dh_installexamples
|
||||||
|
# dh_installmenu
|
||||||
|
# dh_installlogrotate
|
||||||
|
# dh_installemacsen
|
||||||
|
# dh_installpam
|
||||||
|
# dh_installmime
|
||||||
|
# dh_installinit
|
||||||
|
# dh_installcron
|
||||||
|
dh_installman isync.1
|
||||||
|
# dh_installinfo
|
||||||
|
# dh_undocumented
|
||||||
|
dh_installchangelogs ChangeLog
|
||||||
|
dh_link
|
||||||
|
dh_strip
|
||||||
|
dh_compress
|
||||||
|
dh_fixperms
|
||||||
|
# dh_makeshlibs
|
||||||
|
dh_installdeb
|
||||||
|
# dh_perl
|
||||||
|
dh_shlibdeps
|
||||||
|
dh_gencontrol
|
||||||
|
dh_md5sums
|
||||||
|
dh_builddeb
|
||||||
|
|
||||||
|
binary: binary-indep binary-arch
|
||||||
|
.PHONY: build clean binary-indep binary-arch binary install configure
|
3
isync.1
3
isync.1
|
@ -323,6 +323,9 @@ It is currently impossible to unset the \\Flagged attribute of a message
|
||||||
once it is set. It has to be manually unset everywhere since isync
|
once it is set. It has to be manually unset everywhere since isync
|
||||||
doesn't have enough information to know which was the last status of the
|
doesn't have enough information to know which was the last status of the
|
||||||
message.
|
message.
|
||||||
|
.P
|
||||||
|
The ndbm database created for each mailbox is not portable across different
|
||||||
|
architectures. It currently stores the UID in host byte order.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
mutt(1), maildir(5)
|
mutt(1), maildir(5)
|
||||||
.P
|
.P
|
||||||
|
|
60
maildir.c
60
maildir.c
|
@ -281,7 +281,7 @@ maildir_open (const char *path, int flags)
|
||||||
strfcpy (buf, p->file, sizeof (buf));
|
strfcpy (buf, p->file, sizeof (buf));
|
||||||
key.dptr = p->file;
|
key.dptr = p->file;
|
||||||
s = strchr (key.dptr, ':');
|
s = strchr (key.dptr, ':');
|
||||||
key.dsize = s ? s - key.dptr : strlen (key.dptr);
|
key.dsize = s ? (size_t) (s - key.dptr) : strlen (key.dptr);
|
||||||
key = dbm_fetch (m->db, key);
|
key = dbm_fetch (m->db, key);
|
||||||
if (key.dptr)
|
if (key.dptr)
|
||||||
{
|
{
|
||||||
|
@ -318,35 +318,35 @@ maildir_open (const char *path, int flags)
|
||||||
int
|
int
|
||||||
maildir_expunge (mailbox_t * mbox, int dead)
|
maildir_expunge (mailbox_t * mbox, int dead)
|
||||||
{
|
{
|
||||||
message_t **cur = &mbox->msgs;
|
message_t **cur = &mbox->msgs;
|
||||||
message_t *tmp;
|
message_t *tmp;
|
||||||
char *s;
|
char *s;
|
||||||
datum key;
|
datum key;
|
||||||
char path[_POSIX_PATH_MAX];
|
char path[_POSIX_PATH_MAX];
|
||||||
|
|
||||||
while (*cur)
|
while (*cur)
|
||||||
|
{
|
||||||
|
if ((dead == 0 && (*cur)->flags & D_DELETED) ||
|
||||||
|
(dead && (*cur)->dead))
|
||||||
{
|
{
|
||||||
if ((dead == 0 && (*cur)->flags & D_DELETED) ||
|
tmp = *cur;
|
||||||
(dead && (*cur)->dead))
|
snprintf (path, sizeof (path), "%s/%s/%s",
|
||||||
{
|
mbox->path, tmp->new ? "new" : "cur", tmp->file);
|
||||||
tmp = *cur;
|
if (unlink (path))
|
||||||
snprintf (path, sizeof (path), "%s/%s/%s",
|
perror (path);
|
||||||
mbox->path, tmp->new ? "new" : "cur", tmp->file);
|
/* remove the message from the UID map */
|
||||||
if (unlink (path))
|
key.dptr = tmp->file;
|
||||||
perror (path);
|
s = strchr (key.dptr, ':');
|
||||||
/* remove the message from the UID map */
|
key.dsize = s ? (size_t) (s - key.dptr) : strlen (key.dptr);
|
||||||
key.dptr = tmp->file;
|
dbm_delete (mbox->db, key);
|
||||||
s = strchr (key.dptr, ':');
|
*cur = (*cur)->next;
|
||||||
key.dsize = s ? s - key.dptr : strlen (key.dptr);
|
free (tmp->file);
|
||||||
dbm_delete (mbox->db, key);
|
free (tmp);
|
||||||
*cur = (*cur)->next;
|
|
||||||
free (tmp->file);
|
|
||||||
free (tmp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
cur = &(*cur)->next;
|
|
||||||
}
|
}
|
||||||
return 0;
|
else
|
||||||
|
cur = &(*cur)->next;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -371,12 +371,12 @@ maildir_update_maxuid (mailbox_t * mbox)
|
||||||
len = write (fd, buf, strlen (buf));
|
len = write (fd, buf, strlen (buf));
|
||||||
if (len == (size_t) - 1)
|
if (len == (size_t) - 1)
|
||||||
{
|
{
|
||||||
perror ("write");
|
perror ("write");
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (close (fd))
|
if (close (fd))
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
10
sync.c
10
sync.c
|
@ -40,7 +40,8 @@ find_msg (message_t * list, unsigned int uid)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int set_uid (DBM *db, const char *f, unsigned int uid)
|
static int
|
||||||
|
set_uid (DBM * db, const char *f, unsigned int uid)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
datum key, val;
|
datum key, val;
|
||||||
|
@ -48,7 +49,7 @@ static int set_uid (DBM *db, const char *f, unsigned int uid)
|
||||||
key.dptr = (void *) f;
|
key.dptr = (void *) f;
|
||||||
s = strchr (f, ':');
|
s = strchr (f, ':');
|
||||||
key.dsize = s ? (size_t) (s - key.dptr) : strlen (f);
|
key.dsize = s ? (size_t) (s - key.dptr) : strlen (f);
|
||||||
val.dptr = (void*) &uid;
|
val.dptr = (void *) &uid;
|
||||||
val.dsize = sizeof (uid);
|
val.dsize = sizeof (uid);
|
||||||
dbm_store (db, key, val, DBM_REPLACE);
|
dbm_store (db, key, val, DBM_REPLACE);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -176,8 +177,9 @@ sync_mailbox (mailbox_t * mbox, imap_t * imap, int flags,
|
||||||
if (imap_copy_message (imap, cur->uid,
|
if (imap_copy_message (imap, cur->uid,
|
||||||
imap->box->copy_deleted_to))
|
imap->box->copy_deleted_to))
|
||||||
{
|
{
|
||||||
fprintf (stderr, "ERROR: unable to copy deleted message to \"%s\"\n",
|
fprintf (stderr,
|
||||||
imap->box->copy_deleted_to);
|
"ERROR: unable to copy deleted message to \"%s\"\n",
|
||||||
|
imap->box->copy_deleted_to);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user