~ubuntu-branches/ubuntu/quantal/nss/quantal-updates

« back to all changes in this revision

Viewing changes to mozilla/security/coreconf/cpdist.pl

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-11-14 14:58:07 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20131114145807-vj6v4erz8xj6kwz3
Tags: 3.15.3-0ubuntu0.12.10.1
* SECURITY UPDATE: New upstream release to fix multiple security issues
  and add TLSv1.2 support.
  - CVE-2013-1739
  - CVE-2013-1741
  - CVE-2013-5605
  - CVE-2013-5606
* Adjusted packaging for 3.15.3:
  - debian/patches/*: refreshed.
  - debian/patches/lower-dhe-priority.patch: removed, no longer needed,
    was a workaround for an old version of firefox.
  - debian/libnss3.symbols: added new symbols.
  - debian/rules: updated for new source layout.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/local/bin/perl
2
 
#
3
 
# This Source Code Form is subject to the terms of the Mozilla Public
4
 
# License, v. 2.0. If a copy of the MPL was not distributed with this
5
 
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
 
require('coreconf.pl');
7
 
 
8
 
#######-- read in variables on command line into %var
9
 
 
10
 
&parse_argv;
11
 
 
12
 
### do the copy
13
 
 
14
 
print STDERR "RELEASE TREE / MODULE =  $var{RELEASE_TREE} $var{MODULE}\n";
15
 
 
16
 
 
17
 
 
18
 
# 1
19
 
if ($var{RELEASE} eq "") { exit; } # Can't do release here, so exit.
20
 
 
21
 
# 2
22
 
#if (! ($var{RELEASE} =~ /\//)) {   # if no specific version is specified in RELEASE variable
23
 
#    $component = $var{RELEASE};
24
 
#}
25
 
#else {  # if a subcomponent/version is given in the RELEASE variable
26
 
#        $var{RELEASE} =~ m|^([^/]*)/|;  
27
 
#       $component = $1;           # everything before the first slash;
28
 
#    }
29
 
 
30
 
# 3
31
 
$path = $var{RELEASE};
32
 
 
33
 
 
34
 
# 4
35
 
# find out what directory we would create for 'today'
36
 
 
37
 
$year = (localtime)[5] + 1900;
38
 
$month = (localtime)[4] + 1;
39
 
$day = (localtime)[3];
40
 
$today = sprintf( "%d%02d%02d", $year, $month, $day );
41
 
 
42
 
# 5
43
 
# if version is null, then set the version to today.
44
 
if ($var{"RELEASE_VERSION"} eq "") {
45
 
    $var{"RELEASE_VERSION"} = $today;
46
 
}
47
 
 
48
 
#6
49
 
$version = $var{"RELEASE_VERSION"};  # set RELEASE_VERSION to passed in variable
50
 
 
51
 
#7
52
 
# if version is today, then we will want to make a 'current' link.
53
 
 
54
 
if ($version eq $today) {
55
 
    $create_current = 1;
56
 
}
57
 
 
58
 
#8
59
 
# version can be a) passed in value from command line, b) value in manifest.mn
60
 
# or c) computed value such as '19970909'
61
 
 
62
 
 
63
 
$dir = "$var{'RELEASE_TREE'}/$path";
64
 
 
65
 
#9
66
 
if (! (-e "$dir/$version" && -d "$dir/$version")) {
67
 
    print "making dir $dir \n";
68
 
    &rec_mkdir("$dir/$version");
69
 
}
70
 
 
71
 
 
72
 
 
73
 
print "version = $version\n";
74
 
print "path = $path\n";
75
 
print "var{release_tree} = $var{'RELEASE_TREE'}\n";
76
 
print "dir = $dir   = RELEASE_TREE/path\n";
77
 
 
78
 
 
79
 
#10
80
 
if ($create_current == 1) {
81
 
 
82
 
# unlinking and linking always occurs, even if the link is correct
83
 
    print "unlinking $dir/current\n";
84
 
    unlink("$dir/current");
85
 
    
86
 
    print "putting version number $today into 'current' file..";
87
 
 
88
 
    open(FILE,">$dir/current") || die " couldn't open current\n";
89
 
    print FILE "$today\n";
90
 
    close(FILE);
91
 
    print " ..done\n"
92
 
    
93
 
}
94
 
 
95
 
&rec_mkdir("$dir/$version/$var{'RELEASE_MD_DIR'}");
96
 
&rec_mkdir("$dir/$version/$var{'RELEASE_XP_DIR'}");
97
 
 
98
 
 
99
 
 
100
 
 
101
 
foreach $jarfile (split(/ /,$var{FILES}) ) {
102
 
    print STDERR "---------------------------------------------\n";
103
 
    
104
 
    $jarinfo = $var{$jarfile};
105
 
 
106
 
    ($jardir,$jaropts) = split(/\|/,$jarinfo);
107
 
 
108
 
    if ($jaropts =~ /f/) {
109
 
      print STDERR "Copying files $jardir....\n";
110
 
    }
111
 
    else {
112
 
      print STDERR "Copying jar file $jarfile....\n";
113
 
    }
114
 
    
115
 
    print "jaropts = $jaropts\n";
116
 
    
117
 
    if ($jaropts =~ /m/) {
118
 
      $destdir = $var{"RELEASE_MD_DIR"};
119
 
      print "found m, using MD dir $destdir\n";
120
 
    }
121
 
    elsif ($jaropts =~ /x/) {
122
 
      $destdir = $var{"RELEASE_XP_DIR"};
123
 
      print "found x, using XP dir $destdir\n";
124
 
    }
125
 
    else {
126
 
      die "Error: must specify m or x in jar options in $jarinfo line\n";
127
 
    }
128
 
    
129
 
    
130
 
    $distdir = "$dir/$version/$destdir";
131
 
    
132
 
 
133
 
 
134
 
    if ($jaropts =~ /f/) {
135
 
 
136
 
      print "splitting: \"$jardir\"\n";
137
 
      for $srcfile (split(/ /,$jardir)) {
138
 
 
139
 
#if srcfile has a slash
140
 
        if ($srcfile =~ m|/|) {
141
 
#pull out everything before the last slash into $1
142
 
          $srcfile =~ m|(.*)/|;
143
 
          $distsubdir = "/$1";
144
 
          print "making dir $distdir$distsubdir\n";
145
 
          &rec_mkdir("$distdir$distsubdir");
146
 
        }
147
 
        print "copy: from $srcfile\n";
148
 
        print "      to   $distdir$distsubdir\n";
149
 
        $srcprefix = "";
150
 
        if ($jaropts =~/m/) {
151
 
          $srcprefix = "$var{'PLATFORM'}/";
152
 
        }
153
 
        system("cp $srcprefix$srcfile $distdir$distsubdir");
154
 
      }
155
 
    }
156
 
    else {
157
 
      $srcfile = "$var{SOURCE_RELEASE_PREFIX}/$jardir/$jarfile";
158
 
      
159
 
      print "copy: from $srcfile\n";
160
 
      print "      to   $distdir\n";
161
 
      
162
 
      system("cp $srcfile $distdir");
163
 
      
164
 
    }
165
 
    
166
 
  }
167