[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#774342: apt: please stop displaying time of build in online help



Source: apt
Version: 1.0.9.5
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps

Hi!

As part of the “reproducible builds” effort [1], we have noticed that
apt could not be built reproducibly.

One issue is that it uses the __DATE__ and __TIME__ macros of the C
preprocessor to display the time of build in the online help. We believe
this information not to be really useful to users as they can always
look at the package data and metadata to figure it out.

The attached patch simply removes this information. All
non-documentation packages can then be built reproducibly with our
current experimental framework.

 [1]: https://wiki.debian.org/ReproducibleBuilds

-- 
Lunar                                .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
From c8655a49602b4165569da4408472bccc3a15013c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar@debian.org>
Date: Thu, 1 Jan 2015 09:54:28 +0100
Subject: [PATCH] Stop displaying time of build in online help

This prevents apt from building reproducibly and do not give
much information to users.
---
 cmdline/apt-cache.cc            | 3 +--
 cmdline/apt-cdrom.cc            | 3 +--
 cmdline/apt-config.cc           | 3 +--
 cmdline/apt-dump-solver.cc      | 2 +-
 cmdline/apt-extracttemplates.cc | 3 +--
 cmdline/apt-get.cc              | 3 +--
 cmdline/apt-helper.cc           | 3 +--
 cmdline/apt-internal-solver.cc  | 3 +--
 cmdline/apt-mark.cc             | 3 +--
 cmdline/apt-sortpkgs.cc         | 3 +--
 cmdline/apt.cc                  | 3 +--
 ftparchive/apt-ftparchive.cc    | 3 +--
 12 files changed, 12 insertions(+), 23 deletions(-)

diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index ac0d48a..7c09f82 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1740,8 +1740,7 @@ static bool GenCaches(CommandLine &)
 /* */
 static bool ShowHelp(CommandLine &)
 {
-   ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-	    COMMON_ARCH,__DATE__,__TIME__);
+   ioprintf(cout,_("%s %s for %s\n"),PACKAGE,PACKAGE_VERSION,COMMON_ARCH);
    
    if (_config->FindB("version") == true)
      return true;
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index 53efe65..121ed65 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -204,8 +204,7 @@ static bool DoIdent(CommandLine &)
 // ShowHelp - Show the help screen					/*{{{*/
 static bool ShowHelp(CommandLine &)
 {
-   ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-	    COMMON_ARCH,__DATE__,__TIME__);
+   ioprintf(cout,_("%s %s for %s\n"),PACKAGE,PACKAGE_VERSION,COMMON_ARCH);
    if (_config->FindB("version") == true)
       return true;
    
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 40ba468..3d47830 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -80,8 +80,7 @@ static bool DoDump(CommandLine &CmdL)
 /* */
 static bool ShowHelp(CommandLine &)
 {
-   ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-	    COMMON_ARCH,__DATE__,__TIME__);
+   ioprintf(cout,_("%s %s for %s\n"),PACKAGE,PACKAGE_VERSION,COMMON_ARCH);
    if (_config->FindB("version") == true)
       return true;
    
diff --git a/cmdline/apt-dump-solver.cc b/cmdline/apt-dump-solver.cc
index 04e13bd..d599053 100644
--- a/cmdline/apt-dump-solver.cc
+++ b/cmdline/apt-dump-solver.cc
@@ -23,7 +23,7 @@
 static bool ShowHelp() {
 
 	std::cout <<
-		PACKAGE " " PACKAGE_VERSION " for " COMMON_ARCH " compiled on " __DATE__ " " __TIME__ << std::endl <<
+		PACKAGE " " PACKAGE_VERSION " for " COMMON_ARCH << std::endl <<
 		"Usage: apt-dump-resolver\n"
 		"\n"
 		"apt-dump-resolver is a dummy solver who just dumps its input to the\n"
diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc
index e4428e0..b8c4d49 100644
--- a/cmdline/apt-extracttemplates.cc
+++ b/cmdline/apt-extracttemplates.cc
@@ -214,8 +214,7 @@ bool DebFile::ParseInfo()
 /* */
 static int ShowHelp(void)
 {
-   	ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-	    COMMON_ARCH,__DATE__,__TIME__);
+   	ioprintf(cout,_("%s %s for %s\n"),PACKAGE,PACKAGE_VERSION,COMMON_ARCH);
 
 	if (_config->FindB("version") == true) 
 		return 0;
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index a285377..da3a2cb 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1588,8 +1588,7 @@ static bool DoChangelog(CommandLine &CmdL)
 /* */
 static bool ShowHelp(CommandLine &)
 {
-   ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-	    COMMON_ARCH,__DATE__,__TIME__);
+   ioprintf(cout,_("%s %s for %s\n"),PACKAGE,PACKAGE_VERSION,COMMON_ARCH);
 	    
    if (_config->FindB("version") == true)
    {
diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc
index 63f7098..112e04c 100644
--- a/cmdline/apt-helper.cc
+++ b/cmdline/apt-helper.cc
@@ -81,8 +81,7 @@ static bool DoDownloadFile(CommandLine &CmdL)
 
 static bool ShowHelp(CommandLine &)
 {
-   ioprintf(std::cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-	    COMMON_ARCH,__DATE__,__TIME__);
+   ioprintf(std::cout,_("%s %s for %s\n"),PACKAGE,PACKAGE_VERSION,COMMON_ARCH);
 
    if (_config->FindB("version") == true)
      return true;
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index 5fda7b6..0833c4e 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -42,8 +42,7 @@
 // ---------------------------------------------------------------------
 /* */
 static bool ShowHelp(CommandLine &) {
-	ioprintf(std::cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-		 COMMON_ARCH,__DATE__,__TIME__);
+	ioprintf(std::cout,_("%s %s for %s\n"),PACKAGE,PACKAGE_VERSION,COMMON_ARCH);
 
 	std::cout <<
 		_("Usage: apt-internal-solver\n"
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index ed34835..1625dc6 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -385,8 +385,7 @@ static bool ShowHold(CommandLine &CmdL)
 /* */
 static bool ShowHelp(CommandLine &)
 {
-   ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-	    COMMON_ARCH,__DATE__,__TIME__);
+   ioprintf(cout,_("%s %s for %s\n"),PACKAGE,PACKAGE_VERSION,COMMON_ARCH);
 
    cout <<
     _("Usage: apt-mark [options] {auto|manual} pkg1 [pkg2 ...]\n"
diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc
index c2b1189..d6cd7e0 100644
--- a/cmdline/apt-sortpkgs.cc
+++ b/cmdline/apt-sortpkgs.cc
@@ -144,8 +144,7 @@ static bool DoIt(string InFile)
 /* */
 static int ShowHelp()
 {
-   ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-	    COMMON_ARCH,__DATE__,__TIME__);
+   ioprintf(cout,_("%s %s for %s\n"),PACKAGE,PACKAGE_VERSION,COMMON_ARCH);
    if (_config->FindB("version") == true)
       return 0;
    
diff --git a/cmdline/apt.cc b/cmdline/apt.cc
index 2cfdf8e..c962f67 100644
--- a/cmdline/apt.cc
+++ b/cmdline/apt.cc
@@ -39,8 +39,7 @@
 
 static bool ShowHelp(CommandLine &)
 {
-   ioprintf(c1out,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-	    COMMON_ARCH,__DATE__,__TIME__);
+   ioprintf(c1out,_("%s %s for %s\n"),PACKAGE,PACKAGE_VERSION,COMMON_ARCH);
 
    // FIXME: generate from CommandLine
    c1out << 
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index ebf99a8..de67783 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -617,8 +617,7 @@ static void LoadBinDir(vector<PackageMap> &PkgList,Configuration &Setup)
 /* */
 static bool ShowHelp(CommandLine &)
 {
-   ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
-	    COMMON_ARCH,__DATE__,__TIME__);
+   ioprintf(cout,_("%s %s for %s\n"),PACKAGE,PACKAGE_VERSION,COMMON_ARCH);
    if (_config->FindB("version") == true)
       return true;
 
-- 
1.9.1

Attachment: signature.asc
Description: Digital signature


Reply to: