]> git.pld-linux.org Git - packages/courier.git/blob - courier-certs.patch
perl 5.38.0 rebuild
[packages/courier.git] / courier-certs.patch
1 --- courier-0.78.2.orig/courier/configure.ac    2010-01-09 22:13:40.000000000 +0100
2 +++ courier-0.78.2/courier/configure.ac 2010-05-08 23:31:10.355976183 +0200
3 @@ -480,6 +480,12 @@
4  eval "datarootdir=$datarootdir"
5  eval "bindir=$bindir"
6  eval "localstatedir=$localstatedir"
7 +eval "datadir=$datadir"
8 +
9 +AC_ARG_WITH(certsdir, [ --with-certsdir Directory where certs are created ],
10 +certsdir="$withval", certsdir=$datadir)
11 +
12 +AC_SUBST(certsdir)
13  
14  MAILDROP="$bindir/maildrop"
15  AC_SUBST(MAILDROP)
16 --- courier-0.78.2.orig/courier/imapd-ssl.rc.in 2010-05-08 23:30:54.599915374 +0200
17 +++ courier-0.78.2/courier/imapd-ssl.rc.in      2010-05-08 23:31:10.355976183 +0200
18 @@ -28,6 +28,11 @@
19  
20  case $1 in
21  start)
22 +        # If we do not have a certificate, make one up.
23 +        if [ ! -f @certsdir@/imapd.pem ]; then
24 +        @sbindir@/mkimapdcert
25 +        fi
26 +
27         umask $IMAP_UMASK
28         @ULIMIT@ $IMAP_ULIMITD
29         @SETENV@ -i @SHELL@ -c " set -a ;
30 --- courier-0.78.2.orig/courier/module.esmtp/configure.ac       2008-07-12 22:17:24.000000000 +0200
31 +++ courier-0.78.2/courier/module.esmtp/configure.ac    2010-05-08 23:31:10.355976183 +0200
32 @@ -287,6 +287,11 @@
33  AC_SUBST(mydatadir)   # Quell automake warning
34  
35  
36 +AC_ARG_WITH(certsdir, [  --with-certsdir Directory where certs are created ],
37 +certsdir="$withval", certsdir=$datadir)
38 +
39 +AC_SUBST(certsdir)
40 +
41  dnl
42  dnl  Check what libraries are available
43  dnl
44 --- courier-0.78.2.orig/courier/module.esmtp/esmtpd.dist.in     2010-02-02 23:30:00.000000000 +0100
45 +++ courier-0.78.2/courier/module.esmtp/esmtpd.dist.in  2010-05-08 23:31:10.355976183 +0200
46 @@ -242,7 +242,7 @@
47  #
48  # This is an experimental feature.
49  
50 -TLS_CERTFILE=@mydatadir@/esmtpd.pem
51 +TLS_CERTFILE=@certsdir@/esmtpd.pem
52  
53  ##NAME: TLS_TRUSTCERTS:0
54  #
55 --- courier-0.78.2.orig/courier/module.esmtp/esmtpd-ssl.dist.in 2010-02-02 23:30:00.000000000 +0100
56 +++ courier-0.78.2/courier/module.esmtp/esmtpd-ssl.dist.in      2010-05-08 23:31:10.355976183 +0200
57 @@ -269,7 +269,7 @@
58  #
59  # This is an experimental feature.
60  
61 -TLS_CERTFILE=@mydatadir@/esmtpd.pem
62 +TLS_CERTFILE=@certsdir@/esmtpd.pem
63  
64  ##NAME: TLS_TRUSTCERTS:0
65  #
66 --- courier-0.78.2.orig/courier/module.esmtp/esmtpd-ssl.in      2010-05-08 23:30:54.612778263 +0200
67 +++ courier-0.78.2/courier/module.esmtp/esmtpd-ssl.in   2010-05-08 23:31:10.355976183 +0200
68 @@ -25,6 +25,10 @@
69  
70  case $1 in
71  start)
72 +       # If we do not have a certificate, make one up.
73 +       if [ ! -f @certsdir@/esmtpd.pem ]; then
74 +       @sbindir@/mkesmtpdcert
75 +       fi
76         ;;
77  stop)
78         ${sbindir}/couriertcpd -pid=$SSLPIDFILE -stop
79 --- courier-0.78.2/courier/module.esmtp/mkesmtpdcert.in.orig    2018-03-25 10:15:59.986631408 +0200
80 +++ courier-0.78.2/courier/module.esmtp/mkesmtpdcert.in 2018-03-25 11:27:37.983248999 +0200
81 @@ -11,7 +11,7 @@
82  PEMFILE="$1"
83  
84  if [ -z "$PEMFILE" ]; then
85 -       PEMFILE=@mydatadir@/esmtpd.pem
86 +       PEMFILE=@certsdir@/esmtpd.pem
87  fi
88  
89  if test "@ssllib@" = "openssl"
90 @@ -35,7 +35,7 @@
91         exit 1
92  }
93  
94 -cd @mydatadir@
95 +cd @certsdir@
96  umask 077
97  BITS="$BITS"
98  set -e
99 @@ -50,7 +50,7 @@
100                   -config @sysconfdir@/esmtpd.cnf -out "$PEMFILE" -keyout "$PEMFILE" || cleanup
101         @OPENSSL@ dhparam -2 -rand "$PEMFILE".rand 512 >>"$PEMFILE" || cleanup
102         @OPENSSL@ x509 -subject -dates -fingerprint -noout -in "$PEMFILE" || cleanup
103 -       rm -f @mydatadir@/esmtpd.rand
104 +       rm -f @certsdir@/esmtpd.rand
105  else
106         if test "$BITS" = ""
107         then
108 --- courier-0.78.2.orig/courier/pop3d-ssl.in    2010-05-08 23:30:54.612778263 +0200
109 +++ courier-0.78.2/courier/pop3d-ssl.in 2010-05-08 23:31:10.355976183 +0200
110 @@ -29,6 +29,11 @@
111  
112  case $1 in
113  start)
114 +        # If we do not have a certificate, make one up.
115 +        if [ ! -f @certsdir@/pop3d.pem ]; then
116 +        @sbindir@/mkpop3dcert
117 +        fi
118 +
119         exec @SETENV@ -i PATH="$PATH" SHELL="$SHELL" \
120                 @SHELL@ -c " set -a ; \
121                 prefix=@prefix@ ; \
122 --- courier-0.78.2.orig/courier.sysvinit.in     2010-05-08 23:30:54.612778263 +0200
123 +++ courier-0.78.2/courier.sysvinit.in  2010-05-08 23:31:10.355976183 +0200
124 @@ -18,7 +18,7 @@
125  sbindir="@sbindir@"
126  bindir="@bindir@"
127  libexecdir="@libexecdir@"
128 -datadir="@datadir@"
129 +certsdir="@certsdir@"
130  
131  if test ! -f ${sysconfdir}/esmtpd
132  then
133 @@ -85,7 +85,7 @@
134         then
135  # If we do not have a certificate, make one up.
136  
137 -               if test ! -f ${datadir}/esmtpd.pem
138 +               if test ! -f ${certsdir}/esmtpd.pem
139                 then
140                         if test -x $COURIERTLS
141                         then
142 @@ -152,7 +152,7 @@
143                         then
144  # If we do not have a certificate, make one up.
145  
146 -                               if test ! -f ${datadir}/pop3d.pem
147 +                               if test ! -f ${certsdir}/pop3d.pem
148                                 then
149                                         echo -n " generating-POP3-SSL-certificate..."
150  
151 @@ -182,7 +182,7 @@
152                         then
153  # If we do not have a certificate, make one up.
154  
155 -                               if test ! -f ${datadir}/imapd.pem
156 +                               if test ! -f ${certsdir}/imapd.pem
157                                 then
158                                         echo -n " generating-IMAP-SSL-certificate..."
159  
This page took 0.118684 seconds and 3 git commands to generate.