~ubuntu-branches/ubuntu/lucid/dovecot/lucid-security

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug, Ante Karamatic, Mathias Gug
  • Date: 2009-02-12 21:45:09 UTC
  • mfrom: (1.10.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20090212214509-8fp69kpkzf03j5xg
Tags: 1:1.1.11-0ubuntu1
[ Ante Karamatic ]
  Add new binary pkg dovecot-postfix that integrates postfix and dovecot
  automatically: (LP: #164837)
  - debian/control:
    + add new binary with short description.
  - debian/dovecot-postfix.postinst:
    + create initial certificate symlinks to snakeoil.
    + set up postfix with postconf to:
      - use Maildir/ as the default mailbox.
      - use dovecot as the sasl authentication  server.
      - use dovecot LDA (deliver).
      - use tls for smtp{d} services.
    + restart postfix and dovecot.
  - debian/dovecot-postfix.postrm:
    + remove all dovecot related configuration from postfix.
    + restart postfix and dovecot.
  - debian/dovecot-common.init:
    + check if /etc/dovecot/dovecot-postfix.conf exists and use it
      as the configuration file if so.
  - debian/patches/warning-ubuntu-postfix.dpatch
    + add warning about dovecot-postfix.conf in dovecot default 
      configuration file.
  - debian/patches/dovecot-postfix.conf.diff:
    + Ubuntu server custom changes to the default dovecot configuration for
      better integration with postfix:
      - enable imap, pop3, imaps, pop3s and managesieve by default.
      - enable dovecot LDA (deliver).
      - enable SASL auth socket in postfix private directory.
  - debian/rules:
    + copy, patch and install dovecot-postfix.conf in /etc/dovecot/.
  
[ Mathias Gug ]
* New upstream release:
* Update dovecot-managesieve to 0.10.5. Fixes:
  - check if names of sieve scripts contain '/' (LP: #307291)
* Update dovecot-managesieve patch for 1.1.11 and 0.10.5.
* Update dovecot-sieve plugin to 1.1.6.
* Merge from debian experimental, remaining changes:
  - Use Snakeoil SSL certificates by default.
    + debian/control: Depend on ssl-cert
    + debian/paptches/ssl-cert-snakeoil.dpatch: Change default SSL cert 
      paths to snakeoil.
    + debian/dovecot-common.postinst: Relax grep for SSL_* a bit.
  - Add autopkgtest in debian/tests/*.
  - debian/dovecot-common.init: Check to see if there is an /etc/inetd.conf.
    (LP: #208411)
  - Fast TearDown: Update lsb init header to not stop in level 6.
  - Add status action to the init script:
    + debian/control: Depend on lsb >= 3.2.12ubuntu3.
    + debian/dovecot-common-init: Add the 'status' action (LP: #247096).
  - debian/rules:
    - Copy config.{guess,sub} after running libtoolize.
    - Clean dovecot-managesieve directory.
  - Add ufw integration: 
    - Created debian/dovecot-common.ufw.profile
    - debian/rules:
      + install profile
    - debian/control
      + Suggest ufw
  - debian/{control,rules}: enable PIE hardening.
  - Updated dovecot.common.README.Debian with information on what has changed 
    between 1.0 and 1.1.1. Fixes (LP: #257625) 
  - dovecot-imapd, dovecot-pop3: Replaces dovecot-common (<< 1:1.1). LP: #254721.
  - debian/control:
    + Update Vcs-* headers.
* debian/rules:
  - Create emtpy stamp.h.in files in dovecot-sieve/ and dovecot-managesieve/
    if they're not there since empty files are not included in the diff.gz 
    file.
* Dropped:
  - debian/patches/fix-message-parser.dpatch: Parsing an invalid message
    address like "From: (" caused an assert-crash. (LP: #290901).
    (CVE-2008-4907 - fixed in 1.1.6)
  - debian/patches/login-max-process-count-warning.dpatch: Tell the user 
    that they have reached the maximum number of processes count.
    (LP: #189616) - Different implementation from upstream.
  - debian/patches/fix-dovecot-sieve.dpatch: Fixes assertion error
    when a header string ends with a LF (LP: #264306). Implemented upstream.
  - Don't fail in postinst if dovecot-{sql,ldap} is missing. (LP: #153161)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
          cp -f /usr/share/misc/config.sub config.sub
26
26
        -test -r /usr/share/misc/config.guess && \
27
27
          cp -f /usr/share/misc/config.guess config.guess
28
 
#       aclocal-1.9; automake-1.9 --add-missing --copy; libtoolize -f -c;  aclocal-1.9; autoconf
29
 
        aclocal-1.9
30
 
        automake-1.9 --add-missing --copy
31
 
        libtoolize -f -c
32
 
        -test -r /usr/share/misc/config.sub && \
33
 
          cp -f /usr/share/misc/config.sub config.sub
34
 
        -test -r /usr/share/misc/config.guess && \
35
 
          cp -f /usr/share/misc/config.guess config.guess
36
 
        aclocal-1.9
37
 
        autoconf
 
28
        aclocal-1.9 && automake-1.9 --add-missing --copy && libtoolize -f -c && aclocal-1.9 && autoconf
38
29
        # Add here commands to configure the package.
39
30
        ./configure --with-ldap \
40
31
                    --with-ssl=openssl \
54
45
                    --localstatedir=/var \
55
46
                    --mandir=\$${prefix}/share/man \
56
47
                    --infodir=\$${prefix}/share/info \
57
 
                    --with-moduledir=\$${prefix}/lib/dovecot/modules
58
 
 
 
48
                    --with-moduledir=\$${prefix}/lib/dovecot/modules \
 
49
                                --disable-static
59
50
        # dovecot-sieve plugin
60
 
        ( \
61
 
          cd dovecot-sieve/ && aclocal-1.9; \
62
 
          automake-1.9 --add-missing; libtoolize -f -c; \
63
 
          test -r /usr/share/misc/config.sub && \
64
 
            cp -f /usr/share/misc/config.sub config.sub; \
65
 
          test -r /usr/share/misc/config.guess && \
66
 
            cp -f /usr/share/misc/config.guess config.guess; \
67
 
          aclocal-1.9; autoconf \
68
 
        )
69
 
 
 
51
        -test -r /usr/share/misc/config.sub && \
 
52
          mv dovecot-sieve/config.sub dovecot-sieve/config.sub.orig && \
 
53
          cp -f /usr/share/misc/config.sub dovecot-sieve/config.sub
 
54
        -test -r /usr/share/misc/config.guess && \
 
55
          mv dovecot-sieve/config.guess dovecot-sieve/config.guess.orig && \
 
56
          cp -f /usr/share/misc/config.guess dovecot-sieve/config.guess
 
57
        [ ! -e dovecot-sieve/stamp.h.in ] && touch dovecot-sieve/stamp.h.in
 
58
        (cd dovecot-sieve/ && aclocal-1.9 && automake-1.9 --add-missing --copy && libtoolize -f -c && aclocal-1.9 && autoconf)
70
59
        # dovecot-managesieve module
71
 
        ( \
72
 
          cd dovecot-managesieve/ && aclocal-1.9; \
73
 
          automake-1.9 --add-missing; libtoolize -f -c; \
74
 
          test -r /usr/share/misc/config.sub && \
75
 
            cp -f /usr/share/misc/config.sub config.sub; \
76
 
          test -r /usr/share/misc/config.guess && \
77
 
            cp -f /usr/share/misc/config.guess config.guess; \
78
 
          aclocal-1.9; autoconf \
79
 
        )
 
60
        -test -r /usr/share/misc/config.sub && \
 
61
          mv dovecot-managesieve/config.sub dovecot-managesieve/config.sub.orig && \
 
62
          cp -f /usr/share/misc/config.sub dovecot-managesieve/config.sub
 
63
        -test -r /usr/share/misc/config.guess && \
 
64
          mv dovecot-managesieve/config.guess dovecot-managesieve/config.guess.orig && \
 
65
          cp -f /usr/share/misc/config.guess dovecot-managesieve/config.guess
 
66
        cp dovecot-managesieve/README dovecot-managesieve/managesieve.README
 
67
        [ ! -e dovecot-managesieve/stamp.h.in ] && touch dovecot-managesieve/stamp.h.in
 
68
        (cd dovecot-managesieve/ && aclocal-1.9 && automake-1.9 --add-missing --copy && libtoolize -f -c && aclocal-1.9 && autoconf)
80
69
 
81
70
build: build-stamp
82
 
 
83
 
 
84
71
build-stamp:  config.status
85
72
        dh_testdir
86
 
 
87
73
        # Add here commands to compile the package.
88
74
        $(MAKE)
89
 
 
90
75
        # dovecot-sieve plugin
91
76
        (cd dovecot-sieve/ && ./configure --with-dovecot=../ \
92
77
                --prefix=/usr \
93
78
                --libexecdir=\$${prefix}/lib \
94
79
                --with-moduledir=\$${prefix}/lib/dovecot/modules)
95
80
        $(MAKE) -C dovecot-sieve
96
 
 
97
81
        # dovecot-managesieve module
98
82
        (cd dovecot-managesieve/ && ./configure --with-dovecot=../ \
99
83
                --with-dovecot-sieve=../dovecot-sieve/ \
100
84
                --prefix=/usr \
101
85
                --libexecdir=\$${prefix}/lib)
102
86
        $(MAKE) -C dovecot-managesieve
103
 
 
104
87
        # DRAC
105
88
        cd src/plugins/drac && $(MAKE)
106
89
        touch build-stamp
115
98
        [ ! -f dovecot-managesieve/Makefile ] || $(MAKE) -C dovecot-managesieve distclean
116
99
        rm -f conftest conftest.o config.log config.cache config.status ylwrap
117
100
        [ -f config.sub.orig ] && mv config.sub.orig config.sub || true
 
101
        [ -f dovecot-sieve/config.sub.orig ] && mv dovecot-sieve/config.sub.orig dovecot-sieve/config.sub || true
 
102
        [ -f dovecot-managesieve/config.sub.orig ] && mv dovecot-managesieve/config.sub.orig dovecot-managesieve/config.sub || true
 
103
        [ -f dovecot-managesieve/managesieve.README ] && rm dovecot-managesieve/managesieve.README || true
118
104
        [ -f config.guess.orig ] && mv config.sub.orig config.guess || true
 
105
        [ -f dovecot-sieve/config.guess.orig ] && mv dovecot-sieve/config.sub.orig dovecot-sieve/config.guess || true
 
106
        [ -f dovecot-managesieve/config.guess.orig ] && mv dovecot-managesieve/config.sub.orig dovecot-managesieve/config.guess || true
119
107
        rm -f src/plugins/drac/drac.so
120
108
        dh_clean
121
109
 
124
112
        dh_testroot
125
113
        dh_clean -k
126
114
        dh_installdirs
127
 
 
128
115
        # Add here commands to install the package into debian/dovecot.
129
116
        $(MAKE) install prefix=$(CURDIR)/debian/dovecot-common/usr sysconfdir=$(CURDIR)/debian/dovecot-common/etc/dovecot
130
117
        $(MAKE) -C dovecot-sieve install DESTDIR=$(CURDIR)/debian/dovecot-common
149
136
        rm $(CURDIR)/debian/dovecot-common/etc/dovecot/dovecot-sql-example.conf
150
137
        chmod 0700 $(CURDIR)/debian/dovecot-common/var/run/dovecot
151
138
        chmod 0750 $(CURDIR)/debian/dovecot-common/var/run/dovecot/login
 
139
        cp $(CURDIR)/debian/dovecot-common/usr/share/dovecot/dovecot.conf $(CURDIR)/debian/dovecot-postfix/usr/share/dovecot/dovecot-postfix.conf
 
140
        patch -p0 -d $(CURDIR)/debian/dovecot-postfix/usr/share/dovecot/ -i $(CURDIR)/debian/patches/dovecot-postfix.conf.diff
 
141
        [ -f $(CURDIR)/debian/dovecot-postfix/usr/share/dovecot/dovecot-postfix.conf.orig ] && rm $(CURDIR)/debian/dovecot-postfix/usr/share/dovecot/dovecot-postfix.conf.orig || true
 
142
 
152
143
 
153
144
# Build architecture-independent files here.
154
145
binary-indep: build install