Changeset 1043 in MondoRescue for trunk/mondo
- Timestamp:
- Jan 8, 2007, 11:31:22 PM (18 years ago)
- Location:
- trunk/mondo
- Files:
-
- 15 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/ChangeLog
r923 r1043 7 7 - asprintf used instead of malloc_string + sprintf/strcpy/strcat without verifications. Optimisations on memory consumption (allocate only size needed + remove memory leaks) (Bruno Cornec) 8 8 - Internationalization (A huge thank to rene-marc dolhen <rmd_at_mecreant.org> who achieved that big task) 9 10 2.2.1 (2006-12-23) 11 - Fix a memory allocation bug in gen_aux_list (Klaus Ade Johnstad/Andree Leidenfrost) 12 - fedora core 6 and suse 10.2 support added in build process (Bruno Cornec) 13 - Fix a bug where grub.conf was a symlink (Bruno Cornec) 14 - mondo now supports gzip compression format (-G option) (#113) (Bruno Cornec) 15 - ACL and XATTR are now NOT backed up anymore by default. Should increase mondoarchive speed. To handle them as before, please use the -z option. Fix Bug #63 (Bruno Cornec) 16 - Fix a bug in libmondo-fifo.c where potentially no buffer content could let mondo runni ng forever in case of an exception (Bruno Cornec) 17 - Fix a bug where ps (busybox) and ps (system) do not give PID in the same column (Bruno Cornec) 18 - TAG is now per package (Bruno Cornec) 19 - Add CentOS build support (Andy Wright/Bruno Cornec) 20 - Fix bug #89 (env var were queried too early, and not ncessarily in PXE mode) (Bruno Cornec) 21 - fix #66 (setfacl not existing => no error) (Bruno Cornec) 22 - Removal of grep -w|-x during restore as not supported by busybox fixes bug #101 (Alfred Chua/Bruno Cornec) 23 - Fix a bug with DVD+RW format, when mondo asks for retry without success indifinitely (Mariano Aliaga) 24 - Fix Bug #90 mondoarchive fails when using space in the prefix (Bruno Cornec) 25 - Fix Bug #87 LABEL= swap does not come online after mondorestore (Bruno Cornec) 26 - Source directory for mondo is now src (compatibility with trunk) (Bruno Cornec) 9 27 10 28 2.2.0 (2006-10-04) … … 26 44 - Fix for bug #21 prefix taken from PXE server first (Bruno Cornec) 27 45 - Fix for bug #24 ps options (Bruno Cornec) 28 >>>>>>> .merge-right.r88829 46 30 47 2.0.9 (2006-08-04) -
trunk/mondo/distributions/rpm/mondo.spec
r904 r1043 19 19 ExcludeArch: ppc 20 20 OBS 21 Requires: mindi >= 1.2. 0, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, DDD21 Requires: mindi >= 1.2.1, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, DDD 22 22 %ifarch ia64 23 23 Requires: elilo, parted -
trunk/mondo/src/common/libmondo-archive.c
r962 r1043 546 546 char *command = NULL; 547 547 char *use_lzo_sz = NULL; 548 char *use_gzip_sz = NULL; 548 549 char *use_comp_sz = NULL; 549 550 char *use_star_sz = NULL; … … 607 608 } else { 608 609 mr_asprintf(&use_lzo_sz, "no"); 610 } 611 if (bkpinfo->use_gzip) { 612 mr_asprintf(&use_gzip_sz, "yes"); 613 } else { 614 mr_asprintf(&use_gzip_sz, "no"); 609 615 } 610 616 if (bkpinfo->use_star) { … … 861 867 "mindi --custom %s %s/images '%s' '%s' \ 862 868 '%s' %ld '%s' '%s' '%s' \ 863 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d %s", bkpinfo->tmpdir, // parameter #2869 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s'", bkpinfo->tmpdir, // parameter #2 864 870 bkpinfo->scratchdir, // parameter #3 865 871 bkpinfo->kernel_path, // parameter #4 … … 879 885 bkpinfo->internal_tape_block_size, // parameter #18 (LONG) 880 886 bkpinfo->differential, // parameter #19 (INT) 887 use_gzip_sz, // parameter #20 (STRING) 881 888 tmp); 882 889 mr_free(tmp); … … 891 898 mr_free(devs_to_exclude); 892 899 mr_free(use_lilo_sz); 900 mr_free(use_gzip_sz); 893 901 894 902 log_msg(2, command); -
trunk/mondo/src/common/libmondo-filelist.c
r991 r1043 428 428 char *syscall; 429 429 char *file_to_analyze = NULL; 430 char *strtmp = NULL; 430 431 int i; 431 432 size_t n = 0; … … 452 453 log_msg(8, "Analyzing %s", file_to_analyze); 453 454 /* BERLIOS : to be checked */ 454 mr_asprintf(&syscall, "%s %s 2>> /dev/null", syscall_sprintf,mr_stresc(file_to_analyze, "`$\\\"", '\\')); 455 mr_asprintf(&strtmp, syscall_sprintf, mr_stresc(file_to_analyze, "`$\\\"", '\\')); 456 mr_asprintf(&syscall, "%s 2>> /dev/null", strtmp); 457 paranoid_free(strtmp); 455 458 call_exe_and_pipe_output_to_fd(syscall, pout); 456 459 mr_free(syscall); -
trunk/mondo/src/common/libmondo-files.c
r903 r1043 1205 1205 if (bkpinfo->use_lzo) { 1206 1206 scratchLL = (scratchLL * 2) / 3; 1207 } else if (bkpinfo->use_gzip) { 1208 scratchLL = (scratchLL * 2) / 3; 1207 1209 } else { 1208 1210 scratchLL = scratchLL / 2; -
trunk/mondo/src/common/libmondo-tools.c
r1000 r1043 431 431 mr_allocstr(bkpinfo->zip_exe, "lzop"); 432 432 mr_allocstr(bkpinfo->zip_suffix, "lzo"); 433 } else if (bkpinfo->use_gzip) { 434 strcpy(bkpinfo->zip_exe, "gzip"); 435 strcpy(bkpinfo->zip_suffix, "gz"); 436 } else if (bkpinfo->use_gzip) { 437 strcpy(bkpinfo->zip_exe, "gzip"); 438 strcpy(bkpinfo->zip_suffix, "gz"); 433 439 } else if (bkpinfo->compression_level != 0) { 434 440 mr_allocstr(bkpinfo->zip_exe, "bzip2"); … … 753 759 mr_free(bkpinfo->restore_path); 754 760 bkpinfo->use_lzo = FALSE; 761 bkpinfo->use_gzip = FALSE; 762 bkpinfo->do_not_compress_these[0] = '\0'; 755 763 bkpinfo->verify_data = FALSE; 756 764 bkpinfo->backup_data = FALSE; … … 909 917 } 910 918 retval += whine_if_not_found("bzip2"); 919 retval += whine_if_not_found("gzip"); 911 920 retval += whine_if_not_found("awk"); 912 921 retval += whine_if_not_found("md5sum"); -
trunk/mondo/src/common/libmondo-verify.c
r956 r1043 238 238 if (bkpinfo->use_lzo) { 239 239 mr_asprintf(&sz_exe, "lzop"); 240 else if (bkpinfo->use_gzip) { 241 strcpy(sz_exe, "gzip"); 242 } else if (bkpinfo->use_gzip) { 243 strcpy(sz_exe, "gzip"); 240 244 } else { 241 245 mr_asprintf(&sz_exe, "bzip2"); … … 409 413 mr_allocstr(bkpinfo->zip_suffix, "lzo"); 410 414 bkpinfo->use_lzo = TRUE; 415 bkpinfo->use_gzip = FALSE; 416 } 417 if (strstr(tarball_fname, ".gz") 418 && strcmp(bkpinfo->zip_suffix, "gz")) { 419 log_msg(2, "OK, I'm going to start using gzip."); 420 strcpy(bkpinfo->zip_exe, "gzip"); 421 strcpy(bkpinfo->zip_suffix, "gz"); 422 bkpinfo->use_lzo = FALSE; 423 bkpinfo->use_gzip = TRUE; 411 424 } 412 425 if (strstr(tarball_fname, ".bz2") … … 416 429 mr_allocstr(bkpinfo->zip_suffix, "bz2"); 417 430 bkpinfo->use_lzo = FALSE; 431 bkpinfo->use_gzip = FALSE; 418 432 } 419 433 unlink(outlog); -
trunk/mondo/src/common/mondostructures.h
r900 r1043 387 387 */ 388 388 bool use_lzo; 389 390 /** 391 * If TRUE, then use @c gzip to compress data. 392 * This is used mainly in estimates. The backup/restore may or may 393 * not work if you do not set this. You should also set @p zip_exe 394 * and @p zip_suffix. 395 */ 396 bool use_gzip; 397 398 /** 399 * A filename containing a list of extensions, one per line, to not 400 * compress. If this is set to "", afio will still exclude a set of well-known 401 * compressed files from compression, but biggiefiles that are compressed 402 * will be recompressed again. 403 */ 404 char do_not_compress_these[MAX_STR_LEN / 2]; 389 405 390 406 /** -
trunk/mondo/src/mondoarchive/mondo-cli.c
r956 r1043 799 799 } 800 800 801 if (flag_set['G']) { 802 bkpinfo->use_gzip = TRUE; 803 if (run_program_and_log_output("which gzip", FALSE)) { 804 retval++; 805 log_to_screen 806 ("Please install gzip. You can't use '-G' until you do.\n"); 807 } 808 } 809 801 810 if (!flag_set['o'] 802 811 && … … 893 902 while ((opt = 894 903 getopt(argc, argv, 895 "0123456789A:B:C:DE:F HI:J:K:LNOP:QRS:T:VWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z"))904 "0123456789A:B:C:DE:FGHI:J:K:LNOP:QRS:T:VWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z")) 896 905 != -1) { 897 906 if (opt == '?') { -
trunk/mondo/src/mondorestore/mondo-restore.c
r973 r1043 1002 1002 char *outfile_fname = NULL; 1003 1003 char *tmp = NULL; 1004 char *tmp0 = NULL; 1004 1005 char *tmp1 = NULL; 1005 1006 char *tmp2 = NULL; … … 1157 1158 for (sliceno = 1, finished = FALSE; !finished;) { 1158 1159 tmp = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, ""); 1160 tmp0 = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "gz"); 1159 1161 tmp1 = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "lzo"); 1160 1162 tmp2 = slice_fname(bigfileno, sliceno, ARCHIVES_PATH, "bz2"); 1161 if (!does_file_exist(tmp) && !does_file_exist(tmp1) && 1163 if (!does_file_exist(tmp) && 1164 !does_file_exist(tmp0) && 1165 !does_file_exist(tmp1) && 1162 1166 !does_file_exist(tmp2)) { 1163 1167 log_msg(3, … … 1190 1194 if (does_file_exist(tmp1)) { 1191 1195 mr_asprintf(&bzip2_command, "lzop -dc %s 2>> %s",tmp1, MONDO_LOGFILE); 1196 } else if (does_file_exist(tmp0)) { 1197 mr_asprintf(&bzip2_command, "gzip -dc %s 2>> %s",tmp0, MONDO_LOGFILE); 1192 1198 } else if (does_file_exist(tmp2)) { 1193 1199 mr_asprintf(&bzip2_command, "bzip2 -dc %s 2>> %s",tmp2, MONDO_LOGFILE); … … 1616 1622 if (strstr(tarball_fname, ".bz2")) { 1617 1623 mr_asprintf(&executable, "bzip2"); 1624 } else if (strstr(tarball_fname, ".gz")) { 1625 strcpy(executable, "gzip"); 1626 } else if (strstr(tarball_fname, ".gz")) { 1627 strcpy(executable, "gzip"); 1618 1628 } else if (strstr(tarball_fname, ".lzo")) { 1619 1629 mr_asprintf(&executable, "lzop"); -
trunk/mondo/src/mondorestore/mondo-rstr-compare.c
r900 r1043 241 241 if (strstr(tarball_fname, ".bz2")) { 242 242 mr_asprintf(&compressor_exe, "bzip2"); 243 } else if (strstr(tarball_fname, ".gz")) { 244 strcpy(compressor_exe, "gzip"); 245 } else if (strstr(tarball_fname, ".gz")) { 246 strcpy(compressor_exe, "gzip"); 243 247 } else if (strstr(tarball_fname, ".lzo")) { 244 248 mr_asprintf(&compressor_exe, "lzop"); -
trunk/mondo/src/mondorestore/mondo-rstr-tools.c
r972 r1043 952 952 mr_allocstr(bkpinfo->zip_exe, "lzop"); 953 953 mr_allocstr(bkpinfo->zip_suffix, "lzo"); 954 bkpinfo->use_gzip = FALSE; 954 955 } else { 955 956 mr_free(value); 956 read_cfg_var(cfg_file, "use- comp", value);957 read_cfg_var(cfg_file, "use-gzip", value); 957 958 if (strstr(value, "yes")) { 958 959 bkpinfo->use_lzo = FALSE; 959 mr_allocstr(bkpinfo->zip_exe, "bzip2"); 960 mr_allocstr(bkpinfo->zip_suffix, "bz2"); 960 bkpinfo->use_gzip = TRUE; 961 mr_allocstr(bkpinfo->zip_exe, "gzip"); 962 mr_allocstr(bkpinfo->zip_suffix, "gz"); 961 963 } else { 962 // Just to be sure 963 bkpinfo->zip_exe = NULL; 964 bkpinfo->zip_suffix = NULL; 964 read_cfg_var(cfg_file, "use-comp", value); 965 if (strstr(value, "yes")) { 966 bkpinfo->use_lzo = FALSE; 967 bkpinfo->use_gzip = FALSE; 968 mr_allocstr(bkpinfo->zip_exe, "bzip2"); 969 mr_allocstr(bkpinfo->zip_suffix, "bz2"); 970 } else { 971 // Just to be sure 972 bkpinfo->zip_exe = NULL; 973 bkpinfo->zip_suffix = NULL; 974 } 965 975 } 966 976 } -
trunk/mondo/src/restore-scripts/mondo/hack-fstab
r588 r1043 1 1 #!/bin/sh 2 2 # 3 # $Id$ 3 4 # 4 #5 #6 #7 # 2003/08/048 # - added some logging9 #10 # mid-2002 --- created11 ################################################12 13 5 14 6 LogIt() { 15 7 echo "$1" >> /dev/stderr 16 8 } 17 18 19 9 20 10 … … 33 23 # echo "original_fstab_line = $original_fstab_line" >> /dev/stderr 34 24 if [ "`grep "LABEL=" $old_fstab`" != "" ] ; then 35 if [ "$format" = "ext2" ] || [ "$format" = "ext3" ] ; then36 device="LABEL=$mountpoint"37 fi25 if [ "$format" = "ext2" ] || [ "$format" = "ext3" ] ; then 26 device="LABEL=$mountpoint" 27 fi 38 28 fi 39 29 … … 44 34 if [ "$original_fstab_line" != "" ] ; then 45 35 # echo $original_fstab_line | gawk '{i=index($0,$4); print substr($0,i);}' 46 echo "$original_fstab_line" | cut -d' ' -f4-19 | tr -s ' ' ' '36 echo "$original_fstab_line" | cut -d' ' -f4-19 | tr -s ' ' ' ' 47 37 else 48 echo -e "defaults 0 0"38 echo -e "defaults 0 0" 49 39 fi 50 40 } 51 52 41 53 42 -
trunk/mondo/src/restore-scripts/mondo/restore-bigfiles-from-iso
r588 r1043 63 63 if echo "$slicename" | grep "bz2" > /dev/null ; then 64 64 bzip2 -dc $slicename >> "$OUTFNAME" || Die "Failed to decompress slice $slicename" 65 elif echo "$slicename" | grep "gz" > /dev/null ; then 66 gzip -dc $slicename >> "$OUTFNAME" || Die "Failed to decompress slice $slicename" 65 67 elif echo "$slicename" | grep "lzo" > /dev/null ; then 66 68 lzop -dc $slicename >> "$OUTFNAME" || Die "Failed to decompress slice $slicename" -
trunk/mondo/src/restore-scripts/mondo/stabgrub-me
r839 r1043 32 32 LogIt "No need for fstab search." 2 33 33 # fstab_list=/mnt/RESTORING/etc/fstab 34 old_fstab=/mnt/RESTORING/etc/fstab35 old_grubconf=/mnt/RESTORING/etc/grub.conf34 old_fstab=/mnt/RESTORING/etc/fstab 35 old_grubconf=/mnt/RESTORING/etc/grub.conf 36 36 # For some distros, e.g. Debian, /etc/grub.conf is a symbolic link 37 # which we need to resolve and prepend with /mnt/RESTORING because38 # we run this outside the chroot.39 if [ -L "$old_grubconf" ] ; then40 old_grubconf=/mnt/RESTORING`readlink "$old_grubconf"`41 fi42 return 037 # which we need to resolve and prepend with /mnt/RESTORING because 38 # we run this outside the chroot. 39 if [ -L "$old_grubconf" ] ; then 40 old_grubconf=/mnt/RESTORING/etc/`readlink "$old_grubconf"` 41 fi 42 return 0 43 43 elif [ -f "/mnt/cdrom/archives/CUCKOO" ] ; then 44 44 LogIt "Because I'm cuckoo, I'll stop searching." 2
Note:
See TracChangeset
for help on using the changeset viewer.