Changeset 11730
- Timestamp:
- Feb 9, 2007, 10:53:32 AM (19 years ago)
- Location:
- trunk/psconfig
- Files:
-
- 4 added
- 3 edited
-
cpan.setup.sh (added)
-
mkbuild (added)
-
mkdist (modified) (6 diffs)
-
perl.install.sh (added)
-
perl.modules.sh (added)
-
psconfig.sh (modified) (3 diffs)
-
tagsets/ipp-1.0.dst (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psconfig/mkdist
r11651 r11730 1 1 #!/usr/bin/env perl 2 3 $tagsets = "tagsets"; 2 4 3 5 $cvs = 0; … … 6 8 $deltag = 0; 7 9 $setbranch = 0; 8 $ list= 0;10 $setdevtag = 0; 9 11 $module = ""; 10 12 @tARGV = (); … … 22 24 shift; next; 23 25 } 26 if ($ARGV[0] eq "-devtag") { 27 $setdevtag = 1; 28 shift; next; 29 } 24 30 if ($ARGV[0] eq "-deltag") { 25 31 $deltag = 1; 26 shift; next;27 }28 if ($ARGV[0] eq "-list") {29 $list = 1;30 32 shift; next; 31 33 } … … 39 41 shift; next; 40 42 } 43 if ($ARGV[0] eq "-list") { 44 &list_distributions (); 45 } 41 46 if ($ARGV[0] eq "-h") { &usage (); } 42 47 if ($ARGV[0] eq "-help") { &usage (); } … … 47 52 @ARGV = @tARGV; 48 53 49 $distdir = "tagsets"; 54 if ( @ARGV != 1) { &usage (); } 50 55 51 if (!$list && @ARGV != 1) { &usage (); } 52 if ( $list && @ARGV != 0) { &usage (); } 53 54 $file = "$distdir/$ARGV[0].dst"; 55 open (FILE, $file) || die "ERROR: can't open distribution file\n"; 56 @list = <FILE>; 57 close (FILE); 58 59 $version = $ARGV[0]; 60 61 @name = (); 62 @tag = (); 63 @branch = (); 64 65 if ($list) { 66 printf STDERR "Available Distributions\n"; 67 printf STDERR "%-16s %7s\n", "Module", "Version"; 68 printf STDERR "-------------------------\n"; 69 } 70 71 foreach $line (@list) { 72 chop $line; 73 if ($line =~ m|^\s*$|) { next; } 74 if ($line =~ m|^\s*\#|) { next; } 75 76 ($name, $branch, $branchver, $mode) = split (":", $line); 77 78 if ($name eq "") { die "missing module name\n"; } 79 80 if ($branch eq "") { 81 $branch = "HEAD"; 82 } 83 if ($branch eq "HEAD") { 84 $tag = "HEAD"; 85 } 86 if ($branch eq "NONE") { 87 $tag = "NONE"; 88 } 89 if (($tag ne "HEAD") && ($branchver eq "")) { 90 $branchver = "0"; 91 } 92 if (($branch ne "HEAD") && ($branch ne NONE)) { 93 $tag = "$branch-$branchver"; 94 } 95 if (($branch ne "HEAD") && ($branch ne "NONE") && ($branchver eq "NONE")) { 96 $tag = "$branch"; 97 } 98 # print "module: $name, tag: $tag, branch: $branch\n"; 99 100 push @name, $name; 101 push @branch, $branch; 102 push @tag, $tag; 103 push @mode, $mode; 104 } 105 106 if ($list) { exit 0; } 56 $distribution = $ARGV[0]; 57 &load_distfile (); 107 58 108 59 if ($diff) { &difflist (); } 109 110 60 if ($settag) { &settags (); } 111 61 112 mkdir $version; 113 chdir $version; 114 for ($i = 0; $i < @name; $i++) { 115 if (($module ne "") && ($module ne $name[$i])) { next; } 116 if ($mode[$i] eq "SKIP") { next; } 117 if ($tag[$i] eq "HEAD") { 118 &vsystem ("cvs co $name[$i]"); 119 if ($status) { die "error running cvs"; } 120 } else { 121 &vsystem ("cvs co -r $tag[$i] $name[$i]"); 122 if ($status) { die "error running cvs"; } 123 } 124 } 125 chdir ".."; 126 if ($cvs) { exit 0; } 127 128 &vsystem ("rm -r `find $version -name CVS`"); 129 if (! -e tarballs) { mkdir "tarballs"; } 130 &vsystem ("tar cvzf tarballs/$version.tgz $version"); 131 if ($status) { die "error creating tarball\n"; } 132 exit 0; 62 &package_distribution (); 133 63 134 64 sub vsystem { 135 65 print STDERR "@_\n"; 136 $status = system ("@_"); 137 $status; 138 } 139 140 sub usage { 141 print STDERR "USAGE: mkdist -list\n"; 142 print STDERR " : list valid distributions \n\n"; 143 print STDERR "USAGE: mkdist (group) (version) [-cvs]\n"; 144 print STDERR " : make a distribution tarball\n"; 145 print STDERR " : -cvs : only check out the cvs tree, don't make a tarball\n\n"; 146 print STDERR "USAGE: mkdist -diff (group) (version)\n"; 147 print STDERR " : show the difference between the distribution and current tree\n\n"; 148 exit 2; 66 #$status = system ("@_"); 67 #$status; 149 68 } 150 69 151 70 sub difflist { 152 71 153 for ($i = 0; $i < @ name; $i++) {72 for ($i = 0; $i < @cvsname; $i++) { 154 73 # the base component cannot be rdiffed 155 print STDERR "--- $ name[$i] ---\n";156 if ($ name[$i] eq "base") { next; }74 print STDERR "--- $cvsname[$i] ---\n"; 75 if ($cvsname[$i] eq "base") { next; } 157 76 if ($tag[$i] eq "") { 158 &vsystem ("cvs -q rdiff -s -r HEAD $ name[$i]");77 &vsystem ("cvs -q rdiff -s -r HEAD $cvsname[$i]"); 159 78 } else { 160 &vsystem ("cvs -q rdiff -s -r $tag[$i] $ name[$i]");79 &vsystem ("cvs -q rdiff -s -r $tag[$i] $cvsname[$i]"); 161 80 } 162 81 print STDERR "\n\n"; … … 167 86 sub settags { 168 87 print STDERR "setting tags\n"; 169 for ($i = 0; $i < @ name; $i++) {170 # can the base component be tagged?171 if ($name[$i] eq "base") {172 # make this automatic by checking it out and cd'ing there173 p rint STDERR "remember to set the base tag by hand\n";88 for ($i = 0; $i < @cvsname; $i++) { 89 if (($module ne "") && ($module ne $cvsname[$i])) { next; } 90 ($do_tag, $do_build, $do_package, $do_update) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)|; 91 if ($do_tag eq "N") { 92 push @remind, $cvsname[$i]; 174 93 next; 175 94 } 176 if ($tag[$i] eq "") { next; } 177 if ($tag[$i] eq "HEAD") { next; } 178 if ($tag[$i] eq "NONE") { next; } 179 if ($mode[$i] eq "EXTERN") { 180 print STDERR "remember to set tag for $name[$i]\n"; 181 next; 95 if ($branchtag[$i] eq "") { die "branch tag missing for $cvsname[$i]\n"; } 96 if ($branchver[$i] eq "") { die "branch tag version missing\n"; } 97 $tag = "$branchtag[$i]$branchver[$i]"; 98 if ($setbranch) { 99 &vsystem ("cvs -q rtag -b $branchtag[$i] $cvsname[$i]"); 100 next; 101 } 102 if ($setdevtag) { 103 &vsystem ("cvs -q rtag $tag $cvsname[$i]"); 104 next; 182 105 } 183 $flag = ""; 184 if ($setbranch) { 185 &vsystem ("cvs -q rtag -b $branch[$i] $name[$i]"); 186 } else { 187 &vsystem ("cvs -q rtag -r $branch[$i] $tag[$i] $name[$i]"); 188 } 106 &vsystem ("cvs -q rtag -r $branchtag[$i] $tag $cvsname[$i]"); 107 } 108 for ($i = 0; $i < @remind; $i++) { 109 print STDERR "remember to set tag for $remind[$i] if needed\n"; 189 110 } 190 111 exit 0; 191 112 } 113 114 sub package_distribution { 115 # package distribution into a tarball 116 mkdir $distribution; 117 chdir $distribution; 118 for ($i = 0; $i < @cvsname; $i++) { 119 if (($module ne "") && ($module ne $cvsname[$i])) { next; } 120 ($do_tag, $do_build, $do_package, $do_update) = $mode[$i] =~ m|(\S)(\S)(\S)(\S)|; 121 if ($do_package eq "N") { next; } 122 if ($tag[$i] eq "HEAD") { 123 &vsystem ("cvs co $cvsname[$i]"); 124 if ($status) { die "error running cvs"; } 125 } else { 126 &vsystem ("cvs co -r $tag[$i] $cvsname[$i]"); 127 if ($status) { die "error running cvs"; } 128 } 129 } 130 chdir ".."; 131 if ($cvs) { exit 0; } 132 133 &vsystem ("rm -r `find $distribution -name CVS`"); 134 if (! -e tarballs) { mkdir "tarballs"; } 135 &vsystem ("tar cvzf tarballs/$distribution.tgz $distribution"); 136 if ($status) { die "error creating tarball\n"; } 137 exit 0; 138 } 139 140 sub list_distributions { 141 142 vsystem ("ls $tagsets/*.dst"); 143 exit 2; 144 } 145 146 sub load_distfile { 147 # open and read the distribution file 148 # results go into @cvsname, @branchtag, @branchver, @mode 149 $file = "$tagsets/$ARGV[0].dst"; 150 open (FILE, $file) || die "ERROR: can't open distribution file $file\n"; 151 @list = <FILE>; 152 close (FILE); 153 154 @mode = (); 155 @cvsname = (); 156 @branchtag = (); 157 @branchver = (); 158 159 foreach $line (@list) { 160 chop $line; 161 if ($line =~ m|^\s*$|) { next; } 162 if ($line =~ m|^\s*\#|) { next; } 163 164 ($mode, $cvsname, $branchtag, $branchver) = split (" ", $line); 165 166 if ($cvsname eq "") { die "missing module name\n"; } 167 168 ($do_tag, $do_build, $do_package, $do_update) = $mode =~ m|(\S)(\S)(\S)(\S)|; 169 if (($do_tag ne "Y") && ($do_tag ne "N")) { die "invalid tag option $do_tag\n"; } 170 if (($do_build ne "Y") && ($do_build ne "N")) { die "invalid tag option $do_build\n"; } 171 if (($do_package ne "Y") && ($do_package ne "N")) { die "invalid tag option $do_package\n"; } 172 if (($do_update ne "Y") && ($do_update ne "N")) { die "invalid tag option $do_update\n"; } 173 174 print "module: $cvsname, branchtag: $branchtag, branchver: $branchver "; 175 print "tag: $do_tag, build: $do_build, package: $do_package, update: $do_update\n"; 176 177 push @mode, $mode; 178 push @cvsname, $cvsname; 179 push @branchtag, $branchtag; 180 push @branchver, $branchver; 181 } 182 } 183 184 sub usage { 185 print STDERR "USAGE: mkdist -list\n"; 186 print STDERR " : list valid distributions \n\n"; 187 print STDERR "USAGE: mkdist (distribution) [-cvs]\n"; 188 print STDERR " : make a distribution tarball\n"; 189 print STDERR " : -cvs : only check out the cvs tree, don't make a tarball\n\n"; 190 print STDERR "USAGE: mkdist -diff (group) (version)\n"; 191 print STDERR " : show the difference between the distribution and current tree\n\n"; 192 exit 2; 193 } 194 -
trunk/psconfig/psconfig.sh
r11267 r11730 31 31 32 32 # list the defined psconfig versions 33 if ("$argv[1]" == "--prefix") then 34 echo $PSCONFDIR/$PSVERSION.$ARCH 35 exit 0 36 endif 37 38 # list the defined psconfig versions 33 39 if ("$argv[1]" == "--libs") then 34 40 echo $PSCONFDIR/$PSVERSION.$ARCH/lib … … 40 46 echo $PSCONFDIR/$PSVERSION.$ARCH/bin 41 47 exit 0 48 endif 49 50 # list the defined psconfig versions 51 set show_path = 0 52 if ("$argv[1]" == "--path") then 53 set show_path = 1 54 shift 55 endif 56 57 # list the defined psconfig versions 58 set show_ldpath = 0 59 if ("$argv[1]" == "--ldpath") then 60 set show_ldpath = 1 61 shift 62 endif 63 64 # list the defined psconfig versions 65 set show_pkgpath = 0 66 if ("$argv[1]" == "--pkgpath") then 67 set show_pkgpath = 1 68 shift 69 endif 70 71 # list the defined psconfig versions 72 set show_perlpath = 0 73 if ("$argv[1]" == "--perlpath") then 74 set show_perlpath = 1 75 shift 42 76 endif 43 77 … … 245 279 alias psperlbuild perl Build.PL --prefix {$PSCONFDIR}/{$PSCONFIG} --install_path script=$bindir --install_path arch=$bindir --install_path bin=$bindir --install_path lib=$libdir --install_path bindoc={$PSCONFDIR}/man/man1 --install_path libdoc={$PSCONFDIR}/man/man3 246 280 endif 281 282 # list the defined psconfig versions 283 if ($show_path) then 284 echo $PATH 285 exit 0 286 endif 287 288 # list the defined psconfig versions 289 if ($show_ldpath) then 290 echo $LD_LIBRARY_PATH 291 exit 0 292 endif 293 294 # list the defined psconfig versions 295 if ($show_pkgpath) then 296 echo $PKG_CONFIG_PATH 297 exit 0 298 endif 299 300 # list the defined psconfig versions 301 if ($show_perlpath) then 302 echo $PERL5LIB 303 exit 0 304 endif 305 -
trunk/psconfig/tagsets/ipp-1.0.dst
r11652 r11730 1 # necessary fields: 2 # |-- tag? 3 # ||-- build? 4 # |||-- package? 5 # ||||-- update? 6 # |||| 7 # |||| CVS module CVS branch tag CVS branch version 8 # |||| 9 NYNY Ohana 10 NNYN ohana.base base-1-5 -0 11 NNYN libohana libohana-1-9 -0 12 NNYN libfits libfits-1-7 -0 13 NNYN libautocode libautocode-1-6 -0 14 NNYN libdvo libdvo-1-4 -0 15 NNYN libkapa libkapa-1-3 -0 16 NNYN addstar addstar-1-8 -0 17 NNYN delstar delstar-1-7 -0 18 NNYN getstar getstar-1-3 -0 19 NNYN kapa kapa-1-7 -0 20 NNYN kii kii-1-7 -0 21 NNYN relphot relphot-1-5 -0 22 NNYN uniphot uniphot-1-5 -0 23 NNYN opihi.base opihi-2-9 -0 24 NNYN mana mana-1-7 -0 25 NNYN dvo dvo-1-0 -0 26 NNYN pantasks pantasks-1-0 -0 27 NNYN pcontrol pcontrol-1-0 -0 28 NNYN pclient pclient-1-0 -0 29 NYYY psLib rel-1-0 -0 30 NYYY psModules rel-1-0 -0 31 YYYY psphot rel-0-8 -0 32 YYYY psastro rel-0-8 -0 33 YYYY ppStats rel-1-0 -0 34 YYYY ppImage rel-1-0 -0 35 YYYY ppNorm rel-1-0 -0 36 YYYY ppMerge rel-1-0 -0 37 YNYY pois rel-0-1 -0 38 YNYY pswarp rel-0-1 -0 39 YNYY ppStac rel-0-1 -0 40 YYYY PS-IPP-Metadata-Config rel-1-0 -0 41 YYYY PS-IPP-Config rel-1-0 -0 42 YYYY ippScripts rel-1-0 -0 43 YYYY glueforge rel-1-0 -0 44 YYYY dbconfig rel-1-0 -0 45 NYNN ippdb.src 46 YYYY ippconfig rel-1-0 -0 47 YYYY ippTools rel-1-0 -0 48 YYYY ippTasks rel-1-0 -0 49 YYYY simtest rel-0-8 -0 50 YNYY psconfig rel-1-0 -0 51 YNYY ippMonitor rel-1-0 -0 1 52 2 # mode EXTERN means package cannot be tagged / updated in this tree3 # mode SKIP means exclude from the build process4 # model5 6 ohana.base:base-1-5:0:EXTERN7 8 libohana:libohana-1-9:0:EXTERN9 libfits:libfits-1-7:0:EXTERN10 libautocode:libautocode-1-6:0:EXTERN11 libdvo:libdvo-1-4:0:EXTERN12 libkapa:libkapa-1-3:0:EXTERN13 14 addstar:addstar-1-8:0:EXTERN15 delstar:delstar-1-7:0:EXTERN16 getstar:getstar-1-3:0:EXTERN17 kapa:kapa-1-7:0:EXTERN18 kii:kii-1-7:0:EXTERN19 relphot:relphot-1-5:0:EXTERN20 uniphot:uniphot-1-5:0:EXTERN21 22 opihi.base:opihi-2-9:0:EXTERN23 mana:mana-1-7:0:EXTERN24 dvo:dvo-1-0:0:EXTERN25 pantasks:pantasks-1-0:0:EXTERN26 pcontrol:pcontrol-1-0:0:EXTERN27 pclient:pclient-1-0:0:EXTERN28 29 psLib:rel-1_0_0:NONE:EXTERN30 psModules:rel-1_0_0:NONE:EXTERN31 32 psphot:rel-0-8:033 psastro:rel-0-8:034 ppStats:rel-1-0:035 ppImage:rel-1-0:036 ppNorm:rel-1-0:037 ppMerge:rel-1-0:038 39 pois:rel-0-1:040 pswarp:rel-0-1:041 ppStac:rel-0-1:042 43 # these are the required perl modules from IPP44 53 # there are externally required perl modules (see README?) 45 PS-IPP-Metadata-Config:rel-1-0:046 PS-IPP-Config:rel-1-0:047 ippScripts:rel-1-0:048 49 glueforge:rel-1:050 dbconfig:rel-1-0:051 52 ippdb.src:NONE:0:SKIP53 54 ippconfig:rel-1-0:055 ippTools:rel-1-0:056 ippTasks:rel-1-0:057 simtest:rel-0-8:058 59 psconfig:rel-1-0:060 ippMonitor:rel-1-0:061
Note:
See TracChangeset
for help on using the changeset viewer.
