Re: [gentoo-portage-dev] Normaliser function for distfiles

2022-05-16 Thread Robin H. Johnson
On Mon, May 16, 2022 at 07:37:40PM +0200, Markus Walter wrote:
> Hello all,
> 
> is it possible to do the following: after fetching a distfile portage runs
> an external normaliser program specified in an ebuild before checking the
> hash?
> 
> My use case is the following: I would like to improve the gs-elpa program
> and provide a precomputed overlay for melpa. However the melpa distfiles are
> rebuilt everyday and cause checksum failures. However the only thing
> changing are the timestamps. Hence if a normaliser program could simply set
> all timestamps to some predefined value (say 1.1.1970) then this problem
> should vanish.
I don't know what 'gs-elpa' & 'Melpa' are, but maybe talking to upstream
would be good here, and improving that behavior.

If the file contents or non-timestamp metadata change, absolutely the
timestamps should change. But otherwise, the timestamp should NOT
change.

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail   : robb...@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136


signature.asc
Description: PGP signature


Re: [gentoo-portage-dev] Normaliser function for distfiles

2022-05-16 Thread Zac Medico

On 5/16/22 10:37, Markus Walter wrote:

Hello all,

is it possible to do the following: after fetching a distfile portage runs
an external normaliser program specified in an ebuild before checking the
hash?

My use case is the following: I would like to improve the gs-elpa program
and provide a precomputed overlay for melpa. However the melpa distfiles are
rebuilt everyday and cause checksum failures. However the only thing
changing are the timestamps. Hence if a normaliser program could simply set
all timestamps to some predefined value (say 1.1.1970) then this problem
should vanish.

Thanks in advance

   Markus



The only usable hook that we currently have for this is FETCHCOMMAND and 
RESUMCOMMAND in make.conf. You can replace them with a script that does 
the normal thing and then sets the timestamp. The default values are 
found in /usr/share/portage/config/make.globals.

--
Thanks,
Zac


OpenPGP_signature
Description: OpenPGP digital signature


[gentoo-portage-dev] Normaliser function for distfiles

2022-05-16 Thread Markus Walter
Hello all,

is it possible to do the following: after fetching a distfile portage runs
an external normaliser program specified in an ebuild before checking the
hash?

My use case is the following: I would like to improve the gs-elpa program
and provide a precomputed overlay for melpa. However the melpa distfiles are
rebuilt everyday and cause checksum failures. However the only thing
changing are the timestamps. Hence if a normaliser program could simply set
all timestamps to some predefined value (say 1.1.1970) then this problem
should vanish.

Thanks in advance

  Markus

-- 
For instance, on the planet Earth, man had always assumed that he was more
intelligent than dolphins because he had achieved so much---the wheel, New
York, wars and so on---while all the dolphins had ever done was muck about
in the water having a good time. But conversely, the dolphins had always
believed that they were far more intelligent than man---for precisely the
same reasons. (Douglas Adams, The Hitchhikers Guide to the Galaxy.)