Projects
Kolab:3.4
cyrus-imapd
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 114
View file
cyrus-imapd.spec
Changed
@@ -262,6 +262,7 @@ %if 0%{?with_bdb} < 1 sed -i -e 's/,berkeley//g' cunit/db.testc +sed -r -i -e 's/"berkeley(|-[a-z-]+)", //g' lib/imapoptions %endif # only to update config.* files @@ -291,7 +292,6 @@ # enable idled in .conf files to prevent error messages %{__perl} -pi -e "s/# idled/ idled/" master/conf/*.conf - %build CPPFLAGS="%{?optflags} -I%{_includedir}/et -I%{_includedir}/kerberosIV"; export CPPFLAGS CFLAGS="%{?optflags} -fPIC"; export CFLAGS @@ -368,7 +368,6 @@ %{buildroot}%{_var}/spool/imap \ %{buildroot}%{_var}/lib/imap/{user,quota,proc,log,msg,socket,db,sieve,sync,md5,rpm,backup,meta} \ %{buildroot}%{_var}/lib/imap/ptclient \ - %{buildroot}%{_var}/lib/imap/rpm \ %{buildroot}%{_sysconfdir}/pki/%{_name} \ doc/contrib @@ -422,7 +421,7 @@ %{__install} -m 644 master/conf/*.conf doc/conf/ # Generate db config file -( grep '^{' lib/imapoptions | grep _db | cut -d'"' -f 2,4 | \ +( grep '^{' lib/imapoptions | grep _db | grep -v _db_path | cut -d'"' -f 2,4 | \ sed -e 's/^ *//' -e 's/-nosync//' -e 's/ *$//' -e 's/"/=/' echo sieve_version=2.2.3 ) | sort > %{buildroot}%{_var}/lib/imap/rpm/db.cfg @@ -594,7 +593,7 @@ %if 0%{?suse_version} %config(noreplace) %{_localstatedir}/adm/fillup-templates/sysconfig.%{_name} %else -%config(noreplace) %{_sysconfdir}/sysconfig/%{_name} +%attr(0640,root,%{_cyrusgroup}) %config(noreplace) %{_sysconfdir}/sysconfig/%{_name} %endif %config(noreplace) %{_sysconfdir}/pam.d/pop %config(noreplace) %{_sysconfdir}/pam.d/imap
View file
cyrus-imapd.cvt_cyrusdb_all
Changed
@@ -144,23 +144,23 @@ # make sure what we have is a valid instance # and that config files are present -if [ -n "$INSTANCE" ]; then +if [ -n "${INSTANCE}" ]; then [ -L /etc/rc.d/init.d/${BASENAME} ] || exit 0 fi -[ -f $CYRUSCONF ] || exit 0 -[ -f $IMAPDCONF ] || exit 0 +[ -f ${CYRUSCONF} ] || exit 0 +[ -f ${IMAPDCONF} ] || exit 0 -if [ -f $PIDFILE ]; then - read CYRUS_PID < $PIDFILE - if [ -n "$CYRUS_PID" ]; then - if ps -p $CYRUS_PID > /dev/null 2>&1; then +if [ -f ${PIDFILE} ]; then + read CYRUS_PID < ${PIDFILE} + if [ -n "${CYRUS_PID}" ]; then + if ps -p ${CYRUS_PID} > /dev/null 2>&1; then echo "ERROR: cyrus-master is running, unable to convert mailboxes!" exit 1 fi fi fi -if [ ! -f $IMAPDCONF ]; then +if [ ! -f ${IMAPDCONF} ]; then echo "ERROR: configuration file '${IMAPDCONF}' not found, exiting!" exit 1 fi @@ -174,7 +174,11 @@ # force cyrus user for security reasons if [ ! $(whoami) = "cyrus" ]; then - exec $RUNUSER - cyrus -c "cd $PWD < /dev/null ; INSTANCE=$INSTANCE $0 $*" + if [ ! -z "${INSTANCE}" ]; then + exec $RUNUSER -s /bin/bash - cyrus -c "cd \$HOME < /dev/null ; INSTANCE=${INSTANCE} $0 $*" + else + exec $RUNUSER -s /bin/bash - cyrus -c "cd \$HOME < /dev/null ; INSTANCE=$0 $*" + fi fi # special function for migration @@ -202,7 +206,7 @@ # extracts config option from config file get_config() { searchstr=$1 - if config="$(expand_config $IMAPDCONF | egrep "^${searchstr}:")"; then + if config="$(expand_config ${IMAPDCONF} | egrep "^${searchstr}:")"; then CFGVAL="$(printf "%s\n" "$config" | cut -d : -f 2- | sed -e 's/^[\t ]*//')" else if [ -z "$2" ]; then @@ -216,7 +220,7 @@ } # where to find files and directories -data_dir=/usr/share/cyrus-imapd/rpm +data_dir=/var/lib/imap/rpm lib_dir=/usr/lib/cyrus-imapd system_magic=$(file --version | awk '/magic file/ {print $4}') cyrus_magic=${data_dir}/magic @@ -233,39 +237,43 @@ . $db_cfg # get configured db backend config -duplicate_db=$(get_config duplicate_db $duplicate_db) || duplicate_db="skiplist" -mboxlist_db=$(get_config mboxlist_db $mboxlist_db) || mboxlist_db="skiplist" -seenstate_db=$(get_config seenstate_db $seenstate_db) || seenstate_db="skiplist" -subscription_db=$(get_config subscription_db $subscription_db) || subscription_db="skiplist" -tlscache_db=$(get_config tlscache_db $tlscache_db) || tlscache_db="skiplist" -annotation_db=$(get_config annotation_db $annotation_db) || annotation_db="skiplist" -mboxkey_db=$(get_config mboxkey_db $mboxkey_db) || mboxkey_db="skiplist" -ptscache_db=$(get_config ptscache_db $ptscache_db) || ptscache_db="skiplist" -quota_db=$(get_config quota_db $quota_db) || quota_db="quota_legacy" -statuscache_db=$(get_config statuscache_db $statuscache_db) || statuscache_db="skiplist" -userdeny_db=$(get_config userdeny_db $userdeny_db) || userdeny_db="skiplist" +annotation_db=$(get_config annotation_db $annotation_db) || annotation_db="twoskip" +duplicate_db=$(get_config duplicate_db $duplicate_db) || duplicate_db="twoskip" +mboxkey_db=$(get_config mboxkey_db $mboxkey_db) || mboxkey_db="twoskip" +mboxlist_db=$(get_config mboxlist_db $mboxlist_db) || mboxlist_db="twoskip" +ptscache_db=$(get_config ptscache_db $ptscache_db) || ptscache_db="twoskip" +quota_db=$(get_config quota_db $quota_db) || quota_db="twoskip" +seenstate_db=$(get_config seenstate_db $seenstate_db) || seenstate_db="twoskip" +statuscache_db=$(get_config statuscache_db $statuscache_db) || statuscache_db="twoskip" +subscription_db=$(get_config subscription_db $subscription_db) || subscription_db="twoskip" +tls_sessions_db=$(get_config tls_sessions_db $tls_sessions_db) || tls_sessions_db="twoskip" +userdeny_db=$(get_config userdeny_db $userdeny_db) || userdeny_db="flat" +zoneinfo_db=$(get_config zoneinfo_db $zoneinfo_db) || zoneinfo_db="twoskip" # remember current db backend config { -echo "duplicate_db=${duplicate_db}" -echo "mboxlist_db=${mboxlist_db}" -echo "seenstate_db=${seenstate_db}" -echo "subscription_db=${subscription_db}" -echo "tlscache_db=${tlscache_db}" echo "annotation_db=${annotation_db}" +echo "duplicate_db=${duplicate_db}" echo "mboxkey_db=${mboxkey_db}" +echo "mboxlist_db=${mboxlist_db}" echo "ptscache_db=${ptscache_db}" echo "quota_db=${quota_db}" +echo "seenstate_db=${seenstate_db}" echo "statuscache_db=${statuscache_db}" -echo "userdeny_db=${userdeny_db}" echo "sieve_version=${sieve_version}" +echo "subscription_db=${subscription_db}" +echo "tls_sessions_db=${tlscache_db}" +echo "userdeny_db=${userdeny_db}" +echo "zoneinfo_db=${zoneinfo_db}" } | sort > $db_current # file_type <file> file_type() { this_type=$(file -b -m "${cyrus_magic}:${system_magic}" "$1" 2> /dev/null) - if echo "$this_type" | grep -qi skip > /dev/null 2>&1; then + if echo "$this_type" | grep -qi skiplist > /dev/null 2>&1; then echo skiplist + elif echo "$this_type" | grep -qi twoskip > /dev/null 2>&1; then + echo twoskip elif echo "$this_type" | grep -qi text > /dev/null 2>&1; then echo flat else @@ -368,25 +376,27 @@ if [ "$EXPORT" = "export" ]; then # convert all db files to portable format for migration # TODO: quota_db, we don't touch it for now - cvt_file ${imap_prefix}/deliver.db "skiplist" - cvt_file ${imap_prefix}/mailboxes.db "skiplist" - cvt_file ${imap_prefix}/tls_sessions.db "skiplist" - cvt_file ${imap_prefix}/annotations.db "skiplist" - cvt_file ${imap_prefix}/ptclient/ptscache.db "skiplist" - cvt_file ${imap_prefix}/statuscache.db "skiplist" + cvt_file ${imap_prefix}/annotations.db "twoskip" + cvt_file ${imap_prefix}/deliver.db "twoskip" + cvt_file ${imap_prefix}/mailboxes.db "twoskip" + cvt_file ${imap_prefix}/ptclient/ptscache.db "twoskip" + cvt_file ${imap_prefix}/statuscache.db "twoskip" + cvt_file ${imap_prefix}/tls_sessions.db "twoskip" cvt_file ${imap_prefix}/user_deny.db "flat" + cvt_file ${imap_prefix}/zoneinfo.db "skiplist" rm -vf ${imap_prefix}/db/log.* rm -vf ${imap_prefix}/db/__db.* else # always convert db files which have been converted to skiplist # TODO: quota_db, we don't touch it for now + cvt_file ${imap_prefix}/annotations.db "$annotation_db" cvt_file ${imap_prefix}/deliver.db "$duplicate_db" cvt_file ${imap_prefix}/mailboxes.db "$mboxlist_db" - cvt_file ${imap_prefix}/tls_sessions.db "$tlscache_db" - cvt_file ${imap_prefix}/annotations.db "$annotation_db" cvt_file ${imap_prefix}/ptclient/ptscache.db "$ptscache_db" cvt_file ${imap_prefix}/statuscache.db "$statuscache_db" + cvt_file ${imap_prefix}/tls_sessions.db "$tlscache_db" cvt_file ${imap_prefix}/user_deny.db "$userdeny_db" + cvt_file ${imap_prefix}/zoneinfo.db "$zoneinfo_db" # do we have to convert all databases? if ! cmp -s $db_current $db_cache; then # we treat sieve scripts the same way like db files
View file
cyrus-imapd.sysconfig
Changed
@@ -3,7 +3,7 @@ # Export/import (0) the databases to assist with database conversions, # or use Cyrus IMAP 2.4's autoconversion upgrade capabilities (1) -QUICK=1 +QUICK=0 # In RPM install / update / upgrade %post, make sure all files in # Cyrus (meta-)partitions and configuration directories are set +S
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.