Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mk macros & print/texinfo/distinfo variant SHA256 SIZE

1 view
Skip to first unread message

Julian H. Stacey

unread,
Jun 15, 2012, 11:50:00 AM6/15/12
to
Hi joh...@FreeBSD.org
& cc ports@
A 9.0-RELEASE ports fails on
cd print/texinfo ; make fetch
unless one imports newer values from current, (as I did in my
http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/ports/gen/print/texinfo/distinfo.REL=ALL.diff )

But periodicaly patching distinfo with new SHA256 & SIZE
is not a good solution as
- We can only update values in /pub/FreeBSD/branches/-current/ports/
(as done already), but
- The values are frozen at release time to whatever is exported by
cvs -Q -R export -r RELEASE_8_0_0 ports
- Periodically internet contents of 2 files texinfo.tex & texi2dvi will change
while names remains the same,
- Then along comes a user, trying to make fetch from a release, & it fails.

So how best to modify Makefile to not break on size & sha256 of
some but not all files ?

The question can't be unique to this port, would a half way house
be nice ? An Mk/bsd.port.mk macro to sniff at & warn but not error
if certain values are wrong ? To support some shorter named version of eg:

WARN_IF_NOT_SHA256 (texinfo.tex) = f506a97fe0ea0388c9b29653bd9b9ed8e188d3d649a9e9485e2e051bba47496e
WARN_IF_NOT_SIZE (texinfo.tex) = 321252
WARN_IF_NOT_SHA256 (texi2dvi) = bf6fc2d85b52cde8e7919b5a379804a3d1eeaa95cb781c7daf79fd5f3cc8e6be
WARN_IF_NOT_SIZE (texi2dvi) = 58102

I see Mk has:
NO_CHECKSUM is a user variable and is not to be set in a
port's Makefile.
It's also too crude for this, as
- the checksum of texinfo-4.13.tar.gz is invariant & should be checked.
- if one let loose eg
cd /some...release/ports ; make fetch
one would want mots other checksums checked.

current Mk/bsd.port.mk has
# DISABLE_SIZE - Do not check the size of a distfile even if the SIZE field
# has been specified in distinfo. This is useful
# when using an alternate FETCH_CMD.

I see no analagous
DISABLE_SHA256
DISABLE_CHECKSUM

Thoughts ?

Cheers,
Julian
--
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
Reply below not above, cumulative like a play script, & indent with "> ".
Format: Plain text. Not HTML, multipart/alternative, base64, quoted-printable.
Mail from @yahoo dumped @berklix. http://berklix.org/yahoo/
_______________________________________________
freebs...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-port...@freebsd.org"

Julian H. Stacey

unread,
Jun 15, 2012, 11:53:56 AM6/15/12
to
> current Mk/bsd.port.mk has
> # DISABLE_SIZE - Do not check the size of a distfile even if the SIZE field
> # has been specified in distinfo. This is useful
> # when using an alternate FETCH_CMD.

PS:
It's a port wide variable, not for individual files. Used here:

./graphics/py-gd/Makefile:DISABLE_SIZE= yes
./java/eclipse-clay-core/Makefile:DISABLE_SIZE?= yes
./math/djbfft/Makefile:DISABLE_SIZE= yes
./sysutils/fusefs-kmod/Makefile:DISABLE_SIZE= yes
./sysutils/ucspi-ipc/Makefile:DISABLE_SIZE= yes
./x11-fonts/urwfonts-ttf/Makefile:DISABLE_SIZE= yes
./x11-wm/piewm/Makefile:DISABLE_SIZE= yes

b. f.

unread,
Jun 16, 2012, 4:28:04 AM6/16/12
to
> Hi johans at FreeBSD.org
> & cc ports@
> A 9.0-RELEASE ports fails on
> cd print/texinfo ; make fetch
> unless one imports newer values from current,

...

> So how best to modify Makefile to not break on size & sha256 of
> some but not all files ?
>
> The question can't be unique to this port,

...

> Thoughts ?

It isn't unique to this port. We already have such a construct:
IGNOREFILES, (See ports/Mk/bsd.port.mk, or

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

.) Its use is discouraged because of security concerns. It would
_not_ be wise to
ignore checksums in the case of the texinfo sources -- instead, the
maintainer can simply place copies of the unversioned sources in a
separate, fully-versioned subdirectory on his mirror (e.g.,
${PORTVERSION} rather than ${PORTVERSION:E}), so that they would be
available there after they had been supplanted by newer versions on
the upstream mirrors. The versioned sources could reside in an
unversioned or partly-versioned subdirectory, to avoid unnecessary
copies. The maintainer probably knows how to do this; it is described
at:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-distfiles.html#PORTING-MASTER-SITES-N

b.

Johan van Selst

unread,
Jun 16, 2012, 5:52:14 AM6/16/12
to
Hi Julian,

Julian H. Stacey wrote:
> A 9.0-RELEASE ports fails on
> cd print/texinfo ; make fetch
> unless one imports newer values from current,

I copied the versions used by this port to my own server to prevent this
failure, specificially for the case that the primary sources updates the
files.

The old files should still be retrievable from ftp.stack.nl if they are
modified on the GNU servers. Maybe this secondary server was temporarily
unavailable?

That said, it is generally a good idea to keep your ports tree
up-to-date, rather than to stick with a static snapshort ports tree
from the release date.


Regards,
Johan
0 new messages