Debian Codegraph @

debian/patches/02-debian-fhs-dumpdates-path-src

raw
1 Description: make dumpdates path in docs match Debian configuration
2 Author: Bdale Garbee <[email protected]>, Jose M Calhariz <[email protected]>
3
4 Index: amanda.git/client-src/amandates.c
5 ===================================================================
6 --- amanda.git.orig/client-src/amandates.c 2017-10-07 20:36:18.689973980 +0100
7 +++ amanda.git/client-src/amandates.c 2017-10-07 20:36:18.645973841 +0100
8 @@ -28,7 +28,7 @@
9 /*
10 * $Id: amandates.c,v 1.21 2006/07/25 18:35:21 martinea Exp $
11 *
12 - * manage amandates file, that mimics /etc/dumpdates, but stores
13 + * manage amandates file, that mimics /var/lib/dumpdates, but stores
14 * GNUTAR dates
15 */
16
17 @@ -333,7 +333,7 @@ import_dumpdates(
18
19 devname = amname_to_devname(amdp->name);
20
21 - if((dumpdf = fopen("/etc/dumpdates", "r")) == NULL) {
22 + if((dumpdf = fopen("/var/lib/dumpdates", "r")) == NULL) {
23 amfree(devname);
24 return;
25 }
26 Index: amanda.git/client-src/selfcheck.c
27 ===================================================================
28 --- amanda.git.orig/client-src/selfcheck.c 2017-10-07 20:36:18.689973980 +0100
29 +++ amanda.git/client-src/selfcheck.c 2017-10-07 20:36:18.653973866 +0100
30 @@ -1581,8 +1581,8 @@ check_overall(void)
31 delete_message(selfcheck_print_message(check_file_message(COMPRESS_PATH, X_OK)));
32
33 if (need_dump || need_xfsdump ) {
34 - if (check_file_exist("/etc/dumpdates")) {
35 - delete_message(selfcheck_print_message(check_file_message("/etc/dumpdates",
36 + if (check_file_exist("/var/lib/dumpdates")) {
37 + delete_message(selfcheck_print_message(check_file_message("/var/lib/dumpdates",
38 #ifdef USE_RUNDUMP
39 F_OK
40 #else
41 @@ -1602,8 +1602,8 @@ check_overall(void)
42 }
43
44 if (need_vdump) {
45 - if (check_file_exist("/etc/vdumpdates")) {
46 - delete_message(selfcheck_print_message(check_file_message("/etc/vdumpdates", F_OK)));
47 + if (check_file_exist("/var/lib/vdumpdates")) {
48 + delete_message(selfcheck_print_message(check_file_message("/var/lib/vdumpdates", F_OK)));
49 }
50 }
51
52 @@ -1615,6 +1615,7 @@ check_overall(void)
53 check_space(AMANDA_DBGDIR, (off_t)64); /* for amandad i/o */
54 #endif
55
56 + check_space("/var/lib", (off_t)64); /* for /var/lib/dumpdates writing */
57 check_space("/etc", (off_t)64); /* for /etc/dumpdates writing */
58 }
59 }
60 Index: amanda.git/server-src/diskfile.h
61 ===================================================================
62 --- amanda.git.orig/server-src/diskfile.h 2017-10-07 20:36:18.689973980 +0100
63 +++ amanda.git/server-src/diskfile.h 2017-10-07 20:36:18.661973891 +0100
64 @@ -120,7 +120,7 @@ typedef struct disk_s {
65 char *clnt_decrypt_opt; /* client-side decryption option parameter to use */
66 double comprate[2]; /* default compression rates */
67 /* flag options */
68 - int record; /* record dump in /etc/dumpdates ? */
69 + int record; /* record dump in /var/lib/dumpdates ? */
70 int skip_incr; /* incs done externally ? */
71 int skip_full; /* fulls done externally ? */
72 int orig_holdingdisk; /* original holdingdisk setting */
73 Index: amanda.git/common-src/ammessage.c
74 ===================================================================
75 --- amanda.git.orig/common-src/ammessage.c 2017-10-07 20:36:18.689973980 +0100
76 +++ amanda.git/common-src/ammessage.c 2017-10-07 20:36:18.677973942 +0100
77 @@ -1424,7 +1424,7 @@ set_message(
78 } else if (message->code == 3600085) {
79 msg = "unable to open /etc/amandapass: %{errnostr}";
80 } else if (message->code == 3600086) {
81 - msg = "dump will not be able to create the /etc/dumpdates file: %{errnostr}";
82 + msg = "dump will not be able to create the /var/lib/dumpdates file: %{errnostr}";
83 } else if (message->code == 3600087) {
84 msg = "%{device}: samba access error: %{errmsg}";
85 } else if (message->code == 3600088) {