Bug 47254 - pkg-name is not a generated file
Summary: pkg-name is not a generated file
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-20 14:40 UTC by kstailey
Modified: 2003-01-21 00:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kstailey 2003-01-20 14:40:03 UTC
The ports/emulator/klh10/Makefile has code that tries to generate pkg-message
at pre-install time.  This is wrong; no files should be written to ${PKGSRC}
when the package is being built.

Fix: 

--- Makefile	2003/01/19 13:28:23	1.1
+++ Makefile	2003/01/20 14:25:22
@@ -7,6 +7,7 @@
 
 PORTNAME=	klh10
 PORTVERSION=	2.0a
+PORTREVISION=	1
 CATEGORIES=	emulators
 MASTER_SITES=	http://klh10.trailing-edge.com/
 DISTNAME=	${PORTNAME}-${PORTVERSION}
@@ -79,17 +80,6 @@
 			usage.txt \
 			utils.txt \
 			vtape.txt
-
-pre-install:
-	@ ${MKDIR} ${KSITS_KLH10_HOME}
-	@ ${MKDIR} ${KSITS_DRIVER_DIR}
-	@ ${MKDIR} ${KSITS_DOCDIR}
-	@ ${ECHO} KLH10 contains a setuid that accepts network connections. \
-		> ${PKGDIR}/pkg-message
-	@ ${ECHO} Consider using a firewall to limit access to KLH10. \
-		>> ${PKGDIR}/pkg-message
-	@ ${ECHO} See the ${KSITS_DOCDIR}/pubits/adm 	>> ${PKGDIR}/pkg-message
-	@ ${ECHO} for firewall documentation. 	>> ${PKGDIR}/pkg-message
 
 post-install:
 .for file in ${KSITS_NATIVE_PROGS} ${KSITS_EM_DRIVERS} ${KSITS_EM_SDRIVERS}
How-To-Repeat: 
Try to build from a CD-ROM.
Comment 1 corecode@corecode.ath.cx 2003-01-20 14:54:55 UTC
Lately Ken Stailey told:

> >Fix:
> --- Makefile	2003/01/19 13:28:23	1.1
> +++ Makefile	2003/01/20 14:25:22
> @@ -7,6 +7,7 @@
>  
>  PORTNAME=	klh10
>  PORTVERSION=	2.0a
> +PORTREVISION=	1

doubt this is needed

>  CATEGORIES=	emulators
>  MASTER_SITES=	http://klh10.trailing-edge.com/
>  DISTNAME=	${PORTNAME}-${PORTVERSION}
> @@ -79,17 +80,6 @@
>  			usage.txt \
>  			utils.txt \
>  			vtape.txt
> -
> -pre-install:
> -	@ ${MKDIR} ${KSITS_KLH10_HOME}
> -	@ ${MKDIR} ${KSITS_DRIVER_DIR}
> -	@ ${MKDIR} ${KSITS_DOCDIR}
> -	@ ${ECHO} KLH10 contains a setuid that accepts network connections. \
> -		> ${PKGDIR}/pkg-message
> -	@ ${ECHO} Consider using a firewall to limit access to KLH10. \
> -		>> ${PKGDIR}/pkg-message
> -	@ ${ECHO} See the ${KSITS_DOCDIR}/pubits/adm 	>> ${PKGDIR}/pkg-message
> -	@ ${ECHO} for firewall documentation. 	>> ${PKGDIR}/pkg-message
>  
>  post-install:
>  .for file in ${KSITS_NATIVE_PROGS} ${KSITS_EM_DRIVERS} ${KSITS_EM_SDRIVERS}

this is probably the wrong fix.
better PKGMESSAGE=${WRKDIR}/pkg-message && ${ECHO} > ${PKGMESSAGE}

cheers
  simon


-- 
/"\   http://corecode.ath.cx/#donate
\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News
Comment 2 kstailey 2003-01-20 15:16:30 UTC
But pkg-message is a committed file.

http://www.freebsd.org/cgi/cvsweb.cgi/ports/emulators/klh10/pkg-message

Why generate it at pre-install time when you've already downloaded it with
cvs/cvsup?


--- Simon 'corecode' Schubert <corecode@corecode.ath.cx> wrote:
> Lately Ken Stailey told:
> 
> > >Fix:
> > --- Makefile	2003/01/19 13:28:23	1.1
> > +++ Makefile	2003/01/20 14:25:22
> > @@ -7,6 +7,7 @@
> >  
> >  PORTNAME=	klh10
> >  PORTVERSION=	2.0a
> > +PORTREVISION=	1
> 
> doubt this is needed
> 
> >  CATEGORIES=	emulators
> >  MASTER_SITES=	http://klh10.trailing-edge.com/
> >  DISTNAME=	${PORTNAME}-${PORTVERSION}
> > @@ -79,17 +80,6 @@
> >  			usage.txt \
> >  			utils.txt \
> >  			vtape.txt
> > -
> > -pre-install:
> > -	@ ${MKDIR} ${KSITS_KLH10_HOME}
> > -	@ ${MKDIR} ${KSITS_DRIVER_DIR}
> > -	@ ${MKDIR} ${KSITS_DOCDIR}
> > -	@ ${ECHO} KLH10 contains a setuid that accepts network connections. \
> > -		> ${PKGDIR}/pkg-message
> > -	@ ${ECHO} Consider using a firewall to limit access to KLH10. \
> > -		>> ${PKGDIR}/pkg-message
> > -	@ ${ECHO} See the ${KSITS_DOCDIR}/pubits/adm 	>> ${PKGDIR}/pkg-message
> > -	@ ${ECHO} for firewall documentation. 	>> ${PKGDIR}/pkg-message
> >  
> >  post-install:
> >  .for file in ${KSITS_NATIVE_PROGS} ${KSITS_EM_DRIVERS}
> ${KSITS_EM_SDRIVERS}
> 
> this is probably the wrong fix.
> better PKGMESSAGE=${WRKDIR}/pkg-message && ${ECHO} > ${PKGMESSAGE}
> 
> cheers
>   simon
> 
> 
> -- 
> /"\   http://corecode.ath.cx/#donate
> \ /
>  \     ASCII Ribbon Campaign
> / \  Against HTML Mail and News
> 

> ATTACHMENT part 2 application/pgp-signature 

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Comment 3 corecode@corecode.ath.cx 2003-01-20 15:48:54 UTC
Lately Kenneth Stailey told:

> But pkg-message is a committed file.
> 
> http://www.freebsd.org/cgi/cvsweb.cgi/ports/emulators/klh10/pkg-message
> 
> Why generate it at pre-install time when you've already downloaded it with
> cvs/cvsup?

either stick with the existing file, that's easy
or create it every time and have an always-valid path in the message.

in this context your patch seems okay then. you should then modify
pkg-message to contain a generic path.

cheers
  simon


-- 
/"\   http://corecode.ath.cx/#donate
\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News
Comment 4 kstailey 2003-01-20 16:30:23 UTC
I just noticed that the title of this pr should say "pkg-message" not
"pkg-name".  The message body is correct.

--- Simon 'corecode' Schubert <corecode@corecode.ath.cx> wrote:
> Lately Kenneth Stailey told:
> 
> > But pkg-message is a committed file.
> > 
> > http://www.freebsd.org/cgi/cvsweb.cgi/ports/emulators/klh10/pkg-message
> > 
> > Why generate it at pre-install time when you've already downloaded it with
> > cvs/cvsup?
> 
> either stick with the existing file, that's easy
> or create it every time and have an always-valid path in the message.
> 
> in this context your patch seems okay then. you should then modify
> pkg-message to contain a generic path.
> 
> cheers
>   simon

Here is the documentation about pkg-message:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/pkg-files.html

<< 12.1 pkg-message

If you need to display a message to the installer, you may place the message in
pkg-message. This capability is often useful to display additional installation
steps to be taken after a pkg_add or to display licensing information.

Note: The pkg-message file does not need to be added to pkg-plist. Also, it
will not get automatically printed if the user is using the port, not the
package, so you should probably display it from the post-install target
yourself. >>

So what is this about a generic path?  How does it work?  Can the handbook be
made more clear?

I display the message from the port's Makefile using echo of static strings not
cat of the pkg-message file.  The pkg-message file is only for binary packages
not a source code port; it's not port-message, it's pkg-message.

Thanks,
Ken



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Comment 5 Edwin Groothuis freebsd_committer freebsd_triage 2003-01-21 00:50:52 UTC
State Changed
From-To: open->closed

Commited something similair after an email-frenzy with the maintainer.