From nobody Fri Apr 21 19:37:26 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q34YL6kKjz46n9Z; Fri, 21 Apr 2023 19:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q34YL5qpFz3kC7; Fri, 21 Apr 2023 19:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682105846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FAUV6JOW5Vakb2x+nYcdB40lbd1c21bTnMZg2QuohB0=; b=rj4Vmq6227E+URtmOlMdB4ZW+RkOMwBdMzfRLzv4tdFj1q2/OrrwF9cyny1UTrB2TVIwZq WRpNuS4yE7Z/gaZkC2B80nsTEhsZtLLo1FGOuCbc3bRUU4Y41wR7zNh2fIObophAeM+Aw6 7pgZBtDuV36ZW1Uss3OUEQbfMTnx3gLYpaF6XqXnPTSpZcRanj6J4cGaJIwr5YZ+hUUZeK Ncc73WAaTgPgQMnAcu1wgGcjEdyGsoQ2Bud+WEHpLRAABmYjI15ndk3IttBVrULcesHFnO hGf91KlZ9nos4J4zgvADfsX6sT4E5K5UVJvJpo+ZJpmAGzAYO/jds7b4Hlwxtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682105846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FAUV6JOW5Vakb2x+nYcdB40lbd1c21bTnMZg2QuohB0=; b=t/y1d1F0b+yc97PhseABap9VWvGJIj0nODIRhgDXpgLKk8trhjrIvlpwY96TSLiFpAvZlO JSSfi3EULjDgi28z2thu47i3voBri+53FpFFu9CvgGwqaJuWowVAdGyTvehZiK5DjvmEm5 69ohJRMzh1TEjbcjPh3y0sFX1WL8WZluFvTo6FKEq8KJs+T3cEHvmrYyAHpXoYmUr1kKZ4 +JvBEs7CeW2ak5Lfdfmnw5fv59KhOtm05z+XSrO62pAjiFs4mvIovaBoAqH4JgspqyV89v 8jmh+gTwz+TqdfazO88MYLqQRS7nWzQ5ibQBYCM9EaxJxB1cnd1aUj/DVR2mkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682105846; a=rsa-sha256; cv=none; b=bA6GHCoiDDXO8/ioypcqDSw3+VyDEo0taLATQj5UHCthjWupxNyMnm86aDAe3uXwOWsCK9 CI39JYeIkSptaVeBQGV0ovzM4vFlAjlOGYu+fT5yfd/Z53hLPcp6LGHRnl+KgY3+BZzZiS /H0bvcwNZa0PDCLny85SUBRkUN9HZ0eTOBOc67gSlyfxBXdEl42wr8FHREHHbiAKSk7xjD sf5+Iy0Fns25C2T3p8pxrlCbEpQvN/qZ8YdHaLWIXHrtQyDqO85Xo3tihMcntiX0oi9brH 4I4A5NOPaAMQRxBEhkl0x1OVH9qebbb3Iww7Mw7SIt/rDeyaiTEvHAYgHu5NbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q34YL4kVCzXks; Fri, 21 Apr 2023 19:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33LJbQHc046197; Fri, 21 Apr 2023 19:37:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33LJbQTk046196; Fri, 21 Apr 2023 19:37:26 GMT (envelope-from git) Date: Fri, 21 Apr 2023 19:37:26 GMT Message-Id: <202304211937.33LJbQTk046196@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 127744ca1015 - main - sysutils/ldap-account-manager: Refactor List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 127744ca10156ef3e1807a56b65415328b83d417 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=127744ca10156ef3e1807a56b65415328b83d417 commit 127744ca10156ef3e1807a56b65415328b83d417 Author: Muhammad Moinur Rahman AuthorDate: 2023-04-21 15:48:13 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2023-04-21 19:37:16 +0000 sysutils/ldap-account-manager: Refactor - Replace SED with SHEBANG_FILES - Replace @preexec/@postexec with relevant keywords [1] - Change pkg-message to respect PREFIX Reported by: bapt [1] --- sysutils/ldap-account-manager/Makefile | 45 ++++++++++------------ .../{pkg-message => files/pkg-message.in} | 4 +- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/sysutils/ldap-account-manager/Makefile b/sysutils/ldap-account-manager/Makefile index a1de8d4d0f8e..6c8b680a69dd 100644 --- a/sysutils/ldap-account-manager/Makefile +++ b/sysutils/ldap-account-manager/Makefile @@ -13,47 +13,44 @@ LICENSE_FILE= ${WRKSRC}/COPYING RUN_DEPENDS= p5-perl-ldap>=0:net/p5-perl-ldap \ p5-Quota>=0:sysutils/p5-Quota -USES= perl5 php:web tar:bzip2 +USES= perl5 php:web shebangfix tar:bzip2 USE_PHP= curl filter gd gettext gmp iconv ldap mbstring \ session simplexml xml xmlreader xmlwriter zip +SHEBANG_FILES= lib/lamdaemon.pl + WWWDIR= ${PREFIX}/www/${SHORTNAME} NO_ARCH= yes NO_BUILD= yes +SUB_FILES= pkg-message -SHORTNAME= lam PORTDOCS= COPYING HISTORY README copyright docs -LAMDATA= config graphics help lib locale sess style templates tmp \ - VERSION index.html pwa_worker.js .htaccess -WRITEABLES= config sess tmp - -OPTIONS_DEFINE+= DOCS -OPTIONS_DEFAULT= DOCS +OPTIONS_DEFINE= DOCS DOCS_DESC= Install documentation and dhcp.schema -.include +LAMDATA= config graphics help lib locale sess style templates tmp \ + VERSION index.html pwa_worker.js .htaccess +SHORTNAME= lam do-install: - @${ECHO_CMD} '@preexec if [ -f %D/${WWWDIR_REL}/config/shells ]; then ${RM} %D/${WWWDIR_REL}/config/shells; fi' >> ${TMPPLIST} - @${ECHO_CMD} '@sample ${WWWDIR_REL}/config/addressbook.sample.conf ${WWWDIR_REL}/config/addressbook.conf' >> ${TMPPLIST} - @${ECHO_CMD} '@sample ${WWWDIR_REL}/config/config.cfg.sample ${WWWDIR_REL}/config/config.cfg' >> ${TMPPLIST} - @${ECHO_CMD} '@sample ${WWWDIR_REL}/config/samba3.sample.conf ${WWWDIR_REL}/config/samba3.conf' >> ${TMPPLIST} - @${ECHO_CMD} '@sample ${WWWDIR_REL}/config/unix.sample.conf ${WWWDIR_REL}/config/lam.conf' >> ${TMPPLIST} - @${ECHO_CMD} '@sample ${WWWDIR_REL}/config/windows_samba4.sample.conf ${WWWDIR_REL}/config/windows_samba4.conf' >> ${TMPPLIST} + @${ECHO_CMD} '@rmtry ${WWWDIR_REL}/config/shells' >> ${TMPPLIST} + @${ECHO_CMD} '@sample(${WWWOWN},,) ${WWWDIR_REL}/config/addressbook.sample.conf ${WWWDIR_REL}/config/addressbook.conf' >> ${TMPPLIST} + @${ECHO_CMD} '@sample(${WWWOWN},,) ${WWWDIR_REL}/config/config.cfg.sample ${WWWDIR_REL}/config/config.cfg' >> ${TMPPLIST} + @${ECHO_CMD} '@sample(${WWWOWN},,) ${WWWDIR_REL}/config/samba3.sample.conf ${WWWDIR_REL}/config/samba3.conf' >> ${TMPPLIST} + @${ECHO_CMD} '@sample(${WWWOWN},,) ${WWWDIR_REL}/config/unix.sample.conf ${WWWDIR_REL}/config/lam.conf' >> ${TMPPLIST} + @${ECHO_CMD} '@sample(${WWWOWN},,) ${WWWDIR_REL}/config/windows_samba4.sample.conf ${WWWDIR_REL}/config/windows_samba4.conf' >> ${TMPPLIST} .for I in ${LAMDATA} - @${FIND} -s ${WRKSRC}/${I} -type f -not -name 'config.cfg.sample' -not -name '*.sample.conf' | ${SED} -e 's,^${WRKSRC},${WWWDIR_REL},' >> ${TMPPLIST} - @${FIND} -ds ${WRKSRC}/${I} -type d | ${SED} -e 's,^${WRKSRC},@dir ${WWWDIR_REL},' >> ${TMPPLIST} + @${FIND} -s ${WRKSRC}/${I} -type f -not -name 'config.cfg.sample' -not -name '*.sample.conf' | \ + ${SED} -e 's#^${WRKSRC}#${WWWDIR_REL}#' | \ + ${SED} -E -e '/lib\/lamdaemon.pl$$/ s#^#@(${WWWOWN},,0544) #; \ + /\/config|\/sess|\/tmp/ s#^#@(${WWWOWN},,) #;' >> ${TMPPLIST} + @${FIND} -ds ${WRKSRC}/${I} -type d | \ + ${SED} -e 's,^${WRKSRC},@dir ${WWWDIR_REL},' | \ + ${SED} -E -e '/\/config\/|\/sess\/|\/tmp\// s#@dir #@dir(${WWWOWN},,0755) #' >> ${TMPPLIST} .endfor @${ECHO_CMD} '@dir ${WWWDIR_REL}' >> ${TMPPLIST} @cd ${WRKSRC} && ${COPYTREE_SHARE} "${LAMDATA}" ${STAGEDIR}${WWWDIR} -.for DIR in ${WRITEABLES} - @${ECHO_CMD} '@postexec ${CHOWN} -R ${WWWOWN} %D/${WWWDIR_REL}/${DIR}' >> ${TMPPLIST} - @${ECHO_CMD} '@postexec ${CHMOD} -R u+w %D/${WWWDIR_REL}/${DIR}' >> ${TMPPLIST} -.endfor - @${SED} -i '' 's|usr/bin/perl|usr/local/bin/perl|g' ${WRKSRC}/lib/lamdaemon.pl - @${ECHO_CMD} '@postexec ${CHOWN} ${WWWOWN} %D/${WWWDIR_REL}/${DIR}/lib/lamdaemon.pl' >> ${TMPPLIST} - @${ECHO_CMD} '@postexec ${CHMOD} u+x %D/${WWWDIR_REL}/${DIR}/lib/lamdaemon.pl' >> ${TMPPLIST} do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} diff --git a/sysutils/ldap-account-manager/pkg-message b/sysutils/ldap-account-manager/files/pkg-message.in similarity index 86% rename from sysutils/ldap-account-manager/pkg-message rename to sysutils/ldap-account-manager/files/pkg-message.in index 72daeaa0e4f1..0e16516c75a0 100644 --- a/sysutils/ldap-account-manager/pkg-message +++ b/sysutils/ldap-account-manager/files/pkg-message.in @@ -6,9 +6,9 @@ You should add the following to your Apache configuration file: -Alias /lam /usr/local/www/lam +Alias /lam %%PREFIX%%/www/lam - + Options +FollowSymLinks AllowOverride All Require all granted