Package: gnarwl / 3.6.dfsg-11

reproducible_build.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Index: gnarwl.git/data/Makefile
===================================================================
--- gnarwl.git.orig/data/Makefile
+++ gnarwl.git/data/Makefile
@@ -19,6 +19,6 @@ install:
 	install -m 644 footer.txt $(DESTDIR)$(HOMEDIR)
 	mkdir -p $(DESTDIR)/usr/share/gnarwl
 	install -m 600 gnarwl.cfg $(DESTDIR)/usr/share/gnarwl/gnarwl.cfg.template
-	cat badheaders.txt | $(DESTDIR)$(SBINDIR)/$(SBIN) -a $(DESTDIR)$(HOMEDIR)/badheaders.db
-	cat blacklist.txt | $(DESTDIR)$(SBINDIR)/$(SBIN) -a $(DESTDIR)$(HOMEDIR)/blacklist.db
+	cat badheaders.txt | $(DESTDIR)$(SBINDIR)/$(SBIN) -na $(DESTDIR)$(HOMEDIR)/badheaders.db
+	cat blacklist.txt | $(DESTDIR)$(SBINDIR)/$(SBIN) -na $(DESTDIR)$(HOMEDIR)/blacklist.db
 
Index: gnarwl.git/src/damnit.c
===================================================================
--- gnarwl.git.orig/src/damnit.c
+++ gnarwl.git/src/damnit.c
@@ -14,6 +14,9 @@
 // How to display data
 char *format="%time -> %entry\n";
 
+// Whether to add a timestamp to the file
+int timestamp=1;
+
 /**
  * Print usage information
  */
@@ -22,6 +25,7 @@ void printUsage() {
   Damnit is a tool for listing/editing gnarwl's database files.\n\
   Options:\n\n\
   \t-h\t\t\t print usage information\n\
+  \t-n\t\t\t don't add a timestamp to the file\n\
   \t-d <file> [<value>]\t delete <value> from <file>\n\
   \t-a <file> [<value>]\t add <value> to <file>\n\
   \t-l <file>\t\t list database file\n\
@@ -104,7 +108,7 @@ void addToFile(char *fname, char *entry)
     exit(EXIT_FAILURE);
   }
 
-  t=time(NULL);
+  t=timestamp ? time(NULL) : 0;
   key.dptr=entry;
   key.dsize=strlen(entry)+1;
   val.dptr=(char*)malloc(sizeof(t));
@@ -158,9 +162,10 @@ int main(int argc,char **argv) {
   
   if (argc==1) printUsage();
   
-  while ((ch = getopt(argc, argv, "hf:l:a:d:")) != EOF) {
+  while ((ch = getopt(argc, argv, "hnf:l:a:d:")) != EOF) {
     switch((char)ch) {
       case 'h': printUsage();
+      case 'n': {timestamp=0;};
       case 'f': {format=optarg;break;}
       case 'l': {
         listFile(optarg);