From David.Magda at oicr.on.ca Thu Apr 13 13:08:28 2017 From: David.Magda at oicr.on.ca (David Magda) Date: Thu, 13 Apr 2017 09:08:28 -0400 Subject: Bug#798677: sasl2-bin: include LDAP_SASLAUTHD file in the package Message-ID: <4dbcf39a-4964-7a74-445f-99f48635ba03@oicr.on.ca> Hello, Any news on this bug? I know that "cyrus-sasl2-doc" exists: https://packages.debian.org/search?keywords=cyrus-sasl2-doc and the file/s are in there, but given that the -doc package is "only" 250KB, perhaps it's easier to just put everything into the -bin package and have one less moving part to worry about. Also, to update my original report, the file's URL in the new git repo is: https://github.com/cyrusimap/cyrus-sasl/blob/master/saslauthd/LDAP_SASLAUTHD Regards, David From David.Magda at oicr.on.ca Thu Apr 13 15:33:30 2017 From: David.Magda at oicr.on.ca (David Magda) Date: Thu, 13 Apr 2017 11:33:30 -0400 Subject: Bug#798462: libsasl2-2: recreate and use /etc/sasl2/ for new installations Message-ID: <4d2bdfc8-33c8-d89e-9e59-972f0d9dd949@oicr.on.ca> I was reviewing some stuff and ran across this bug I filed a while ago. I do not know if this is the best way to do this, but: I have created a "preinst" script to try to create /etc/sasl2/ by default, but handle situations where /usr/lib/sasl2/ already exists (and create softlinks for compat). There is also a "postrm" script to try to handle the various clean-up situations. Please see attached. Regards, David -------------- next part -------------- #! /bin/sh set -e # We want to put configuration stuff in /etc/sasl2/, but have to deal # with legacy installations in /usr/lib/sasl2/. This script does # a bunch of tests to try create things in /etc while supporting # any 'legacy' installations (and docs) that use /usr. if [ -e /usr/lib/sasl2 ]; then # if something is there, leave it, and deal with legacy stuff if [ -L /usr/lib/sasl2 ]; then # If a link exists, assume it points somewhere useful if [ -e /etc/sasl2 ]; then # if something is there, just assume it does # something useful and move one exit 0 else # Create a link for compat ln -s /usr/lib/sasl2 /etc/sasl2 && exit 0 fi elif [ -d /usr/lib/sasl2 ]; then # If a dir exits, leave it alone if [ -e /etc/sasl2 ]; then # if something is there, just assume it does # something useful and move one exit 0 else # Create a link for compat ln -s /usr/lib/sasl2 /etc/sasl2 && exit 0 fi else # non-link, non-dir situation? manually have someone # look at it exit 10 fi else # nothing in /usr, so go with the new world order if [ -e /etc/sasl2 ]; then if [ -d /etc/sasl2 ]; then # Create a link for legacy support ln -s /etc/sasl2 /usr/lib/sasl2 && exit 0 elif [ -L /etc/sasl2 ]; then # Not sure why a link would exist, but assume it # points somewhere useful, and enable legacy support ln -s /etc/sasl2 /usr/lib/sasl2 && exit 0 else # non-link, non-dir situation? manually have someone # look at it exit 11 fi else # nothing in /etc, nor in /usr, # so do things in the new way mkdir /etc/sasl2 || exit 2 # create a link for legacy support ln -s /etc/sasl2 /usr/lib/sasl2 && exit 0 fi fi # We've reached an odd situation that is not covered by the above scenarios # so throw an error and have someone manually look at things. exit 20 # At some point in the future (Debian 10? 11?), /usr/lib/sasl2 should # go away, and only /etc/sasl2 should be used. # EOF -------------- next part -------------- #! /bin/sh set -e # For legacy reasons, the config files can be in two places, # so test the various scenarios and remove the object/s # in the appropriate way. if [ -e /usr/lib/sasl2 ]; then if [ -L /usr/lib/sasl2 ]; then rm /usr/lib/sasl2 || exit 10 elif [ -d /usr/lib/sasl2]; then # do not exit-out if it fails, as the contents may # have been left there on purpose rmdir /usr/lib/sasl2 else # non-link, non-dir situation? just keep going # instead of trying to be clever fi fi if [ -e /etc/sasl2 ]; then if [ -L /etc/sasl2 ]; then rm /etc/sasl2 || exit 20 elif [ -d /etc/sasl2 ]; then # do not exit-out if it fails, as the contents may # have been left there on purpose rmdir /etc/sasl2 else # non-link, non-dir situation? just keep going # instead of trying to be clever fi fi exit 0 # EOF