- Timestamp:
- Feb 16, 2024, 12:43:53 AM (15 months ago)
- Location:
- branches/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/MondoRescue/lib/MondoRescue/File.pm
r3795 r3801 156 156 if (defined $link) { 157 157 $link = mr_file_normalize($link,"$curdir/$dir"); 158 # It's a real symlink on a fileso handle it159 $files->{$f}->{"$curdir/$dir"} = 1 if ((not -d $link) && (not -d "/$link"));158 # It's a real symlink so handle it 159 $files->{$f}->{"$curdir/$dir"} = 1; 160 160 if (substr($link,0,1) eq "/") { 161 161 $curdir = $link; … … 170 170 foreach my $k (keys %$h) { 171 171 foreach my $l (keys %$k) { 172 # Use $f as key as we affect all the files172 # Use $f as key as we affects all the files 173 173 # found in recursion to the current managed file 174 174 $files->{$f}->{$l} = 1; -
branches/3.3/MondoRescue/t/01-read-all-link.t
r3795 r3801 7 7 # Create the structure for the tests 8 8 my $bd = tempdir( 9 #CLEANUP => 19 CLEANUP => 1 10 10 ); 11 11 … … 23 23 copy "/usr/bin/perl","usr/bin" || die "$!"; 24 24 chmod 0755,"usr/bin/perl"; 25 my $libc; 25 26 foreach my $f (<"/lib/libc.so.[0-9]*">) { 26 27 copy "$f","usr/lib" || die "$!"; 28 $libc = $f; 27 29 } 28 30 … … 55 57 ); 56 58 57 eval { 58 require Test; 59 Test->import(); 59 my $more = 1; 60 61 eval 62 { 63 require Test::More; 64 Test::More->import(); 65 no_plan(); 60 66 }; 67 # Test::More not found so simpler test 61 68 if ($@) { 62 require Test::Simple; 63 Test::Simple->import(); 69 $more = 0; 70 eval { 71 require Test; 72 Test->import(); 73 }; 74 if ($@) { 75 require Test::Simple; 76 Test::Simple->import(); 77 } 64 78 } 65 79 plan(tests => 12); … … 83 97 sub myis { 84 98 85 my $p1 = shift; 86 my $p2 = shift; 87 my $p3 = shift; 88 print "# test $p3\n"; 89 return(ok($p1,$p2)); 99 if ($more eq 1) { 100 return(is(@_)); 101 } else { 102 my $p1 = shift; 103 my $p2 = shift; 104 my $p3 = shift; 105 print "# test $p3\n"; 106 return(ok($p1,$p2)); 90 107 } 108 } 109 -
branches/3.3/ansible/roles/trac/tasks/main.yml
r3800 r3801 37 37 38 38 - name: Configure svn post-commit hook 39 lineinfile: path="/prj/svn/{{ item }}/hooks/post-commit" state=present line='/prj/trac/trac-svn-hook $1 $2 ' owner=bruno group=bruno mode=0755 backup=yes create=true39 lineinfile: path="/prj/svn/{{ item }}/hooks/post-commit" state=present line='/prj/trac/trac-svn-hook $1 $2 $3 $4' owner=bruno group=bruno mode=0755 backup=yes create=true 40 40 loop: "{{ prj }}" 41 41 -
branches/3.3/ansible/roles/trac/templates/trac.ini
r3799 r3801 76 76 tracopt.versioncontrol.git.* = enabled 77 77 tracopt.versioncontrol.svn.* = enabled 78 trac.versioncontrol.api.repositorymanager = enabled 79 trac.versioncontrol.svn_authz.svnauthzoptions = enabled 80 trac.versioncontrol.svn_fs.subversionconnector = enabled 81 trac.versioncontrol.svn_prop.subversionmergepropertydiffrenderer = enabled 82 trac.versioncontrol.svn_prop.subversionmergepropertyrenderer = enabled 83 trac.versioncontrol.svn_prop.subversionpropertyrenderer = enabled 78 84 tracspamfilter.* = enabled 79 85 trac.web.auth.loginmodule = disabled -
branches/3.3/mindi/mindi
r3795 r3801 302 302 local outdir incoming counter d found tdir templog 303 303 outdir=$1 304 noof_lines=$2305 counter=$3306 304 templog=$MINDI_TMP/$$.log 307 305 mkdir -p $outdir 308 306 incoming=`ReadLine` 307 counter=$3 309 308 > $templog 310 309 311 310 while [ "$incoming" != "" ] ; do 312 LogFile "DEBUG: Handling $incoming" 313 if [ "$noof_lines" != "0" ]; then 311 if [ "$3" = "1" ]; then 314 312 counter=$(($counter+1)) 315 LogProgress $counter $ noof_lines313 LogProgress $counter $2 316 314 fi 317 315 # Non absolute file names should not arrive till here => skipped 318 316 if [ `echo "$incoming" | cut -c1` != '/' ]; then 319 Log All "WARNING: Unable to handle $incoming"317 LogFile "WARNING: Unable to handle non-full pathname $incoming" 320 318 incoming=`ReadLine` 321 319 continue 322 320 fi 323 if [ -e "$incoming" ]; then324 LogFile "DEBUG: Adding $incoming"325 listfile="$listfile $incoming"326 fi327 incoming=`ReadLine`328 done329 330 LogAll "Creating mindi tar file"331 tar cf - -C / $listfile 2> $templog | (cd "$outdir" ; tar xf -) # || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" $templog332 }333 334 bidon() {335 336 321 # no parent directory of incoming should be a link, copy is not possible in that case 337 322 d=`dirname "$incoming"` 338 323 found="false" 339 324 while [ $d != "/" -a $found = "false" ]; do 340 if [ -h "$d" ]; then 341 found="true" 342 LogFile "WARNING: skipping $d as link" 343 incoming=`ReadLine` 344 continue 345 fi 325 [ -h "$d" ] && found="true" 346 326 d=`dirname "$d"` 347 327 done 348 349 328 if [ -d "$incoming" -a ! -h "$incoming" ]; then 350 LogFile "DEBUG: Finding in $incoming" 351 find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir 0 0 329 find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir 0 0 352 330 elif [ -e "$incoming" ] && [ $found = "false" ]; then 353 331 if [ ! -h "$incoming" ]; then 354 LogFile "DEBUG: Tarring $incoming"355 332 tar cf - -C / $incoming 2> $templog | (cd "$outdir" ; tar xf -) || Die "Cannot copy $incoming to $outdir - did you run out of disk space?" $templog 356 333 else 357 LogFile "DEBUG: Copying $incoming"358 334 tdir=`dirname "$incoming"` 359 335 if [ ! -e "$outdir/$tdir" ]; then … … 364 340 # Only uncompress modules if not using udevd 365 341 if [ "`echo "$incoming" | grep "lib/modules/.*\..*o\.gz"`" != "" ] && [ "`ps auxww | grep -v grep | grep -qw udevd`" != "" ]; then 366 342 gunzip -f $outdir/$incoming || LogAll "WARNING: Cannot gunzip $outdir/$incoming" 367 343 fi 368 344 [ -x "$outdir" ] && StripExecutable $outdir 369 345 fi 370 346 incoming=`ReadLine` 347 done 371 348 } 372 349 … … 379 356 done 380 357 echo $r 358 } 359 360 361 DropOptimizedLibraries() { 362 local outdir filelist list_of_optimized_libraries optimized_lib_name vanilla_lib_name reason msg resolved res 363 filelist=$1 364 outdir=$2 365 366 list_of_optimized_libraries=`grep "lib/i[5-7]86/" $filelist` 367 if [ "$list_of_optimized_libraries" = "" ] ; then 368 return 0 369 fi 370 echo -en "Dropping i686-optimized libraries if appropriate" 371 for optimized_lib_name in $list_of_optimized_libraries ; do 372 echo -en "." 373 reason="" 374 vanilla_lib_name=`echo "$optimized_lib_name" | sed -e 's/i[5-7]86//' -e 's/cmov//' -e 's/nosegneg//' | tr -s '/' '/'` 375 echo "$vanilla_lib_name" >> $filelist 376 LogFile "INFO: Adding $vanilla_lib_name to filelist" 377 mkdir -p $outdir$optimized_lib_name > /dev/null 2> /dev/null 378 rmdir $outdir$optimized_lib_name > /dev/null 2> /dev/null 379 380 # This may return multiple files 381 for resolved in `mr-read-all-link $vanilla_lib_name`; do 382 LogFile "INFO: Adding as deps $resolved to filelist" 383 vanilla_resolved_name=`echo "$resolved" | sed -e 's/i[5-7]86//' -e 's/cmov//' -e 's/nosegneg//' | tr -s '/' '/'` 384 if [ "$vanilla_resolved_name" != "$resolved" ]; then 385 mkdir -p $outdir$resolved> /dev/null 2> /dev/null 386 rmdir $outdir$resolved > /dev/null 2> /dev/null 387 ln -sf $vanilla_resolved_name $outdir$resolved 388 LogFile "INFO: Excluding deps $resolved" 389 grep -Fvx "$resolved" "$filelist" > $filelist.tmp 390 LogFile "INFO: Replacing it with $vanilla_resolved_name" 391 echo "$vanilla_resolved_name" >> $filelist.tmp 392 mv -f $filelist.tmp $filelist 393 fi 394 done 395 done 396 $AWK '{ print $1; }' $filelist | sort -u > $filelist.tmp 397 mv -f $filelist.tmp $filelist 398 echo -e "$DONE" 381 399 } 382 400 … … 2332 2350 2333 2351 PrepareBigDir() { 2334 local needlist diskdir res i j k lines lfiles includefile ti templog2352 local needlist diskdir res i j k lines lfiles includefile ti 2335 2353 2336 2354 rm -f $MINDI_CACHE/mindi.iso 2337 mkdir -p $targetdir 2338 templog=$MINDI_TMP/$$.log 2339 needlist=$MINDI_TMP/kernel-modules.conf 2340 mkdir -p $bigdir/usr/bin $bigdir/usr/sbin $bigdir/tmp 2341 # Generated file 2342 includefile=$MINDI_TMP/include-modules.conf 2343 2344 lfiles=`ls $DEPLIST_DIR/* | grep -Ev '/minimal|/udev|/drbd'` 2355 needlist=$MINDI_TMP/what-we-need.txt 2356 mkdir -p $bigdir/usr/bin 2357 mkdir -p $bigdir/usr/sbin 2358 includefile=$MINDI_TMP/$$.includefile.txt 2359 2360 lfiles=`ls $DEPLIST_DIR/* | grep -v /minimal` 2345 2361 if [ -e "$DEPLIST_FILE" ]; then 2346 2362 lfiles="$DEPLIST_FILE $lfiles" 2347 2363 fi 2364 lines=`grep -vx " *#.*" $lfiles | grep -vx "" | wc -l` 2348 2365 ParseModprobeForIncludes $includefile 2349 ListKernelModulePaths > $needlist 2350 for f in $lfiles $includefile $needlist; do 2351 CopyFromConf $f $targetdir 2352 done 2366 lines=$(($lines+`cat $includefile | wc -l`)) 2367 cat $lfiles $includefile | GenerateGiantDependencyList $needlist $lines 2368 res=$? 2353 2369 rm -f $includefile 2354 2370 ListKernelModulePaths >> $needlist 2371 if [ "$res" -ne "0" ] ; then 2372 Die "You have $res files present in dependency list\nbut absent from filesystem." 2373 fi 2374 mkdir -p $bigdir/tmp 2355 2375 if [ _"$MONDO_SHARE" != _"" ]; then 2356 2376 # TODO: no reason to have the cfg file stored twice … … 2363 2383 2364 2384 [ -d "/mnt/.boot.d" ] && echo "GENTOO" > $bigdir/tmp/DUMBASS-GENTOO 2385 DropOptimizedLibraries $needlist $bigdir 2386 echo -en "INFO: Assembling dependency files" 2387 2388 CopyDependenciesToDirectory < $needlist $bigdir `wc -l $needlist` 1 2389 rm -f $needlist 2390 echo -e "$DONE" 2365 2391 2366 2392 # also copy io.sys and msdos.sys, if we can find them … … 2393 2419 done 2394 2420 if [ -e "$MONDO_SHARE/restore-scripts" ]; then 2395 mkdir -p $bigdir/usr/bin $bigdir/etc2396 2421 cp -Rdf $MONDO_SHARE/restore-scripts/mondo/* $bigdir/usr/bin 2>> $LOGFILE 2397 2422 [ $? -ne 0 ] && [ _"$MONDO_SHARE" != _"" ] && Die "Cannot find/install $MONDO_SHARE/restore-scripts" … … 2448 2473 PrepareBootDir 2449 2474 2450 LogFile "---------------------------"2451 LogFile "Content of initial bigdir:"2452 LogFile "---------------------------- "2453 (cd "$bigdir" ; ls -Rla ) >> $LOGFILE2454 LogFile "---------------------------"2455 2475 } 2456 2476 … … 2694 2714 conf=$1 2695 2715 mp=$2 2696 if [ ! -e $conf ]; then 2697 # Invoked with a conf file short name fixing... 2698 conf="$DEPLIST_DIR/$1.conf" 2699 fi 2700 if [ ! -e $conf ]; then 2701 LogAll "Unable to find conf file $conf please report upstream" 2702 return 2703 fi 2704 bconf=`basename $conf .conf` 2705 echo -en "INFO: Gathering dependencies of $bconf..." 2706 LogFile "INFO: Gathering dependencies of $conf..." 2707 lis2=`grep -Ev '^#' $conf | sort -u` 2716 echo -en "INFO: Gathering dependencies of $conf.conf..." 2717 LogFile "INFO: Gathering dependencies of $conf.conf..." 2718 lis2=`grep -Ev '^#' $DEPLIST_DIR/$conf.conf | sort -u` 2708 2719 noof_lines=`echo $lis2 | wc -w` 2709 2720 progress=0 2710 LogFile "DEBUG: targetdir: `ls -l $mp/`"2711 LogFile "DEBUG: lis2=$lis2"2712 2721 # Get only the files which exist in that list 2713 2722 # and potentially their symlink structure 2714 2723 # put apart directories for later handling 2715 touch $MINDI_TMP/$bconf.lis $MINDI_TMP/$bconf.lis22716 2724 for f in $lis2; do 2717 2725 if [ -d $f ]; then 2718 2726 for g in `find $f`; do 2719 echo $g >> $MINDI_TMP/$ bconf.lis2720 LocateDeps $g >> $MINDI_TMP/$ bconf.lis22727 echo $g >> $MINDI_TMP/$conf.lis 2728 LocateDeps $g >> $MINDI_TMP/$conf.lis2 2721 2729 done 2722 2730 lis3="$lis3 $f" 2723 2731 else 2724 2732 if [ -r $f ]; then 2725 echo $f >> $MINDI_TMP/$ bconf.lis2726 LocateDeps $f >> $MINDI_TMP/$ bconf.lis22733 echo $f >> $MINDI_TMP/$conf.lis 2734 LocateDeps $f >> $MINDI_TMP/$conf.lis2 2727 2735 fi 2728 2736 fi … … 2730 2738 LogProgress $progress $noof_lines 2731 2739 done 2732 LogFile "DEBUG: lis3=$lis3"2733 #LogAll "INFO: Processing all dependencies links for $conf..."2740 echo -e "$DONE" 2741 LogAll "INFO: Processing all dependencies links for $conf.conf..." 2734 2742 # And their deps except dirs 2735 lines=`sort -u $MINDI_TMP/$ bconf.lis $MINDI_TMP/$bconf.lis2`2736 rm -f $MINDI_TMP/$ bconf.lis22743 lines=`sort -u $MINDI_TMP/$conf.lis $MINDI_TMP/$conf.lis2` 2744 rm -f $MINDI_TMP/$conf.lis2 2737 2745 finallist="" 2738 2746 # Remove directories from the list, as cp will create them anyway … … 2740 2748 # recent bash says that -d is true for a link to a dir ! 2741 2749 for f in $lines; do 2742 LogFile "DEBUG: f=$f"2743 2750 if [ -e "$f" -a ! -d "$f" ] || [ -h "$f" ]; then 2744 LogFile "DEBUG: Test OK"2745 2751 # Do not overwrite files already in destination (avoid using option -n of cp not portable) 2746 2752 if [ ! -e "$mp/$f" ]; then 2747 2753 finallist="$finallist $f" 2748 LogFile "DEBUG: Creating $mp/$f"2749 else2750 LogFile "DEBUG: Target exist `ls -al $mp/$f`"2751 2754 fi 2752 2755 fi 2753 2756 done 2754 LogFile "DEBUG: finallist=$finallist"2755 2757 # But adds the directory useful in $lis3 2756 2758 fnllist=`echo $finallist $lis3 | tr ' ' '\n' | sort -u | tr '\n' ' '` 2757 echo -e "$DONE" 2758 if [ _"$fnllist" != _"" ] && [ _"$fnllist" != _" " ]; then 2759 LogFile "INFO: Copying $conf related files with cp -a --parents $fnllist -t $mp/" 2760 cp -a --parents $fnllist -t $mp/ 2>$templog || LogAll "WARNING: Problem in $conf analysis" $templog 2761 fi 2762 rm -f $MINDI_TMP/$bconf.lis 2759 LogFile "INFO: Copying $conf related files with cp -a --parents $fnllist -t $mp/" 2760 cp -a --parents $fnllist -t $mp/ 2> $templog || LogAll "WARNING: Problem in $conf analysis" $templog 2761 rm -f $MINDI_TMP/$conf.lis 2763 2762 } 2764 2763 … … 2773 2772 > $templog 2774 2773 2774 mkdir -p $targetdir 2775 2775 # Check whether /lib64 or /lib or /sbin or /bin is a link and if so explicitly create one in rootfs (Fedora 17 crazyness) 2776 2776 for d in bin sbin lib lib64; do … … 2778 2778 thelink=`readlink /$d` 2779 2779 mkdir -p $targetdir/$thelink || LogAll "ERROR: Unable to create $thelink in $targetdir" 2780 mv $targetdir/$d/* $targetdir/$d/.??* $targetdir/$thelink 2780 mv $targetdir/$d/* $targetdir/$d/.??* $targetdir/$thelink 2> /dev/null 2781 2781 if [ -d "$targetdir/$d" -a ! -h "$targetdir/$d" ]; then 2782 2782 rmdir $targetdir/$d … … 3030 3030 3031 3031 mkdir -p $targetdir/proc 3032 cp -a $MY_FSTAB $targetdir/tmp3033 3032 LogFile "---------------------------" 3034 3033 LogFile "Content of initial targetdir:"
Note:
See TracChangeset
for help on using the changeset viewer.