History log of /openbsd-current/usr.sbin/pkg_add/OpenBSD/md5.pm
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.20 13-Jun-2023 espie

move to use v5.36;
tested by me over the last few weeks, and tb@
also fixed a "manual install" bug properly reported by tb@

aside that there should be *no functional change*.
If you see any message like "hey, the number of params is wrong"
it is a fringe case I didn't run into and should be easy to fix.


# 1.19 16-May-2023 espie

explain why there is a hierarchy with one single subclass, because
we never know when we may need to change crypto-hashes!


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.18 05-Jul-2019 espie

revisit die messages: remove extra "\n", add $! if needed, don't use
string concat as die takes a list like print.


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.17 07-Mar-2017 espie

Digest::SHA is nasty: it shows an incomplete error message if the
file can't be read properly (got a Read error on delete),
so stop trying to do things ourselves, just wrap the error to inject
a decent error message, catching inexistent files and read errors in
the process.


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.16 31-Jan-2014 espie

@md5 annotations died at the end of 2008, so it's reasonable to scrape the
code now.


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.15 27-Jun-2011 espie

add useless method for tied readability


# 1.14 21-May-2011 espie

add legacy support for old sha256 checksums in distinfos.


Revision tags: OPENBSD_4_9_BASE
# 1.13 24-Dec-2010 espie

handle failures from ports tree with more care.
this does avoid infinite loops in case of wrong plists.
necessary since print-plist-with-depends CAN fail...


# 1.12 27-Oct-2010 espie

initial scaffolding for @rcscript: for now, acts like normal files,
but allow absolute pathnames (treat that as an implicit @cwd).


Revision tags: OPENBSD_4_8_BASE
# 1.11 30-Jun-2010 espie

allow say and errsay to work without parameters, as it's ways common.
create verbose_system up in state, because it makes sense without verbose.


# 1.10 30-Jun-2010 espie

whitespace cleanup


# 1.9 10-May-2010 espie

whitespace fixes


Revision tags: OPENBSD_4_7_BASE
# 1.8 31-Dec-2009 espie

sha256 is the common case, no need to delay loading.


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.7 06-Oct-2008 espie

turn the checksums stored in packing elements into real objects, so that
pkg_add becomes mostly independent of the type of checksum stored.

separate md5 into an abstract OpenBSD::digest class and an md5 subclass
with specific methods to compute checksums and serialize results, and create
an sha class that does the same thing with sha256 (with a base64 serializer)


Revision tags: OPENBSD_4_4_BASE
# 1.6 11-Jun-2008 espie

refactor md5 code to be able to work from a filehandle (like a pipe output)


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.5 02-May-2007 espie

$o->method() becomes $o->method


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.4 12-Nov-2004 espie

don't store hexdigest internally.


Revision tags: OPENBSD_3_6_BASE
# 1.3 06-Aug-2004 espie

unified headers, switch to smaller copyright notice.


Revision tags: OPENBSD_3_5_BASE
# 1.2 27-Jan-2004 espie

avoid File::IO, one less module to load.
catch more error conditions and die in a systematic way.
okay sturm@


# 1.1 16-Oct-2003 espie

branches: 1.1.1;
Initial revision


# 1.18 05-Jul-2019 espie

revisit die messages: remove extra "\n", add $! if needed, don't use
string concat as die takes a list like print.


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.17 07-Mar-2017 espie

Digest::SHA is nasty: it shows an incomplete error message if the
file can't be read properly (got a Read error on delete),
so stop trying to do things ourselves, just wrap the error to inject
a decent error message, catching inexistent files and read errors in
the process.


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.16 31-Jan-2014 espie

@md5 annotations died at the end of 2008, so it's reasonable to scrape the
code now.


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.15 27-Jun-2011 espie

add useless method for tied readability


# 1.14 21-May-2011 espie

add legacy support for old sha256 checksums in distinfos.


Revision tags: OPENBSD_4_9_BASE
# 1.13 24-Dec-2010 espie

handle failures from ports tree with more care.
this does avoid infinite loops in case of wrong plists.
necessary since print-plist-with-depends CAN fail...


# 1.12 27-Oct-2010 espie

initial scaffolding for @rcscript: for now, acts like normal files,
but allow absolute pathnames (treat that as an implicit @cwd).


Revision tags: OPENBSD_4_8_BASE
# 1.11 30-Jun-2010 espie

allow say and errsay to work without parameters, as it's ways common.
create verbose_system up in state, because it makes sense without verbose.


# 1.10 30-Jun-2010 espie

whitespace cleanup


# 1.9 10-May-2010 espie

whitespace fixes


Revision tags: OPENBSD_4_7_BASE
# 1.8 31-Dec-2009 espie

sha256 is the common case, no need to delay loading.


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.7 06-Oct-2008 espie

turn the checksums stored in packing elements into real objects, so that
pkg_add becomes mostly independent of the type of checksum stored.

separate md5 into an abstract OpenBSD::digest class and an md5 subclass
with specific methods to compute checksums and serialize results, and create
an sha class that does the same thing with sha256 (with a base64 serializer)


Revision tags: OPENBSD_4_4_BASE
# 1.6 11-Jun-2008 espie

refactor md5 code to be able to work from a filehandle (like a pipe output)


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.5 02-May-2007 espie

$o->method() becomes $o->method


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.4 12-Nov-2004 espie

don't store hexdigest internally.


Revision tags: OPENBSD_3_6_BASE
# 1.3 06-Aug-2004 espie

unified headers, switch to smaller copyright notice.


Revision tags: OPENBSD_3_5_BASE
# 1.2 27-Jan-2004 espie

avoid File::IO, one less module to load.
catch more error conditions and die in a systematic way.
okay sturm@


# 1.1 16-Oct-2003 espie

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.17 07-Mar-2017 espie

Digest::SHA is nasty: it shows an incomplete error message if the
file can't be read properly (got a Read error on delete),
so stop trying to do things ourselves, just wrap the error to inject
a decent error message, catching inexistent files and read errors in
the process.


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.16 31-Jan-2014 espie

@md5 annotations died at the end of 2008, so it's reasonable to scrape the
code now.


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.15 27-Jun-2011 espie

add useless method for tied readability


# 1.14 21-May-2011 espie

add legacy support for old sha256 checksums in distinfos.


Revision tags: OPENBSD_4_9_BASE
# 1.13 24-Dec-2010 espie

handle failures from ports tree with more care.
this does avoid infinite loops in case of wrong plists.
necessary since print-plist-with-depends CAN fail...


# 1.12 27-Oct-2010 espie

initial scaffolding for @rcscript: for now, acts like normal files,
but allow absolute pathnames (treat that as an implicit @cwd).


Revision tags: OPENBSD_4_8_BASE
# 1.11 30-Jun-2010 espie

allow say and errsay to work without parameters, as it's ways common.
create verbose_system up in state, because it makes sense without verbose.


# 1.10 30-Jun-2010 espie

whitespace cleanup


# 1.9 10-May-2010 espie

whitespace fixes


Revision tags: OPENBSD_4_7_BASE
# 1.8 31-Dec-2009 espie

sha256 is the common case, no need to delay loading.


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.7 06-Oct-2008 espie

turn the checksums stored in packing elements into real objects, so that
pkg_add becomes mostly independent of the type of checksum stored.

separate md5 into an abstract OpenBSD::digest class and an md5 subclass
with specific methods to compute checksums and serialize results, and create
an sha class that does the same thing with sha256 (with a base64 serializer)


Revision tags: OPENBSD_4_4_BASE
# 1.6 11-Jun-2008 espie

refactor md5 code to be able to work from a filehandle (like a pipe output)


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.5 02-May-2007 espie

$o->method() becomes $o->method


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.4 12-Nov-2004 espie

don't store hexdigest internally.


Revision tags: OPENBSD_3_6_BASE
# 1.3 06-Aug-2004 espie

unified headers, switch to smaller copyright notice.


Revision tags: OPENBSD_3_5_BASE
# 1.2 27-Jan-2004 espie

avoid File::IO, one less module to load.
catch more error conditions and die in a systematic way.
okay sturm@


# 1.1 16-Oct-2003 espie

branches: 1.1.1;
Initial revision