Bug 97145 - [MAINTAINER] ftp/phpwebftp: changed the instalattion directory
Summary: [MAINTAINER] ftp/phpwebftp: changed the instalattion directory
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: sat
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-11 18:20 UTC by Jose Alonso Cardenas Marquez
Modified: 2006-05-31 14:05 UTC (History)
0 users

See Also:


Attachments
phpwebftp-3.3_1.patch (597 bytes, patch)
2006-05-11 18:20 UTC, Jose Alonso Cardenas Marquez
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Alonso Cardenas Marquez 2006-05-11 18:20:11 UTC
- Changed the instalattion directory (web apps must be installed in ${PREFIX}/www/${PORTNAME} directory).
Comment 1 sat freebsd_committer freebsd_triage 2006-05-12 04:56:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sat

I'll take it
Comment 2 sat freebsd_committer freebsd_triage 2006-05-12 11:14:24 UTC
State Changed
From-To: open->feedback

I worked a bit on this port, please look at the patch 
and approve/disapprove: 

http://bsd1.csme.ru/myports/a0007/phpwebftp.diff 
http://bsd2.csme.ru/myports/a0007/phpwebftp.diff 
http://bsd3.csme.ru/myports/a0007/phpwebftp.diff
Comment 3 Jose Alonso Cardenas Marquez 2006-05-30 08:51:48 UTC
On Tue, 30 May 2006 07:58:45 +0400
"Andrew Pantyukhin" <sat@freebsd.org> wrote:

> On 5/16/06, Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe> wrote:
> > On Fri, 12 May 2006 10:16:10 GMT
> > Andrew Pantyukhin <sat@FreeBSD.org> wrote:
> >
> > > Synopsis: [MAINTAINER] ftp/phpwebftp: changed the instalattion directory
> > >
> > > State-Changed-From-To: open->feedback
> > > State-Changed-By: sat
> > > State-Changed-When: Fri May 12 10:14:24 UTC 2006
> > > State-Changed-Why:
> > > I worked a bit on this port, please look at the patch
> > > and approve/disapprove:
> > >
> > > http://bsd1.csme.ru/myports/a0007/phpwebftp.diff
> > > http://bsd2.csme.ru/myports/a0007/phpwebftp.diff
> > > http://bsd3.csme.ru/myports/a0007/phpwebftp.diff
> > >
> > > http://www.freebsd.org/cgi/query-pr.cgi?pr=97145
> > >
> >
> > Hi Andrew,
> >
> > Sorry, I was out of my city :)
> >
> > I think that use "find" is more clean than use "cp".
> >
> > @cd ${WRKSRC} && \
> >         ${FIND} * -type d -exec ${MKDIR} "${PREFIX}/${PHPWEBFTPDIR}/{}" \; && \
> >         ${FIND} -E * -type f -iregex ".*\.(php|html|css|gif|js)" \
> >                 --exec ${INSTALL_DATA} "{}" "${PREFIX}/${PHPWEBFTPDIR}/{}" \;
> >         @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPWEBFTPDIR}/
> >         @${CHMOD} -R go-w ${PREFIX}/${PHPWEBFTPDIR}/
> >
> > what you think about it?
> 
> Thanks for the reminder. In fact, this never left my inbox, but
> somehow slipped to the bottom half of my todo list. Sorry for
> that.
> 
> cp works fine here. install is actually meant for binaries and is
> abused by ports system to change permissions in one go. But
> since we do it later manually, cp is a more viable alternative
> (as in a lot faster and simpler). We also have to @exec chown
> because the package would install root:wheel owned files
> otherwise.
> 

Could you apply this patch?. I prefer using the find command yet.

--- /usr/ports/ftp/phpwebftp/Makefile	Thu May  4 19:24:26 2006
+++ /usr/ports/ftp/phpwebftp-new/Makefile	Tue May 30 02:44:15 2006
@@ -7,10 +7,11 @@
 
 PORTNAME=	phpwebftp
 PORTVERSION=	3.3
+PORTREVISION=	1
 CATEGORIES=	ftp
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR=	phpwebftp
-DISTNAME=	${PORTNAME}33
+MASTER_SITE_SUBDIR=	${PORTNAME}
+DISTNAME=	${PORTNAME}${PORTVERSION:S/.//}
 
 MAINTAINER=	acardenas@bsd.org.pe
 COMMENT=	A set of PHP-scripts to manage FTP over the web
@@ -18,11 +19,11 @@
 USE_ZIP=	yes
 NO_BUILD=	yes
 USE_PHP=	ftp
-PHPWEBFTPDIR?=	www/data-dist/${PORTNAME}
+PHPWEBFTPDIR?=	www/${PORTNAME}
 PLIST_SUB+=	PHPWEBFTPDIR=${PHPWEBFTPDIR}
 WRKSRC=	${WRKDIR}/${PORTNAME}
 
-do-configure:
+post-extract:
 	@${FIND} -d ${WRKSRC} -name CVS -type d -print0 | ${XARGS} -0 ${RM} -R
 
 do-install:
@@ -31,6 +32,9 @@
 		${FIND} * -type d -exec ${MKDIR} "${PREFIX}/${PHPWEBFTPDIR}/{}" \; && \
 		${FIND} -E * -type f -iregex ".*\.(php|html|css|gif|js)" \
 			-exec ${INSTALL_DATA} "{}" "${PREFIX}/${PHPWEBFTPDIR}/{}" \;
-	@${CHGRP} -R ${WWWGRP} ${PREFIX}/${PHPWEBFTPDIR}
+	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPWEBFTPDIR}/
+	@${CHMOD} -R go-w ${PREFIX}/${PHPWEBFTPDIR}/
+	@${ECHO_CMD} @exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} %D/${PHPWEBFTPDIR}/ >> ${TMPPLIST}
+	@${ECHO_CMD} @exec ${CHMOD} -R go-w %D/${PHPWEBFTPDIR}/ >> ${TMPPLIST}
 
 .include <bsd.port.mk>


Greetings
ACM
-- 
Grupo de Usuarios *BSD Peru - BSDPeru
http://www.bsd.org.pe
Comment 4 sat freebsd_committer freebsd_triage 2006-05-30 09:26:22 UTC
On 5/30/06, Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe> wrote:
> Could you apply this patch?. I prefer using the find command yet.
>
> --- /usr/ports/ftp/phpwebftp/Makefile   Thu May  4 19:24:26 2006
> +++ /usr/ports/ftp/phpwebftp-new/Makefile       Tue May 30 02:44:15 2006
> @@ -7,10 +7,11 @@
>
>  PORTNAME=      phpwebftp
>  PORTVERSION=   3.3
> +PORTREVISION=  1
>  CATEGORIES=    ftp
>  MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
> -MASTER_SITE_SUBDIR=    phpwebftp
> -DISTNAME=      ${PORTNAME}33
> +MASTER_SITE_SUBDIR=    ${PORTNAME}
> +DISTNAME=      ${PORTNAME}${PORTVERSION:S/.//}
>
>  MAINTAINER=    acardenas@bsd.org.pe
>  COMMENT=       A set of PHP-scripts to manage FTP over the web
> @@ -18,11 +19,11 @@
>  USE_ZIP=       yes
>  NO_BUILD=      yes
>  USE_PHP=       ftp
> -PHPWEBFTPDIR?= www/data-dist/${PORTNAME}
> +PHPWEBFTPDIR?= www/${PORTNAME}
>  PLIST_SUB+=    PHPWEBFTPDIR=${PHPWEBFTPDIR}
>  WRKSRC=        ${WRKDIR}/${PORTNAME}
>
> -do-configure:
> +post-extract:
>         @${FIND} -d ${WRKSRC} -name CVS -type d -print0 | ${XARGS} -0 ${RM} -R
>
>  do-install:
> @@ -31,6 +32,9 @@
>                 ${FIND} * -type d -exec ${MKDIR} "${PREFIX}/${PHPWEBFTPDIR}/{}" \; && \
>                 ${FIND} -E * -type f -iregex ".*\.(php|html|css|gif|js)" \
>                         -exec ${INSTALL_DATA} "{}" "${PREFIX}/${PHPWEBFTPDIR}/{}" \;
> -       @${CHGRP} -R ${WWWGRP} ${PREFIX}/${PHPWEBFTPDIR}
> +       @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPWEBFTPDIR}/
> +       @${CHMOD} -R go-w ${PREFIX}/${PHPWEBFTPDIR}/
> +       @${ECHO_CMD} @exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} %D/${PHPWEBFTPDIR}/ >> ${TMPPLIST}
> +       @${ECHO_CMD} @exec ${CHMOD} -R go-w %D/${PHPWEBFTPDIR}/ >> ${TMPPLIST}
>
>  .include <bsd.port.mk>

If you insist...

1. Use "find -print0 | xargs -0" instead of "find -exec"
2. Use "install -d" instead of "mkdir" for consistency
3. Use "install -m -o -g" instead of chown/chmod, but leave the
@exec lines (or move them to pkg-plist).

Thanks!
Comment 5 Jose Alonso Cardenas Marquez 2006-05-30 21:05:18 UTC
On Tue May 30  8:26 , "Andrew Pantyukhin"  sent:=0D
=0D
>On 5/30/06, Jose Alonso Cardenas Marquez acardenas@bsd.org.pe> wrote:=0D
>> Could you apply this patch?. I prefer using the find command yet.=0D
>>=0D
>> --- /usr/ports/ftp/phpwebftp/Makefile   Thu May  4 19:24:26 2006=0D
>> +++ /usr/ports/ftp/phpwebftp-new/Makefile       Tue May 30 02:44:15 2006=
=0D
>> @@ -7,10 +7,11 @@=0D
>>=0D
>>  PORTNAME=3D      phpwebftp=0D
>>  PORTVERSION=3D   3.3=0D
>> +PORTREVISION=3D  1=0D
>>  CATEGORIES=3D    ftp=0D
>>  MASTER_SITES=3D  ${MASTER_SITE_SOURCEFORGE}=0D
>> -MASTER_SITE_SUBDIR=3D    phpwebftp=0D
>> -DISTNAME=3D      ${PORTNAME}33=0D
>> +MASTER_SITE_SUBDIR=3D    ${PORTNAME}=0D
>> +DISTNAME=3D      ${PORTNAME}${PORTVERSION:S/.//}=0D
>>=0D
>>  MAINTAINER=3D    acardenas@bsd.org.pe=0D
>>  COMMENT=3D       A set of PHP-scripts to manage FTP over the web=0D
>> @@ -18,11 +19,11 @@=0D
>>  USE_ZIP=3D       yes=0D
>>  NO_BUILD=3D      yes=0D
>>  USE_PHP=3D       ftp=0D
>> -PHPWEBFTPDIR?=3D www/data-dist/${PORTNAME}=0D
>> +PHPWEBFTPDIR?=3D www/${PORTNAME}=0D
>>  PLIST_SUB+=3D    PHPWEBFTPDIR=3D${PHPWEBFTPDIR}=0D
>>  WRKSRC=3D        ${WRKDIR}/${PORTNAME}=0D
>>=0D
>> -do-configure:=0D
>> +post-extract:=0D
>>         @${FIND} -d ${WRKSRC} -name CVS -type d -print0 | ${XARGS} -0 ${=
RM} -R=0D
>>=0D
>>  do-install:=0D
>> @@ -31,6 +32,9 @@=0D
>>                 ${FIND} * -type d -exec ${MKDIR} "${PREFIX}/${PHPWEBFTPD=
IR}/{}" \; && \=0D
>>                 ${FIND} -E * -type f -iregex ".*\.(php|html|css|gif|js)"=
 \=0D
>>                         -exec ${INSTALL_DATA} "{}" "${PREFIX}/${PHPWEBFT=
PDIR}/{}" \;=0D
>> -       @${CHGRP} -R ${WWWGRP} ${PREFIX}/${PHPWEBFTPDIR}=0D
>> +       @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPWEBFTPDIR}/=0D
>> +       @${CHMOD} -R go-w ${PREFIX}/${PHPWEBFTPDIR}/=0D
>> +       @${ECHO_CMD} @exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} %D/${PHPWEBFT=
PDIR}/ >> =0D
${TMPPLIST}=0D
>> +       @${ECHO_CMD} @exec ${CHMOD} -R go-w %D/${PHPWEBFTPDIR}/ >> ${TMP=
PLIST}=0D
>>=0D
>>  .include =0D
>=0D
>If you insist...=0D
>=0D
>1. Use "find -print0 | xargs -0" instead of "find -exec"=0D
>2. Use "install -d" instead of "mkdir" for consistency=0D
>3. Use "install -m -o -g" instead of chown/chmod, but leave the=0D
>@exec lines (or move them to pkg-plist).=0D
>=0D
>Thanks!=0D
=0D
Please, see this patch.=0D
=0D
--- phpwebftp-3.3_1.patch begins here ---=0D
diff -ruN --exclude=3DCVS /usr/ports/ftp/phpwebftp/Makefile /usr/ports/ftp/=
phpwebftp/Makefile=0D
--- /usr/ports/ftp/phpwebftp/Makefile	Fri May  5 11:10:01 2006=0D
+++ /usr/ports/ftp/phpwebftp/Makefile	Tue May 30 15:02:00 2006=0D
@@ -7,10 +7,11 @@=0D
 =0D
 PORTNAME=3D	phpwebftp=0D
 PORTVERSION=3D	3.3=0D
+PORTREVISION=3D	1=0D
 CATEGORIES=3D	ftp=0D
 MASTER_SITES=3D	${MASTER_SITE_SOURCEFORGE}=0D
-MASTER_SITE_SUBDIR=3D	phpwebftp=0D
-DISTNAME=3D	${PORTNAME}33=0D
+MASTER_SITE_SUBDIR=3D	${PORTNAME}=0D
+DISTNAME=3D	${PORTNAME}${PORTVERSION:S/.//}=0D
 =0D
 MAINTAINER=3D	acardenas@bsd.org.pe=0D
 COMMENT=3D	A set of PHP-scripts to manage FTP over the web=0D
@@ -18,19 +19,20 @@=0D
 USE_ZIP=3D	yes=0D
 NO_BUILD=3D	yes=0D
 USE_PHP=3D	ftp=0D
-PHPWEBFTPDIR?=3D	www/data-dist/${PORTNAME}=0D
+PHPWEBFTPDIR?=3D	www/${PORTNAME}=0D
 PLIST_SUB+=3D	PHPWEBFTPDIR=3D${PHPWEBFTPDIR}=0D
 WRKSRC=3D	${WRKDIR}/${PORTNAME}=0D
 =0D
-do-configure:=0D
-	@${FIND} -d ${WRKSRC} -name CVS -type d -print0 | ${XARGS} -0 ${RM} -R=0D
+INSTALL_DIRE=3D	${INSTALL} -d -m 0755 -o ${WWWOWN} -g ${WWWGRP}=0D
+INSTALL_FILE=3D	${INSTALL} -m 0644 -o ${WWWOWN} -g ${WWWGRP}=0D
+=0D
+post-extract:=0D
+	@${FIND} -d ${WRKSRC} -name CVS -type d -exec ${RM} -R "{}" \;=0D
 =0D
 do-install:=0D
-	${MKDIR} ${PREFIX}/${PHPWEBFTPDIR}=0D
+	${INSTALL_DIRE} ${PREFIX}/${PHPWEBFTPDIR}=0D
 	@cd ${WRKSRC} && \=0D
-		${FIND} * -type d -exec ${MKDIR} "${PREFIX}/${PHPWEBFTPDIR}/{}" \; && \=
=0D
+		${FIND} * -type d -exec ${INSTALL_DIRE} "${PREFIX}/${PHPWEBFTPDIR}/{}" \=
; && \=0D
 		${FIND} -E * -type f -iregex ".*\.(php|html|css|gif|js)" \=0D
-			-exec ${INSTALL_DATA} "{}" "${PREFIX}/${PHPWEBFTPDIR}/{}" \;=0D
-	@${CHGRP} -R ${WWWGRP} ${PREFIX}/${PHPWEBFTPDIR}=0D
-=0D
+			-exec ${INSTALL_FILE} "{}" "${PREFIX}/${PHPWEBFTPDIR}/{}" \;=0D
 .include <bsd.port.mk>=0D
diff -ruN --exclude=3DCVS /usr/ports/ftp/phpwebftp/pkg-plist /usr/ports/ftp=
/phpwebftp/pkg-plist=0D
--- /usr/ports/ftp/phpwebftp/pkg-plist	Fri May  5 11:10:01 2006=0D
+++ /usr/ports/ftp/phpwebftp/pkg-plist	Tue May 30 14:58:36 2006=0D
@@ -70,3 +70,4 @@=0D
 @dirrm %%PHPWEBFTPDIR%%/style=0D
 @dirrm %%PHPWEBFTPDIR%%/tmp=0D
 @dirrm %%PHPWEBFTPDIR%%=0D
+@exec find %D/%%PHPWEBFTPDIR%% -type d -exec chown www:www "{}" \;=0D
--- phpwebftp-3.3_1.patch ends here ---=0D
=0D
Greetings=0D
ACM=0D
Comment 6 sat freebsd_committer freebsd_triage 2006-05-31 14:04:03 UTC
State Changed
From-To: feedback->closed

Committed with minor fixes (www->%%WWWOWN%% in plist and an updated pkg-descr). 

Thanks for your time and patience!