wok diff dovecot/receipt @ rev 25071
waterline-plugin-multiload: added build dependencies
author | Hans-G?nter Theisgen |
---|---|
date | Sat Jun 11 09:07:17 2022 +0100 (2022-06-11) |
parents | bfabe25c21ff |
children | c370be1be30e |
line diff
1.1 --- a/dovecot/receipt Sun Feb 13 18:01:32 2022 +0000 1.2 +++ b/dovecot/receipt Sat Jun 11 09:07:17 2022 +0100 1.3 @@ -1,7 +1,7 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="dovecot" 1.7 -VERSION="2.3.9.2" 1.8 +VERSION="2.3.18" 1.9 CATEGORY="network" 1.10 SHORT_DESC="Dovecot IMAP and POP3 Server." 1.11 MAINTAINER="l.lemarinel@gmail.com" 1.12 @@ -12,8 +12,9 @@ 1.13 WGET_URL="https://www.dovecot.org/releases/${VERSION:0:3}/$TARBALL" 1.14 1.15 DEPENDS="libcap libmysqlclient libssl openldap pam postgresql" 1.16 -BUILD_DEPENDS="libcap-dev libmysqlclient mysql-dev openldap-dev 1.17 - openssl-dev pam-dev postgresql-dev sqlite-dev" 1.18 +BUILD_DEPENDS="libcap-dev libmysqlclient libpostgresqlclient 1.19 + mysql-dev openldap-dev openssl-dev pam-dev 1.20 + postgresql-dev sqlite-dev" 1.21 1.22 # What is the latest version available today? 1.23 current_version() 1.24 @@ -27,7 +28,7 @@ 1.25 { 1.26 ./configure \ 1.27 --prefix=/usr \ 1.28 - --sysconfdir=/etc/dovecot \ 1.29 + --sysconfdir=/etc \ 1.30 --localstatedir=/var \ 1.31 --libexecdir=/usr/lib/$PACKAGE \ 1.32 --with-ldap=plugin \ 1.33 @@ -38,55 +39,49 @@ 1.34 --with-ssl=openssl \ 1.35 $CONFIGURE_ARGS && 1.36 make && 1.37 - make DESTDIR=$DESTDIR install 1.38 - 1.39 + make install DESTDIR=$DESTDIR 1.40 } 1.41 1.42 # Rules to gen a SliTaz package suitable for Tazpkg. 1.43 genpkg_rules() 1.44 { 1.45 + mkdir -p $fs/etc/ssl/misc 1.46 mkdir -p $fs/usr/lib 1.47 mkdir -p $fs/var/log/dovecot 1.48 - mkdir -p $fs/etc/ssl/misc 1.49 1.50 - cp -a $install/usr/sbin $fs/usr 1.51 - cp -a $install/usr/bin $fs/usr 1.52 - cp -a $install/usr/lib $fs/usr 1.53 - cp -a $install/etc $fs 1.54 - 1.55 - cp -pa $stuff/init.d $fs/etc 1.56 + cp -a $install/etc $fs 1.57 + cp -a $install/usr/bin $fs/usr 1.58 + cp -a $install/usr/lib $fs/usr 1.59 + cp -a $install/usr/sbin $fs/usr 1.60 1.61 - #cp -pa $fs/etc/dovecot/dovecot-example.conf $fs/etc/dovecot/dovecot.conf 1.62 + cp -pa $stuff/init.d $fs/etc 1.63 cp -pa $install/usr/share/doc/dovecot/example-config/* \ 1.64 - $fs/etc/dovecot/ 1.65 - #cp -pa $src/doc/example-config/conf.d/*.conf $fs/etc/dovecot/conf.d 1.66 - #cp -pa $src/doc/example-config/conf.d/*.ext $fs/etc/dovecot/conf.d 1.67 - cp -pa $src/doc/*.cnf $fs/etc/ssl 1.68 - cp -pa $src/doc/mkcert.sh \ 1.69 - $fs/etc/ssl/misc/dovmkcert.sh 1.70 + $fs/etc/dovecot 1.71 + cp -pa $src/doc/*.cnf $fs/etc/ssl 1.72 + cp -pa $src/doc/mkcert.sh $fs/etc/ssl/misc/dovmkcert.sh 1.73 1.74 # Remove archive files *.*a 1.75 - find $fs -name "*.*a" -exec rm -f {} \; 1.76 - 1.77 + find $fs -name "*.*a" -exec rm -f {} \; 1.78 + 1.79 # Fix permissions 1.80 - chmod 755 $fs/etc/ssl/misc/* 1.81 + chmod 755 $fs/etc/ssl/misc/* 1.82 1.83 # Customising configuration. 1.84 - sed -i -e "s/^#default_vsz_limit.*/default_vsz_limit = 50M/" \ 1.85 - $fs/etc/dovecot/conf.d/10-master.conf 1.86 + sed -i -e "s|^#default_vsz_limit.*|default_vsz_limit = 50M|" \ 1.87 + $fs/etc/dovecot/conf.d/10-master.conf 1.88 1.89 - sed -i -e "s!^#log_path =.*!log_path = /var/log/dovecot/dovecot.log!" \ 1.90 - $fs/etc/dovecot/conf.d/10-logging.conf 1.91 - 1.92 - sed -i -e "s/^#listen.*/listen = */" \ 1.93 - $fs/etc/dovecot/dovecot.conf 1.94 + sed -i -e "s|^#log_path =.*|log_path = /var/log/dovecot/dovecot.log|" \ 1.95 + $fs/etc/dovecot/conf.d/10-logging.conf 1.96 + 1.97 + sed -i -e "s|^#listen.*|listen = *|" \ 1.98 + $fs/etc/dovecot/dovecot.conf 1.99 1.100 # Unsafe, see CVE-2014-3566 POODLE 1.101 - sed -i -e "s/^#ssl_protocols =.*/ssl_protocols = !SSLv2 !SSLv3/" \ 1.102 - $fs/etc/dovecot/conf.d/10-ssl.conf 1.103 + sed -i -e "s|^#ssl_protocols =.*|ssl_protocols = !SSLv2 !SSLv3|" \ 1.104 + $fs/etc/dovecot/conf.d/10-ssl.conf 1.105 } 1.106 1.107 -#nd post install commands for Tazpkg. 1.108 +# Post install commands for Tazpkg. 1.109 post_install() 1.110 { 1.111 local user 1.112 @@ -98,7 +93,7 @@ 1.113 if ! grep -q $user "$1/etc/passwd" 1.114 then 1.115 echo 1.116 - echo -n "Adding user/group $user..." 1.117 + echo -n "Adding user and group $user..." 1.118 chroot "$1/" addgroup -g 76 -S $group 1.119 chroot "$1/" adduser -u 76 -S -D -H -G $group $user 1.120 chroot "$1/" adduser -u 74 -S -D -H -G nogroup dovenull 1.121 @@ -108,6 +103,10 @@ 1.122 # Set permissions for files and directories 1.123 chroot "$1/" chown -R ${user}.${group} /var/log/${user} \ 1.124 1.125 + # Create certificate, if neccessary 1.126 + [ -f "$1/etc/ssl/certs/dovecot.pem" ] || 1.127 + chroot "$1/" sh -c 'cd etc/ssl; ./misc/dovmkcert.sh' 1.128 + 1.129 cat <<EOF 1.130 ---- 1.131 To start $PACKAGE server you can run : 1.132 @@ -119,14 +118,14 @@ 1.133 EOF 1.134 } 1.135 1.136 - 1.137 +# Post remove commands for Tazpkg. 1.138 post_remove() 1.139 { 1.140 - echo "Removing stalled files..." 1.141 + echo "Removing obsolete files..." 1.142 test -d "$1/var/log/dovecot" && rm -rf "$1/var/log/dovecot" 1.143 test -d "$1/var/run/dovecot" && rm -rf "$1/var/run/dovecot" 1.144 1.145 - echo "Removing user/group daemon" 1.146 + echo "Removing user and group dovecot" 1.147 chroot "$1/" deluser dovecot 1.148 chroot "$1/" deluser dovenull 1.149 }