Discussion:
Fix build version RCS id
Jonathan Perkin
2014-10-07 09:40:07 UTC
Permalink
There are a couple of packages that always get rebuilt during a pbulk
run, regardless of whether they have been updated or not.

Taking a closer look, this is due to the embedded build version being
incorrect and matching incomplete RCS ids in patches. For example:

devel/bmkdep/patches/patch-mkdep.c:@@ -52,7 +52,6 @@ __RCSID("$NetBSD: mkdep.c,v 1.43 2013/03

is matched by mk/pkgformat/pkg/metadata.mk, resulting in an unwanted extra line
in the build version output:

$ pkg_info -qb bmkdep-20131215.tgz
devel/bmkdep/Makefile: $NetBSD: Makefile,v 1.3 2014/01/02 00:19:22 cheusov Exp $
devel/bmkdep/PLIST: $NetBSD: PLIST,v 1.1 2013/12/08 15:22:23 cheusov Exp $
devel/bmkdep/distinfo: $NetBSD: distinfo,v 1.5 2014/01/13 00:01:12 cheusov Exp $
devel/bmkdep/patches/patch-mkdep.c: $
devel/bmkdep/patches/patch-mkdep.c: $NetBSD: patch-mkdep.c,v 1.5 2014/01/13 00:01:12 cheusov Exp $

The proposed fix to mk/pkgformat/pkg/metadata.mk is to ensure RCS ids have the
final "$", i.e.:

@@ -161,3 +161,3 @@ ${_BUILD_VERSION_FILE}:
while read file; do \
- ${GREP} '\$$NetBSD' $$file 2>/dev/null | \
+ ${EGREP} '\$$NetBSD:.*\$$' $$file 2>/dev/null | \
${SED} -e "s|^|$$file:|"; \

The resulting package looks much better:

$ pkg_info -qb bmkdep-20131215.tgz
devel/bmkdep/Makefile: $NetBSD: Makefile,v 1.3 2014/01/02 00:19:22 cheusov Exp $
devel/bmkdep/PLIST: $NetBSD: PLIST,v 1.1 2013/12/08 15:22:23 cheusov Exp $
devel/bmkdep/distinfo: $NetBSD: distinfo,v 1.5 2014/01/13 00:01:12 cheusov Exp $
devel/bmkdep/patches/patch-mkdep.c: $NetBSD: patch-mkdep.c,v 1.5 2014/01/13 00:01:12 cheusov Exp $

and should fix these packages:

$ git grep '$NetBSD: [^$]*$'
devel/bmkdep/patches/patch-mkdep.c:@@ -52,7 +52,6 @@ __RCSID("$NetBSD: mkdep.c,v 1.43 2013/03
filesystems/fs-utils/patches/patch-lib_getbsize.c:@@ -46,10 +46,6 @@ __RCSID("$NetBSD: getbsize.c,v 1.2 2009/
security/heimdal/patches/patch-lib_libedit_src_unvis.c:@@ -46,9 +46,11 @@ __RCSID("$NetBSD: unvis.c,v 1.32 2010/11
security/heimdal/patches/patch-lib_libedit_src_vis.c:@@ -67,6 +67,7 @@ __RCSID("$NetBSD: vis.c,v 1.41 2009/11/2

but I'd like a quick review of this before committing, to ensure I didn't
overlook anything.

Thanks,
--
Jonathan Perkin - Joyent, Inc. - www.joyent.com
Joerg Sonnenberger
2014-10-07 10:36:10 UTC
Permalink
Post by Jonathan Perkin
The proposed fix to mk/pkgformat/pkg/metadata.mk is to ensure RCS ids have the
Not sure how much more reliable that is. I would go the other way and
teach pkgdiff about it.
Post by Jonathan Perkin
$ git grep '$NetBSD: [^$]*$'
The last two should already be fixed.

Joerg
Jonathan Perkin
2014-10-07 10:39:15 UTC
Permalink
Post by Joerg Sonnenberger
Post by Jonathan Perkin
The proposed fix to mk/pkgformat/pkg/metadata.mk is to ensure RCS
Not sure how much more reliable that is. I would go the other way
and teach pkgdiff about it.
Problem is not everyone uses pkgdiff, but yes I'll do that anyway.
Post by Joerg Sonnenberger
Post by Jonathan Perkin
$ git grep '$NetBSD: [^$]*$'
The last two should already be fixed.
Right, sorry, that was on a 2014Q2 branch. The other two still stand.
--
Jonathan Perkin - Joyent, Inc. - www.joyent.com
Loading...