Subject: RE: Adding to BUILD_INFO_FILE: DATE, CATEGORIES, MAINTAINER, PKGTOOLS_VERSION and HOMEPAGE
To: None <tech-pkg@netbsd.org>
From: Jason Boyer <jasonb@japl.lib.in.us>
List: tech-pkg
Date: 04/07/2006 09:45:36
As far as the date is concerned, it's very easy to for software to parse
%Y$d%m%H%M%S, and I think that it's not too hard for most people, since it's
basically the date(1) syntax. Putting a "." or "-" between date and time
might help, or leaving time out altogether if that level of granularity
isn't needed.

I also noticed that %Z was in there, we could leave it out and assume that
any time ending in "Z" (or something similar) is in GMT and the rest are
local.

Jason

--
Jason Boyer
Information Technology Specialist
Jackson County Public Library
(812) 522-3412 x227
jasonb@japl.lib.in.us
 

> -----Original Message-----
> From: tech-pkg-owner@NetBSD.org 
> [mailto:tech-pkg-owner@NetBSD.org] On Behalf Of Jeremy C. Reed
> Sent: Friday, April 07, 2006 8:50 AM
> To: tech-pkg@netbsd.org
> Subject: Adding to BUILD_INFO_FILE: DATE, CATEGORIES, 
> MAINTAINER, PKGTOOLS_VERSION and HOMEPAGE
> 
> I plan on adding the following to the BUILD_INFO_FILE: (aka 
> +BUILD_INFO):
> 
> DATE, CATEGORIES, MAINTAINER, PKGTOOLS_VERSION and HOMEPAGE
> 
> It has been at least a couple years since DATE was discussed 
> and for two years I have been setting it to just normal date 
> (%a %b %e %H:%M:%S %Z %Y) format. This is the build/packaging 
> time. Do you have any suggestion for easier parsable format? 
> Epoch, like DATE=1144412567, is not quickly human readable.
> 
> I have also been recording the MAINTAINER in mine for over 
> two years. But we don't include this on the README.html 
> webpages. It seems like this was discussed before. I like to 
> know as a package user (even not pkgsrc) who made the package 
> (even if some non-human autobuild user). But I think others 
> didn't want this info. I can make this optional (off by 
> default) or just don't include it if this is the consensus.
> 
> Adding CATEGORIES is simple. I discussed with another 
> developer and we decided to just keep same format (all on one line).
> 
> HOMEPAGE will be redundant -- as is now currently also in the +DESC.
> 
> PKGTOOLS_VERSION is easy. (See my other email.) I will just 
> rename _PKGTOOLS_VER.
> 
> Here is a patch (I have been using part of this for over two years):
> 
> diff -u -r1.1813 bsd.pkg.mk
> --- mk/bsd.pkg.mk	6 Apr 2006 06:23:05 -0000	1.1813
> +++ mk/bsd.pkg.mk	7 Apr 2006 12:47:56 -0000
> @@ -420,6 +420,10 @@
>  _PKGSRC_BUILD_TARGETS=	build
>  .endif
>  
> +.if !defined(THE_DATE)
> +THE_DATE!=	${DATE}
> +.endif
> +
>  # The user can override the NO_PACKAGE by specifying this 
> from  # the make command line  .if defined(FORCE_PACKAGE) @@ 
> -3533,7 +3537,7 @@
>  	@${ECHO} "GMAKE=`${GMAKE} --version | ${GREP} Make`" >> 
> ${BUILD_INFO_FILE}  .  endif
>  	${_PKG_SILENT}${_PKG_DEBUG}				
> 	\
> -	${ECHO} "_PKGTOOLS_VER=${PKGTOOLS_VERSION}" >> 
> ${BUILD_INFO_FILE}
> +	${ECHO} "PKGTOOLS_VERSION=${PKGTOOLS_VERSION}" >> 
> ${BUILD_INFO_FILE}
>  .endif
>  
>  .PHONY: post-install-fake-pkg
> @@ -3611,6 +3615,14 @@
>  	done
>  .  endif
>  	${_PKG_SILENT}${_PKG_DEBUG}				
> 	\
> +	${ECHO} "HOMEPAGE=${HOMEPAGE}" >> ${BUILD_INFO_FILE}
> +	${_PKG_SILENT}${_PKG_DEBUG}				
> 	\
> +	${ECHO} "CATEGORIES=${CATEGORIES}" >> ${BUILD_INFO_FILE}
> +	${_PKG_SILENT}${_PKG_DEBUG}				
> 	\
> +	${ECHO} "MAINTAINER=${MAINTAINER}" >> ${BUILD_INFO_FILE}
> +	${_PKG_SILENT}${_PKG_DEBUG}				
> 	\
> +	${ECHO} "DATE=${THE_DATE}" >> ${BUILD_INFO_FILE}
> +	${_PKG_SILENT}${_PKG_DEBUG}				
> 	\
>  	size_this=`${MAKE} ${MAKEFLAGS} print-pkg-size-this`;	
> 	\
>  	size_depends=`${MAKE} ${MAKEFLAGS} 
> print-pkg-size-depends`;	\
>  	${ECHO} $$size_this >${SIZE_PKG_FILE};			
> 	\
> 
> 
> This data will be used for generating the package summary 
> database as already discussed in great detail. (I already 
> tested patch from another developer; I will wait for him to 
> make public.)
> 
>  Jeremy C. Reed