Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging/debian: Fix FTBFS in a clean chroot environment (pbuilder) #218

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions OpenChange/MAPIStoreContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#import "MAPIStoreContext.h"

#undef DEBUG
#include <dlinklist.h>
#include "samba-dlinklist.h"
#include <stdbool.h>
#include <gen_ndr/exchange.h>
#include <util/attr.h>
Expand Down Expand Up @@ -123,7 +123,7 @@ + (struct mapistore_contexts_list *) listAllContextsForUser: (NSString *) userN
withIndexing: indexing
inMemCtx: memCtx];
if (current)
DLIST_CONCATENATE(list, current, void);
DLIST_CONCATENATE(list, current);
}

return list;
Expand Down
6 changes: 3 additions & 3 deletions OpenChange/MAPIStoreFallbackContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#undef DEBUG
#include <inttypes.h>
#include <dlinklist.h>
#include "samba-dlinklist.h"
#include <mapistore/mapistore.h>

@implementation MAPIStoreFallbackContext
Expand Down Expand Up @@ -68,7 +68,7 @@ + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName
context->role = MAPISTORE_FALLBACK_ROLE;
context->tag = "tag";

DLIST_ADD_END (firstContext, context, void);
DLIST_ADD_END (firstContext, context);

/* Maybe emsmdbp_provisioning should be fixed in order to only take the uri
returned above to avoid deleting its entries... */
Expand All @@ -91,7 +91,7 @@ + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName
context->main_folder = false;
context->role = MAPISTORE_FALLBACK_ROLE;
context->tag = "tag";
DLIST_ADD_END (firstContext, context, void);
DLIST_ADD_END (firstContext, context);
}

return firstContext;
Expand Down
4 changes: 2 additions & 2 deletions OpenChange/MAPIStoreGCSBaseContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#undef DEBUG
#include <mapistore/mapistore.h>
#include <dlinklist.h>
#include "samba-dlinklist.h"

@implementation MAPIStoreGCSBaseContext

Expand Down Expand Up @@ -102,7 +102,7 @@ + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName
context->main_folder = [nameInContainer isEqualToString: @"personal"];
context->role = [self MAPIContextRole];
context->tag = "tag";
DLIST_ADD_END (firstContext, context, void);
DLIST_ADD_END (firstContext, context);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions OpenChange/MAPIStoreMailContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#import "MAPIApplication.h"
#import "MAPIStoreMailContext.h"

#include <dlinklist.h>
#include "samba-dlinklist.h"
#undef DEBUG
#include <mapistore/mapistore.h>

Expand Down Expand Up @@ -143,7 +143,7 @@ + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName
context->main_folder = true;
context->role = role[count];
context->tag = "tag";
DLIST_ADD_END (firstContext, context, void);
DLIST_ADD_END (firstContext, context);
}

/* FIXME: Flush any cache before retrieving the hierarchy */
Expand Down Expand Up @@ -182,7 +182,7 @@ + (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName
context->main_folder = false;
context->role = MAPISTORE_MAIL_ROLE;
context->tag = "tag";
DLIST_ADD_END (firstContext, context, void);
DLIST_ADD_END (firstContext, context);
}

return firstContext;
Expand Down
178 changes: 178 additions & 0 deletions OpenChange/samba-dlinklist.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
/*
Unix SMB/CIFS implementation.
some simple double linked list macros

Copyright (C) Andrew Tridgell 1998-2010

** NOTE! The following LGPL license applies to the ldb
** library. This does NOT imply that all of Samba is released
** under the LGPL

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.

This library 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
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/

/* To use these macros you must have a structure containing a next and
prev pointer */

#ifndef _DLINKLIST_H
#define _DLINKLIST_H

/*
February 2010 - changed list format to have a prev pointer from the
list head. This makes DLIST_ADD_END() O(1) even though we only have
one list pointer.

The scheme is as follows:

1) with no entries in the list:
list_head == NULL

2) with 1 entry in the list:
list_head->next == NULL
list_head->prev == list_head

3) with 2 entries in the list:
list_head->next == element2
list_head->prev == element2
element2->prev == list_head
element2->next == NULL

4) with N entries in the list:
list_head->next == element2
list_head->prev == elementN
elementN->prev == element{N-1}
elementN->next == NULL

This allows us to find the tail of the list by using
list_head->prev, which means we can add to the end of the list in
O(1) time
*/


/*
add an element at the front of a list
*/
#define DLIST_ADD(list, p) \
do { \
if (!(list)) { \
(p)->prev = (list) = (p); \
(p)->next = NULL; \
} else { \
(p)->prev = (list)->prev; \
(list)->prev = (p); \
(p)->next = (list); \
(list) = (p); \
} \
} while (0)

/*
remove an element from a list
Note that the element doesn't have to be in the list. If it
isn't then this is a no-op
*/
#define DLIST_REMOVE(list, p) \
do { \
if ((p) == (list)) { \
if ((p)->next) (p)->next->prev = (p)->prev; \
(list) = (p)->next; \
} else if ((list) && (p) == (list)->prev) { \
(p)->prev->next = NULL; \
(list)->prev = (p)->prev; \
} else { \
if ((p)->prev) (p)->prev->next = (p)->next; \
if ((p)->next) (p)->next->prev = (p)->prev; \
} \
if ((p) != (list)) (p)->next = (p)->prev = NULL; \
} while (0)

/*
find the head of the list given any element in it.
Note that this costs O(N), so you should avoid this macro
if at all possible!
*/
#define DLIST_HEAD(p, result_head) \
do { \
(result_head) = (p); \
while (DLIST_PREV(result_head)) (result_head) = (result_head)->prev; \
} while(0)

/* return the last element in the list */
#define DLIST_TAIL(list) ((list)?(list)->prev:NULL)

/* return the previous element in the list. */
#define DLIST_PREV(p) (((p)->prev && (p)->prev->next != NULL)?(p)->prev:NULL)

/* insert 'p' after the given element 'el' in a list. If el is NULL then
this is the same as a DLIST_ADD() */
#define DLIST_ADD_AFTER(list, p, el) \
do { \
if (!(list) || !(el)) { \
DLIST_ADD(list, p); \
} else { \
(p)->prev = (el); \
(p)->next = (el)->next; \
(el)->next = (p); \
if ((p)->next) (p)->next->prev = (p); \
if ((list)->prev == (el)) (list)->prev = (p); \
}\
} while (0)


/*
add to the end of a list.
*/
#define DLIST_ADD_END(list, p) \
do { \
if (!(list)) { \
DLIST_ADD(list, p); \
} else { \
DLIST_ADD_AFTER(list, p, (list)->prev); \
} \
} while (0)

/* promote an element to the front of a list */
#define DLIST_PROMOTE(list, p) \
do { \
DLIST_REMOVE(list, p); \
DLIST_ADD(list, p); \
} while (0)

/*
demote an element to the end of a list.
*/
#define DLIST_DEMOTE(list, p) \
do { \
DLIST_REMOVE(list, p); \
DLIST_ADD_END(list, p); \
} while (0)

/*
concatenate two lists - putting all elements of the 2nd list at the
end of the first list.
*/
#define DLIST_CONCATENATE(list1, list2) \
do { \
if (!(list1)) { \
(list1) = (list2); \
} else { \
(list1)->prev->next = (list2); \
if (list2) { \
void *_tmplist = (void *)(list1)->prev; \
(list1)->prev = (list2)->prev; \
(list2)->prev = _tmplist; \
} \
} \
} while (0)

#endif /* _DLINKLIST_H */
2 changes: 1 addition & 1 deletion packaging/debian-multiarch/control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Source: sogo
Priority: optional
Maintainer: Inverse Support <[email protected]>
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, libmapi-dev, libmapistore-dev, libmapiproxy-dev, libwbxml2-dev (>= 0.11.2), liblasso3-dev (>= 2.3.5), python-minimal
Section: web
Standards-Version: 3.9.2

Expand Down
2 changes: 1 addition & 1 deletion packaging/debian-multiarch/control-no-openchange
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Source: sogo
Priority: optional
Maintainer: Inverse Support <[email protected]>
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 (>= 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), python-minimal
Section: web
Standards-Version: 3.9.2

Expand Down
2 changes: 1 addition & 1 deletion packaging/debian/control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Source: sogo
Priority: optional
Maintainer: Inverse Support <[email protected]>
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)
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), python-minimal
Section: web
Standards-Version: 3.9.1

Expand Down
2 changes: 1 addition & 1 deletion packaging/debian/control-squeeze
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Source: sogo
Priority: optional
Maintainer: Inverse Support <[email protected]>
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, libmapi-dev, libmapistore-dev, libmapiproxy-dev, libwbxml2-dev, 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, libmapi-dev, libmapistore-dev, libmapiproxy-dev, libwbxml2-dev, liblasso3-dev (>= 2.3.5), python-minimal
Section: web
Standards-Version: 3.9.1

Expand Down