On Wed, Apr 1, 2009 at 12:52 PM, John Simpson <j...@jms1.net> wrote:

> On 2009-03-30, at 0844, Matt Brookings wrote:
>
>>
>> I think the build system needs is a way to stop the -o and -g statements
>> when building a package, and to use them when not.  Most everyone has
>> been installing vpopmail from source, and I have a feeling many will
>> continue
>> to.  We can't remove setting of permissions altogether because then people
>> who used source would have to manually fix permissions.
>>
>
> here's an idea... why not include a utility which sets the ownerships and
> permissions correctly?
>
Actually the program is not needed. One needs to fix configure.in and
Makefile.am. I am giving an example what should be in Makefile.am. This is
from a extremely hacked version of vpopmail. I am generating both rpm as
well as source installation.

The userid is needed only to figure out the home directory where vpopmail
needs to be installed. This can be fixed by changing configure.in

FILE - Makefile.am

install-data-local: initsvc libvpopmail.la vpopma...@version@-rpmlintrc
indimail.spec
    if [ " $(DESTDIR)" = " " ] ; then \
        if test `...@idcommand@` != "0" ; then \
            echo "you are not root"; \
            exit 1; \
        fi ; \
        echo "Shutting down vpopmail"; \
        svc -d /service/*; \
    fi;

# This is the last step in vpopmail installation. Post this installation
will start in qmail
# Hence we still cannot start svscan.
install-data-hook:
    $(INSTALL_DATA) config.h $(DESTDIR)@prefix@/include/indimail_config.h ||
exit 1
    $(INSTALL_DATA) data/wordlist.db $(DESTDIR)@prefix@/etc/wordlist.db  ||
exit 1
    for f in $(doc_list); do \
        /bin/mkdir -p $(DESTDIR)@prefix@/doc; \
        $(INSTALL_DATA) doc/$$f $(DESTDIR)@prefix@/doc/$$f || exit 1 ;\
    done
    if test `...@idcommand@` = "0" ; then \
        for f in $(setuid_list); do \
            if [ -f $(DESTDIR)@prefix@/bin/$$f ] ; then \
                echo "chown root $(DESTDIR)@prefix@/bin/$$f"; \
                chown root $(DESTDIR)@prefix@/bin/$$f; \
                echo "chmod 4555 $(DESTDIR)@prefix@/bin/$$f"; \
                chmod 4555 $(DESTDIR)@prefix@/bin/$$f; \
            fi;  \
        done; \
        chown vpopmail.vchkpw $(DESTDIR)@prefix@/etc/wordlist.db || exit 1;
\
    fi


!DSPAM:49d34f3532681317917420!

Reply via email to