Changeset View
Standalone View
databases/automysqlbackup/Makefile
- This file was added.
# $FreeBSD$ | |||||
PORTNAME= automysqlbackup | |||||
DISTVERSIONPREFIX= v | |||||
DISTVERSION= 3.0_rc6 | |||||
CATEGORIES= databases | |||||
MASTER_SITES= SF/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%203.0 | |||||
# automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%203.0/automysqlbackup-v3.0_rc6.tar.gz | |||||
MAINTAINER= me@cschwarz.com | |||||
LICENSE= GPLv2 | |||||
RUN_DEPENDS= ${LOCALBASE}/bin/bash:shells/bash | |||||
NO_BUILD= yes | |||||
NO_WRKSUBDIR= yes | |||||
post-patch: | |||||
@${REINPLACE_CMD} -e 's|%%ETCDIR%%|${ETCDIR}|' \ | |||||
${WRKSRC}/automysqlbackup | |||||
do-install: | |||||
${INSTALL_SCRIPT} ${WRKSRC}/automysqlbackup ${STAGEDIR}${PREFIX}/bin | |||||
${MKDIR} ${STAGEDIR}${DOCSDIR} | |||||
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/ | |||||
${MKDIR} ${STAGEDIR}${ETCDIR} | |||||
${INSTALL_DATA} ${WRKSRC}/automysqlbackup.conf ${STAGEDIR}${ETCDIR}/automysqlbackup.conf.sample | |||||
matthew: ${MKDIR} already includes the '-p' flag: no need to repeat it. | |||||
Not Done Inline ActionsI'm not sure if I understood @matthew 's feedback on this line... mmokhi: I'm not sure if I understood @matthew 's feedback on this line...
But I would personally let… | |||||
Not Done Inline ActionsWhen you are building a port, all the Makefile installation commands are doing is copying files into ${STAGEDIR}. The contents of ${STAGEDIR} are then turned into a pkg -- either gathered into a pkg tarball, or in it's installed form with files spread across your active filesytem. This happens whether or not you install directly from your ports tree, or whether you create a pkg tarball, stick it into a repository and download and install from there. You're meant to be able to install to ${STAGEDIR} and thence build a pkg as an unprivileged user, which means that file ownership and permissions in ${STAGEDIR} can't just be copied into the pkg generated from ${STAGEDIR}, and thence into the main filesystem when the pkg is installed -- in fact, they are ignored, other than copying over any execute permissions. In particular anything like setuid or setgid bits are stripped; regular files default to root:wheel and mode 0644 or 0755 if executable, and directories to root:wheel and mode 0755. If you need any other permissions or ownership, this needs to be set in the pkg-plist. In summary: permissions and ownership in ${STAGEDIR} are (almost) irrelevant: it's what's set in pkg-plist that counts. matthew: When you are building a port, all the Makefile installation commands are doing is copying files… | |||||
Not Done Inline ActionsAha, yes. Thanks for complete and reasonable explanation 🙏 👍 mmokhi: Aha, yes.
Makes sense, I believe that's why we basically have the permission and ownership… | |||||
Done Inline ActionsAny action required on my part? Otherwise please mark this as done. me_cschwarz.com: Any action required on my part? Otherwise please mark this as done. | |||||
Done Inline ActionsI guess, It makes sense to update your patch deleting the chmod stuff from Makefile and handle all the rest in pkg-plist 😊 mmokhi: I guess, It makes sense to update your patch deleting the `chmod` stuff from Makefile and… | |||||
post-install: | |||||
${MKDIR} ${STAGEDIR}/var/backups/automysqlbackup | |||||
.include <bsd.port.mk> |
${MKDIR} already includes the '-p' flag: no need to repeat it.