-
Notifications
You must be signed in to change notification settings - Fork 577
Configure: tweak config.sh for easier noise-free checksum #15411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
From @jimcCreated by @jimcThe header info in config.sh currently has a number of fields whose # Package name : perl5 The presence of these cf_* fields means that `md5sum config.sh` output So this patch tweaks Configure (or rather 2 configure units - only 1 cfx_md5=`grep -v '^#:' config.sh | grep -vE '^cf_|^my' | md5sum` So this is a small step towards adding -k<checksum> into the perl NOTES: 1- tested by tweaking Configure, appending to config.sh, building, and 2- no >> config.sh actually done here, there might be a better way.. 3- cfx_md5 could have a better name (subject to bikeshedding), 4- multiple cfx_*, each with different subsets of `cat config.sh`, For example: cfx_cfargs would neatly map the ~16 Test-Smoke configs to a small cfx_md5 as given above would define comparable builds; Perl Info
|
From @jimc[jimc@buffy perl.git]$ cat perlbug.rep This is a bug report for perl from jim.cromie@gmail.com, [Please describe your issue here] The header info in config.sh currently has a number of fields whose # Package name : perl5 The presence of these cf_* fields means that `md5sum config.sh` output So this patch tweaks Configure (or rather 2 configure units - only 1 cfx_md5=`grep -v '^#:' config.sh | grep -vE '^cf_|^my' | md5sum` So this is a small step towards adding -k<checksum> into the perl NOTES: 1- tested by tweaking Configure, appending to config.sh, building, and 2- no >> config.sh actually done here, there might be a better way.. 3- cfx_md5 could have a better name (subject to bikeshedding), 4- multiple cfx_*, each with different subsets of `cat config.sh`, For example: cfx_cfargs would neatly map the ~16 Test-Smoke configs to a small cfx_md5 as given above would define comparable builds; |
From @jimc0001-Config_sh.U-tweak-header-comments-to-mark-noisy-line.patchFrom 1c78f2af96b2505b8402c724cdf81df21665e98d Mon Sep 17 00:00:00 2001
From: Jim Cromie <[email protected]>
Date: Sat, 25 Jun 2016 12:50:25 -0600
Subject: [PATCH] Config_sh.U: tweak header comments to mark noisy lines for
checksum exclusion
The header info in config.sh currently has a number of fields whose
values are unconstrained and essentially random: ($cf_time, $cf_by,
$cf_email, $myuname).
# Package name : perl5
# Source directory : .
# Configuration time: Fri Aug 28 21:09:08 MDT 2015
# Configured by : jimc
# Target system : linux groucho.jimc.earth 4.2.0-rc7-x2a-00125-gd0b89bd #278 smp sat aug 22 13:35:17 mdt 2015 x86_64 x86_64 x86_64 gnulinux
The presence of these cf_* fields means that `md5sum config.sh` output
is all noise; otherwize identical builds done at different times by
different users will have different checksums.
So this patch tweaks Configure (or rather 2 configure units - only 1
is needed, git add -i the desired chunk) to mark those problematic
lines with a leading '#:', making them easy to exclude from a
grep|cksum calculation.
cfx_md5=`grep -v '^#:' config.sh | grep -vE '^cf_|^my' | md5sum`
echo cfx_md5=\'$cf_md5\' >> config.sh
This yields a checksum value that reflects the given config_args, and
all the platform details its being built upon. The checksum is
sensitive to the platform, despite dropping myarchname, via the
contents of cppsymbols, incpth, plibpth, gccversion, etc.
Further, with the cfx_md5 appended to config.sh as shown above, the
resulting %Config will have it, making it available for installation
tools to use.
$ ./perl -Ilib -V:cfx_md5:
cfx_md5='37e040a516936d31d0e049d95ad66b68 -'
So this is a small step towards adding -k<checksum> into the perl
executable's name, and into its @INC paths.
NOTES:
1- tested by tweaking Configure, appending to config.sh, building, and
verifying `./perl -Ilib -V:cfx_md5:`. Patched blindly into
metaconfig units.
2- no >> config.sh actually done here, there might be a better way..
3- cfx_md5 could have a better name (subject to bikeshedding),
md5 says nothing about what is included in the calculation.
4- multiple cfx_*, each with different subsets of `cat config.sh`,
could define different "equivalent configs".
For example:
cfx_cfargs=`grep config_args config.sh | md5sum`
echo cfx_cfargs=\'$cfx_cfargs\' >> config.sh
cfx_cfargs would neatly map the ~16 Test-Smoke configs to a small
set of unique and eventually recognizable [0-9a-f]{3,5} key-fragments.
cfx_md5 as given above would define comparable builds;
Porting/bench.pl performance results from 2 platforms with
identical keys should have similar results
---
U/modified/Config_sh.U | 10 +++++-----
dist/U/Config_sh.U | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/U/modified/Config_sh.U b/U/modified/Config_sh.U
index 2bbcf1b..c9d884b 100644
--- a/U/modified/Config_sh.U
+++ b/U/modified/Config_sh.U
@@ -112,11 +112,11 @@ $startsh
# instead choose to run each of the .SH files by yourself, or "Configure -S".
#
-# Package name : $package
-# Source directory : $src
-# Configuration time: $cf_time
-# Configured by : $cf_by
-# Target system : $myuname
+#: Package name : $package
+#: Source directory : $src
+#: Configuration time: $cf_time
+#: Configured by : $cf_by
+#: Target system : $myuname
EOT
?X: Command line options are saved by the Options.U unit in the
diff --git a/dist/U/Config_sh.U b/dist/U/Config_sh.U
index bb47b7b..a46b9f3 100644
--- a/dist/U/Config_sh.U
+++ b/dist/U/Config_sh.U
@@ -96,11 +96,11 @@ $startsh
# instead choose to run each of the .SH files by yourself, or "Configure -S".
#
-# Package name : $package
-# Source directory : $src
-# Configuration time: $cf_time
-# Configured by : $cf_by
-# Target system : $myuname
+#: Package name : $package
+#: Source directory : $src
+#: Configuration time: $cf_time
+#: Configured by : $cf_by
+#: Target system : $myuname
EOT
?X: Command line options are saved by the Options.U unit in the
--
2.7.4
|
1 similar comment
From @jimc0001-Config_sh.U-tweak-header-comments-to-mark-noisy-line.patchFrom 1c78f2af96b2505b8402c724cdf81df21665e98d Mon Sep 17 00:00:00 2001
From: Jim Cromie <[email protected]>
Date: Sat, 25 Jun 2016 12:50:25 -0600
Subject: [PATCH] Config_sh.U: tweak header comments to mark noisy lines for
checksum exclusion
The header info in config.sh currently has a number of fields whose
values are unconstrained and essentially random: ($cf_time, $cf_by,
$cf_email, $myuname).
# Package name : perl5
# Source directory : .
# Configuration time: Fri Aug 28 21:09:08 MDT 2015
# Configured by : jimc
# Target system : linux groucho.jimc.earth 4.2.0-rc7-x2a-00125-gd0b89bd #278 smp sat aug 22 13:35:17 mdt 2015 x86_64 x86_64 x86_64 gnulinux
The presence of these cf_* fields means that `md5sum config.sh` output
is all noise; otherwize identical builds done at different times by
different users will have different checksums.
So this patch tweaks Configure (or rather 2 configure units - only 1
is needed, git add -i the desired chunk) to mark those problematic
lines with a leading '#:', making them easy to exclude from a
grep|cksum calculation.
cfx_md5=`grep -v '^#:' config.sh | grep -vE '^cf_|^my' | md5sum`
echo cfx_md5=\'$cf_md5\' >> config.sh
This yields a checksum value that reflects the given config_args, and
all the platform details its being built upon. The checksum is
sensitive to the platform, despite dropping myarchname, via the
contents of cppsymbols, incpth, plibpth, gccversion, etc.
Further, with the cfx_md5 appended to config.sh as shown above, the
resulting %Config will have it, making it available for installation
tools to use.
$ ./perl -Ilib -V:cfx_md5:
cfx_md5='37e040a516936d31d0e049d95ad66b68 -'
So this is a small step towards adding -k<checksum> into the perl
executable's name, and into its @INC paths.
NOTES:
1- tested by tweaking Configure, appending to config.sh, building, and
verifying `./perl -Ilib -V:cfx_md5:`. Patched blindly into
metaconfig units.
2- no >> config.sh actually done here, there might be a better way..
3- cfx_md5 could have a better name (subject to bikeshedding),
md5 says nothing about what is included in the calculation.
4- multiple cfx_*, each with different subsets of `cat config.sh`,
could define different "equivalent configs".
For example:
cfx_cfargs=`grep config_args config.sh | md5sum`
echo cfx_cfargs=\'$cfx_cfargs\' >> config.sh
cfx_cfargs would neatly map the ~16 Test-Smoke configs to a small
set of unique and eventually recognizable [0-9a-f]{3,5} key-fragments.
cfx_md5 as given above would define comparable builds;
Porting/bench.pl performance results from 2 platforms with
identical keys should have similar results
---
U/modified/Config_sh.U | 10 +++++-----
dist/U/Config_sh.U | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/U/modified/Config_sh.U b/U/modified/Config_sh.U
index 2bbcf1b..c9d884b 100644
--- a/U/modified/Config_sh.U
+++ b/U/modified/Config_sh.U
@@ -112,11 +112,11 @@ $startsh
# instead choose to run each of the .SH files by yourself, or "Configure -S".
#
-# Package name : $package
-# Source directory : $src
-# Configuration time: $cf_time
-# Configured by : $cf_by
-# Target system : $myuname
+#: Package name : $package
+#: Source directory : $src
+#: Configuration time: $cf_time
+#: Configured by : $cf_by
+#: Target system : $myuname
EOT
?X: Command line options are saved by the Options.U unit in the
diff --git a/dist/U/Config_sh.U b/dist/U/Config_sh.U
index bb47b7b..a46b9f3 100644
--- a/dist/U/Config_sh.U
+++ b/dist/U/Config_sh.U
@@ -96,11 +96,11 @@ $startsh
# instead choose to run each of the .SH files by yourself, or "Configure -S".
#
-# Package name : $package
-# Source directory : $src
-# Configuration time: $cf_time
-# Configured by : $cf_by
-# Target system : $myuname
+#: Package name : $package
+#: Source directory : $src
+#: Configuration time: $cf_time
+#: Configured by : $cf_by
+#: Target system : $myuname
EOT
?X: Command line options are saved by the Options.U unit in the
--
2.7.4
|
From @jkeenanOn Sat Jun 25 13:57:13 2016, yoduh wrote:
1. There are two attachments to this RT. However, they appear to be exactly the same -- correct? 2. The patches are not drawn against the Perl 5 core distribution, so my hunch is that they're drawn against metaconfig. So they need to be evaluated by people with that system; bcc-ing some likely experts. 3. You wrote, "So this is a small step towards adding -k<checksum> into the perl executable's name, and into its @INC paths." Is that a goal that we (P5P) have set for ourselves? If not, should we? Discuss. Thank you very much.
-- |
The RT System itself - Status changed from 'new' to 'open' |
From @jimc
glad theyre exact - they should be -
true - I could have patched Configure
I almost removed that bit, to defer controversy. recently, these were added to make it easier to find differences 8dd2ecb perl -V: make configuration one per line the opposite is also true, it would be nice to know when 2 configs are this patch is the smallest step I could take, #= Package name : perl5 so I chose to mark it such that its easy to exclude from a checksum cfx_md5=`grep -v '^#=' config.sh | grep -vE '^cf_|^my' | md5sum` then cfx_md5 will change only rarely for a given config_args value supposing that cfx_md5 is unchanging for 2 months on a box, it might also be true that 2 '-des -Usedevel' builds of blead on 2 so if --write results can be grouped by one or more of then we can compute std-deviations on sets of results thats all pretty distant and speculative, -jimc Thank you very much. |
Migrated from rt.perl.org#128484 (status was 'open')
Searchable as RT128484$
The text was updated successfully, but these errors were encountered: