diff options
author | Tijl Coosemans <tijl@FreeBSD.org> | 2014-09-07 16:12:36 +0000 |
---|---|---|
committer | Tijl Coosemans <tijl@FreeBSD.org> | 2014-09-07 16:12:36 +0000 |
commit | a3566cb26e899957c3833d9fb9f57521628bdec8 (patch) | |
tree | 3d7499b804ea96daf352a456ee9ccb65be0ab8e7 /security/courier-authlib/files | |
parent | Update to 3.1.6. (diff) |
*/courier-authlib*:
- Add USES=libtool
- Remove USE_LDCONFIG, not needed for modules
- Disable static modules
- Remove install-configure from INSTALL_TARGET, no impact with staging
- Add manpages to pkg-plist
- Use @sample
- Replace pkg-(de)install and pre-install target with USERS and GROUPS
- Create /var/run/authdaemond at package installation instead of in rc
script
Diffstat (limited to 'security/courier-authlib/files')
-rw-r--r-- | security/courier-authlib/files/courier-authdaemond.in | 21 | ||||
-rw-r--r-- | security/courier-authlib/files/patch-Makefile.in | 124 | ||||
-rw-r--r-- | security/courier-authlib/files/pkg-deinstall.in | 28 | ||||
-rw-r--r-- | security/courier-authlib/files/pkg-install.in | 40 |
4 files changed, 63 insertions, 150 deletions
diff --git a/security/courier-authlib/files/courier-authdaemond.in b/security/courier-authlib/files/courier-authdaemond.in index c70cb56f41c8..8381df4b2f3d 100644 --- a/security/courier-authlib/files/courier-authdaemond.in +++ b/security/courier-authlib/files/courier-authdaemond.in @@ -12,8 +12,6 @@ exec_prefix="${prefix}" sysconfdir="${prefix}/etc/authlib" sbindir="${exec_prefix}/sbin" bindir="${exec_prefix}/bin" -libdir="${prefix}/lib/courier-authlib" -libexecdir="${prefix}/libexec/courier-authlib" authdaemonvar="%%AUTHDAEMONVAR%%" # Define these courier_authdaemond_* variables in one of these files: @@ -31,31 +29,14 @@ name="courier_authdaemond" rcvar=courier_authdaemond_enable command="${sbindir}/authdaemond" -procname="${sbindir}/courierlogger" pidfile="${authdaemonvar}/pid" socket="${authdaemonvar}/socket" -start_precmd="${name}_prestart" start_cmd="${command} start" -stop_precmd="echo 'Stopping ${name}.'" stop_cmd="${command} stop" stop_postcmd="rm -f ${pidfile} ${pidfile}.lock ${socket}" +required_dirs="${authdaemonvar}" required_files="${sysconfdir}/authdaemonrc" -courier_authdaemond_prestart() -{ - if [ ! -d "${authdaemonvar}" ] ; then - install -o %%MAILOWN%% -g %%MAILGRP%% -m 0750 -d "${authdaemonvar}" - if [ $? -ne 0 ] ; then - echo "Creating ${authdaemonvar} with the correct permissions was not possible!" - return 1 - fi - fi - /sbin/ldconfig -m "${libdir}" - echo "Starting ${name}." -} - load_rc_config $name run_rc_command "$1" - - diff --git a/security/courier-authlib/files/patch-Makefile.in b/security/courier-authlib/files/patch-Makefile.in index d32eb9754d12..247de27c3a4b 100644 --- a/security/courier-authlib/files/patch-Makefile.in +++ b/security/courier-authlib/files/patch-Makefile.in @@ -113,17 +113,6 @@ man_MANS = $(man1) $(man3) auth_sasl_ex.3 BUILT1 = authlib.html authldaprc.h authmysqlrc.h authpgsqlrc.h authpiperc.h \ authdaemonrc.h packageversion.h \ -@@ -935,8 +956,8 @@ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \ -- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ -- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ -+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) -m 0444 $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ -+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) -m 0444 $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ - } - - uninstall-pkglibLTLIBRARIES: @@ -989,6 +1010,9 @@ libauthuserdb.la: $(libauthuserdb_la_OBJECTS) $(libauthuserdb_la_DEPENDENCIES) $(EXTRA_libauthuserdb_la_DEPENDENCIES) $(AM_V_CCLD)$(libauthuserdb_la_LINK) $(libauthuserdb_la_OBJECTS) $(libauthuserdb_la_LIBADD) $(LIBS) @@ -151,28 +140,6 @@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -1328,8 +1355,8 @@ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ -- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ -- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ -+ echo " install -o root -g wheel -m 444 '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ -+ install -o root -g wheel -m 444 "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ -@@ -1371,8 +1398,8 @@ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ -- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ -- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ -+ echo " install -o root -g wheel -m 444 '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ -+ install -o root -g wheel -m 444 "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ @@ -1771,18 +1798,26 @@ info-am: @@ -208,7 +175,7 @@ install-html: install-html-recursive install-html-am: -@@ -1862,6 +1897,12 @@ +@@ -1862,14 +1897,20 @@ uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS @@ -221,6 +188,30 @@ authpgsqllib.lo: authpgsqllib.c authpgsqlrc.h @HAVE_AUTHPGSQL_TRUE@install-authpgsqlrc: + @HAVE_AUTHPGSQL_TRUE@ $(mkinstalldirs) $(DESTDIR)`dirname @authpgsqlrc@` || : + @HAVE_AUTHPGSQL_TRUE@ $(INSTALL_DATA) -m 660 $(srcdir)/authpgsqlrc \ +-@HAVE_AUTHPGSQL_TRUE@ $(DESTDIR)@authpgsqlrc@.dist +-@HAVE_AUTHPGSQL_TRUE@ -chown @mailuser@ $(DESTDIR)@authpgsqlrc@.dist +-@HAVE_AUTHPGSQL_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authpgsqlrc@.dist ++@HAVE_AUTHPGSQL_TRUE@ $(DESTDIR)@authpgsqlrc@.sample ++@HAVE_AUTHPGSQL_TRUE@ -chown @mailuser@ $(DESTDIR)@authpgsqlrc@.sample ++@HAVE_AUTHPGSQL_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authpgsqlrc@.sample + + @HAVE_AUTHPGSQL_TRUE@uninstall-authpgsqlrc: + @HAVE_AUTHPGSQL_TRUE@ rm -f $(DESTDIR)@authpgsqlrc@.dist +@@ -1888,9 +1929,9 @@ + @HAVE_LDAP_TRUE@install-authldaprc: + @HAVE_LDAP_TRUE@ $(mkinstalldirs) $(DESTDIR)`dirname @authldaprc@` || : + @HAVE_LDAP_TRUE@ $(INSTALL_DATA) -m 660 $(srcdir)/authldaprc \ +-@HAVE_LDAP_TRUE@ $(DESTDIR)@authldaprc@.dist +-@HAVE_LDAP_TRUE@ -chown @mailuser@ $(DESTDIR)@authldaprc@.dist +-@HAVE_LDAP_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authldaprc@.dist ++@HAVE_LDAP_TRUE@ $(DESTDIR)@authldaprc@.sample ++@HAVE_LDAP_TRUE@ -chown @mailuser@ $(DESTDIR)@authldaprc@.sample ++@HAVE_LDAP_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authldaprc@.sample + + @HAVE_LDAP_TRUE@uninstall-authldaprc: + @HAVE_LDAP_TRUE@ rm -f $(DESTDIR)@authldaprc@.dist @@ -1901,6 +1942,19 @@ @HAVE_LDAP_FALSE@uninstall-authldaprc: @HAVE_LDAP_FALSE@ @: @@ -228,7 +219,7 @@ +@HAVE_LDAP_TRUE@install-ldapschema: +@HAVE_LDAP_TRUE@ $(mkinstalldirs) ${DESTDIR}${sysconfdir}/openldap/schema +@HAVE_LDAP_TRUE@ $(INSTALL_DATA) -m 0444 $(srcdir)/authldap.schema \ -+@HAVE_LDAP_TRUE@ ${DESTDIR}${sysconfdir}/openldap/schema/authldap.schema.default ++@HAVE_LDAP_TRUE@ ${DESTDIR}${sysconfdir}/openldap/schema/authldap.schema.sample +@HAVE_LDAP_TRUE@# if test ! -f ${sysconfdir}/openldap/schema/authldap.schema ; then \ +@HAVE_LDAP_TRUE@# $(INSTALL_DATA) -m 0444 $(srcdir)/authldap.schema \ +@HAVE_LDAP_TRUE@# ${sysconfdir}/openldap/schema/authldap.schema ; \ @@ -241,6 +232,32 @@ authldaprc.h: echo "#define AUTHLDAPRC \"@authldaprc@\"" >authldaprc.h +@@ -1909,9 +1963,9 @@ + @HAVE_AUTHMYSQL_TRUE@install-authmysqlrc: + @HAVE_AUTHMYSQL_TRUE@ $(mkinstalldirs) $(DESTDIR)`dirname @authmysqlrc@` || : + @HAVE_AUTHMYSQL_TRUE@ $(INSTALL_DATA) -m 660 $(srcdir)/authmysqlrc \ +-@HAVE_AUTHMYSQL_TRUE@ $(DESTDIR)@authmysqlrc@.dist +-@HAVE_AUTHMYSQL_TRUE@ -chown @mailuser@ $(DESTDIR)@authmysqlrc@.dist +-@HAVE_AUTHMYSQL_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authmysqlrc@.dist ++@HAVE_AUTHMYSQL_TRUE@ $(DESTDIR)@authmysqlrc@.sample ++@HAVE_AUTHMYSQL_TRUE@ -chown @mailuser@ $(DESTDIR)@authmysqlrc@.sample ++@HAVE_AUTHMYSQL_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authmysqlrc@.sample + + @HAVE_AUTHMYSQL_TRUE@uninstall-authmysqlrc: + @HAVE_AUTHMYSQL_TRUE@ rm -f $(DESTDIR)@authmysqlrc@.dist +@@ -1930,9 +1984,9 @@ + @HAVE_AUTHSQLITE_TRUE@install-authsqliterc: + @HAVE_AUTHSQLITE_TRUE@ $(mkinstalldirs) $(DESTDIR)`dirname @authsqliterc@` || : + @HAVE_AUTHSQLITE_TRUE@ $(INSTALL_DATA) -m 660 $(srcdir)/authsqliterc \ +-@HAVE_AUTHSQLITE_TRUE@ $(DESTDIR)@authsqliterc@.dist +-@HAVE_AUTHSQLITE_TRUE@ -chown @mailuser@ $(DESTDIR)@authsqliterc@.dist +-@HAVE_AUTHSQLITE_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authsqliterc@.dist ++@HAVE_AUTHSQLITE_TRUE@ $(DESTDIR)@authsqliterc@.sample ++@HAVE_AUTHSQLITE_TRUE@ -chown @mailuser@ $(DESTDIR)@authsqliterc@.sample ++@HAVE_AUTHSQLITE_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authsqliterc@.sample + + @HAVE_AUTHSQLITE_TRUE@uninstall-authsqliterc: + @HAVE_AUTHSQLITE_TRUE@ rm -f $(DESTDIR)@authsqliterc@.dist @@ -1951,16 +2005,22 @@ authpiperc.h: echo "#define PIPE_PROGRAM \"@authProg@\"" >authpiperc.h @@ -255,19 +272,19 @@ +@HAVE_BASE_TRUE@install-authdaemonrc: +@HAVE_BASE_TRUE@ $(mkinstalldirs) $(DESTDIR)`dirname @authdaemonrc@` +@HAVE_BASE_TRUE@ sed 's/@ALLMODULES@/$(modules:lib%.la=%)/' <authdaemonrc >authdaemonrc.tmp -+@HAVE_BASE_TRUE@ $(INSTALL_DATA) -m 660 authdaemonrc.tmp $(DESTDIR)@authdaemonrc@.dist ++@HAVE_BASE_TRUE@ $(INSTALL_DATA) -m 660 authdaemonrc.tmp $(DESTDIR)@authdaemonrc@.sample +@HAVE_BASE_TRUE@ rm -f authdaemonrc.tmp -+@HAVE_BASE_TRUE@ -chown @mailuser@ $(DESTDIR)@authdaemonrc@.dist -+@HAVE_BASE_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authdaemonrc@.dist -+ ++@HAVE_BASE_TRUE@ -chown @mailuser@ $(DESTDIR)@authdaemonrc@.sample ++@HAVE_BASE_TRUE@ -chgrp @mailgroup@ $(DESTDIR)@authdaemonrc@.sample + +-uninstall-authdaemonrc: +- rm -f $(DESTDIR)@authdaemonrc@.dist +@HAVE_BASE_FALSE@install-authdaemonrc: +@HAVE_BASE_FALSE@ @: + +@HAVE_BASE_TRUE@uninstall-authdaemonrc: +@HAVE_BASE_TRUE@ rm -f $(DESTDIR)@authdaemonrc@.dist - --uninstall-authdaemonrc: -- rm -f $(DESTDIR)@authdaemonrc@.dist ++ +@HAVE_BASE_FALSE@uninstall-authdaemonrc: +@HAVE_BASE_FALSE@ @: @@ -316,7 +333,7 @@ $(INSTALL_SCRIPT) userdb/pw2userdb \ $(DESTDIR)$(sbindir)/pw2userdb ; \ $(INSTALL_SCRIPT) userdb/makeuserdb \ -@@ -2033,9 +2095,10 @@ +@@ -2033,9 +2099,10 @@ $(DESTDIR)$(sbindir)/userdb-test-cram-md5 uninstall-hook: uninstall-authldaprc uninstall-authdaemonrc uninstall-authmysqlrc uninstall-authpgsqlrc uninstall-authsqliterc @@ -328,7 +345,7 @@ $(DESTDIR)$(sbindir)/pw2userdb \ $(DESTDIR)$(sbindir)/makeuserdb \ $(DESTDIR)$(sbindir)/userdb \ -@@ -2046,7 +2109,7 @@ +@@ -2046,7 +2113,7 @@ $(SHELL) ./config.status --file=authlib.html authlib.3: authlib.3.in @@ -336,21 +353,4 @@ +@HAVE_BASE_TRUE@ $(SHELL) ./config.status --file=authlib.3 @HAVE_SGML_TRUE@authpasswd.html: authpasswd.sgml libs/docbook/sgml2html - @HAVE_SGML_TRUE@ libs/docbook/sgml2html authpasswd.sgml authpasswd.html -@@ -2131,11 +2194,11 @@ - @SHELL@ authmigrate - - install-configure: -- test -f $(DESTDIR)@authdaemonrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authdaemonrc@.dist || true -- test -f $(DESTDIR)@authmysqlrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authmysqlrc@.dist || true -- test -f $(DESTDIR)@authpgsqlrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authpgsqlrc@.dist || true -- test -f $(DESTDIR)@authldaprc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authldaprc@.dist || true -- test -f $(DESTDIR)@authsqliterc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authsqliterc@.dist || true -+@HAVE_BASE_TRUE@ test -f $(DESTDIR)@authdaemonrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authdaemonrc@.dist || true -+@HAVE_AUTHMYSQL_TRUE@ test -f $(DESTDIR)@authmysqlrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authmysqlrc@.dist || true -+@HAVE_AUTHPGSQL_TRUE@ test -f $(DESTDIR)@authpgsqlrc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authpgsqlrc@.dist || true -+@HAVE_LDAP_TRUE@ test -f $(DESTDIR)@authldaprc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authldaprc@.dist || true -+@HAVE_AUTHSQLITE_TRUE@ test -f $(DESTDIR)@authsqliterc@.dist && @SYSCONFTOOL@ $(DESTDIR)@authsqliterc@.dist || true - - # For maintainer's use only - + @HAVE_SGML_TRUE@ libs/docbook/sgml2html authpasswd.sgml authpasswd.html diff --git a/security/courier-authlib/files/pkg-deinstall.in b/security/courier-authlib/files/pkg-deinstall.in deleted file mode 100644 index 6dd8602ee207..000000000000 --- a/security/courier-authlib/files/pkg-deinstall.in +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -PKG_PREFIX=${PKG_PREFIX:=/usr/local} -LOCALSTATEDIR=${LOCALSTATEDIR:=/var/spool/courier} - -USER=%%MAILOWN%% -GROUP=%%MAILGRP%% - -if [ ":$2" = ":POST-DEINSTALL" ]; then - if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then - echo "" - echo "Warning: Removing user courier will also delete any" - echo " undelivered mail in the mail queue directories!!!" - echo " Do *not* do it if you're upgrading and would like" - echo " courier to continue trying to deliver this mail." - echo "" - else - AFFIRM='-y' - fi - [ -d "$LOCALSTATEDIR" ] && /usr/sbin/chown -Rh ${USER}:${GROUP} "$LOCALSTATEDIR" - /usr/sbin/rmuser ${AFFIRM} ${USER} 2> /dev/null - [ -d "$LOCALSTATEDIR" ] && /usr/sbin/chown root:wheel "$LOCALSTATEDIR" -fi - -exit 0 diff --git a/security/courier-authlib/files/pkg-install.in b/security/courier-authlib/files/pkg-install.in deleted file mode 100644 index 9e7061d55316..000000000000 --- a/security/courier-authlib/files/pkg-install.in +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -PKG_PREFIX=${PKG_PREFIX:=/usr/local} - -USER=%%MAILOWN%%; UID=%%MAILUID%% -GROUP=%%MAILGRP%%; GID=%%MAILGID%% - -if [ ":$2" = ":PRE-INSTALL" ]; then - if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if /usr/sbin/pw groupadd ${GROUP} -g ${GID} -h - - then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d /var/spool/courier \ - -s /sbin/nologin \ - -c "Courier Mail System" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi -fi |