Re:Apt: please make the moo reproducible
by smcl on Saturday December 31, 2016 @07:38AM
(#13290781)
Took me a while (after reading through the reply, to no avail) to figure out what this refers to. Here's the feature this is referring to:
Edit: maybe not actually! Just found this too:
[ Parent
| on HN ]
Re:Apt: please make the moo reproducible
by TimWolla on Saturday December 31, 2016 @08:38AM
(#13290943)
This is “documented” as well. apt-get has got Super Cow Powers and aptitude has not.
$ apt-get
apt 1.0.9.8.4 for amd64 compiled on Dec 11 2016 09:48:19
Usage: apt-get [options] command
apt-get [options] install|remove pkg1 [pkg2 ...]
apt-get [options] source pkg1 [pkg2 ...]
…
This APT has Super Cow Powers.
$ aptitude --help
aptitude 0.6.11
Usage: aptitude [-S fname] [-u|-i]
aptitude [options] <action> ...
…
This aptitude does not have Super Cow Powers.
Re:Apt: please make the moo reproducible
by simias on Saturday December 31, 2016 @07:49AM
(#13290808)
I don't really understand what in this feature makes the build non-reproducible. Judging by the patch it's the call to time(NULL) that seems to be problematic, but I don't understand why.
The output of "apt-get moo" changes on special days (4/1, 12/25, 8/16, 11/7, 2/18). So if another program was using "apt-get moo" in its build script, the build would not be reproducible. With the patch, the SOURCE_DATE_EPOCH environment variable can be set to make "apt-get moo" deterministic.
I don't think anything actually uses "apt-get moo" in its build script.
This kind of patch makes more sense for build tools like "ar" (static library creator). By default, "ar" injects a timestamp into the output file, so the binary is different each build. But, use the "D" flag and "ar" becomes deterministic.
Re:Apt: please make the moo reproducible
by rzzzt on Saturday December 31, 2016 @08:44AM
(#13290969)
The time-dependent part can be seen here: https://github.com/Debian/apt/blob/master/apt-private/privat...
There is a second part above too:
https://github.com/Debian/apt/blob/master/apt-private/privat...
Yeh I only skimmed the patch but I presumed "reproducable build" referred to the actual binary, and the patch addresses runtime behaviour. Guess I'm missing something.
Re:Apt: please make the moo reproducible
by lamby on Saturday December 31, 2016 @07:57AM
(#13290831)
It doesn't; it makes anyone using the output...
Re:Apt: please make the moo reproducible
by karrotwaltz on Saturday December 31, 2016 @08:31AM
(#13290932)
From what I can read in patch file, it seems to be doing something different on April fools day.
Re:Apt: please make the moo reproducible
by CroCroCro on Saturday December 31, 2016 @07:53AM
(#13290821)
Keep adding more v.
Yep it gets good - wasn't sure whether to spoil the fun or not :)
Re:Apt: please make the moo reproducible
by paulddraper on Saturday December 31, 2016 @12:44PM
(#13292091)
> I got a fever! And the only prescription.. is more -v!
Re:Apt: please make the moo reproducible
by dabber on Saturday December 31, 2016 @08:14AM
(#13290883)
try
$ apt-get moo moo
$ apt-get moo moo mooTry `aptitude -vv moo` :)
Re:Apt: please make the moo reproducible
by ansgri on Saturday December 31, 2016 @11:25AM
(#13291639)
Thanks. A nice New Year's gift, to learn Super Cow Powers. Though talking about more -v's, I don't think Aptitude is written in Python, is it?