Develop and Download Open Source Software

Browse CVS Repository

Diff of /clamav-update/clamav-update/clamav-update.conf

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4 by okamura, Thu Nov 30 18:57:54 2006 UTC revision 1.5 by okamura, Wed Jan 31 23:49:15 2007 UTC
# Line 18  Line 18 
18  #       'tcp'     - tcp socket returned by getservbyname()  #       'tcp'     - tcp socket returned by getservbyname()
19  #       'udp'     - udp socket returned by getservbyname()  #       'udp'     - udp socket returned by getservbyname()
20  #       'console' - console  #       'console' - console
21  #$Setting->{logging}->{setlogsock} = \*STDERR;  #$Setting{logging}->{setlogsock} = \*STDERR;
22    
23  # log level  # log level
24  #   'emerg'   - A panic condition.  #   'emerg'   - A panic condition.
# Line 31  Line 31 
31  #   'info'    - Informational messages.  #   'info'    - Informational messages.
32  #   'debug'   - Messages that contain information normally of use only when  #   'debug'   - Messages that contain information normally of use only when
33  #               debugging a program.  #               debugging a program.
34  #$Setting->{logging}->{setlogmask} = 'warning';  #$Setting{logging}->{setlogmask} = 'warning';
35    
36  # log identity (only syslog)  # log identity (only syslog)
37  #   'NAME' - NAME is prepended to every message.  #   'NAME' - NAME is prepended to every message.
38  #$Setting->{logging}->{openlog}->{ident} = 'clamav-update';  #$Setting{logging}->{openlog}->{ident} = 'clamav-update';
39    
40  # log options (only syslog)  # log options (only syslog)
41  #   ['OPTION1', 'OPTION2' ...] or [qw(OPTION1 OPTION2 ...)]  #   ['OPTION1', 'OPTION2' ...] or [qw(OPTION1 OPTION2 ...)]
42  #   ndelay - Open the connection to syslogd(8) immediately.  #   ndelay - Open the connection to syslogd(8) immediately.
43  #   perror - Write the message to standard error output as well to the system log.  #   perror - Write the message to standard error output as well to the system log.
44  #   pid    - Log the process id with each message.  #   pid    - Log the process id with each message.
45  #$Setting->{logging}->{openlog}->{logopt} = [qw()];  #$Setting{logging}->{openlog}->{logopt} = [qw()];
46    
47  # log facility (only syslog)  # log facility (only syslog)
48  #   'console' - Messages written to /dev/console by the kernel console output  #   'console' - Messages written to /dev/console by the kernel console output
# Line 59  Line 59 
59  #   'local5'  - for other purpose.  #   'local5'  - for other purpose.
60  #   'local6'  - for other purpose.  #   'local6'  - for other purpose.
61  #   'local7'  - for other purpose.  #   'local7'  - for other purpose.
62  #$Setting->{logging}->{openlog}->{facility} = 'local6';  #$Setting{logging}->{openlog}->{facility} = 'local6';
63    
64    
65  #### Environment Variables ####  #### Environment Variables ####
66  #   $Setting->{environment}->{VARNAME} = 'VALUE';  #   $Setting{environment}->{VARNAME} = 'VALUE';
67  #$Setting->{environment}->{PATH} = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/clamXav/bin';  #$Setting{environment}->{PATH} = '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/clamXav/bin';
68    
69    
70  #### Getting Version Method ####  #### Getting Version Method ####
71  # latest version  # latest version
72  #   command to get  #   command to get
73  #$Setting->{version}->{latest}->{command} = 'host -t txt current.cvd.clamav.net';  #$Setting{version}->{latest}->{command} = 'host -t txt current.cvd.clamav.net';
74    
75  #   the regular expression that is applied to command output  #   the regular expression that is applied to command output
76  #$Setting->{version}->{latest}->{regexp} = qr/"(\d+(?:\.\d+)*):\d+:\d+:\d+:[^"]*"\s*$/;  #$Setting{version}->{latest}->{regexp} = qr/"(\d+(?:\.\d+)*):\d+:\d+:\d+:[^"]*"\s*$/;
77    
78  # current version  # current version
79  #   command to get  #   command to get
80  #$Setting->{version}->{current}->{command} = 'clamav-config --version';  #$Setting{version}->{current}->{command} = 'clamav-config --version';
81    
82  #   the regular expression that is applied to command output  #   the regular expression that is applied to command output
83  #$Setting->{version}->{current}->{regexp} = qr/^(\d+(?:\.\d+)*)\s*$/;  #$Setting{version}->{current}->{regexp} = qr/^(\d+(?:\.\d+)*)\s*$/;
84    
85    # version number compare method
86    #$Setting{version}->{compare} = sub {
87    #       my      ($a, $b) = @_;
88    #       my      @a = reverse(split(/\./, $a));
89    #       my      @b = reverse(split(/\./, $b));
90    #
91    #       while (0 < scalar(@a) and 0 < scalar(@b)) {
92    #               $a = pop @a;
93    #               $b = pop @b;
94    #               return -1       if ($a < $b);
95    #               return  1       if ($a > $b);
96    #       }
97    #       return  1 if (0 < scalar(@a));
98    #       return -1 if (0 < scalar(@b));
99    #       return  0;
100    #};
101    
102    
103    #### Update Phases Sepcification ####
104    # phases sequence
105    #$Setting{phase}->{sequence} = [qw(download extract build install postInstall clean)];
106    
107  #### Download Specification ####  # clean phase specification
108    #$Setting{phase}->{clean} = 'clean';
109    
110    
111    
112    #### Download Phase Specification ####
113  # download from  # download from
114  #   'http://jaist.dl.sourceforge.net/sourceforge/clamav'       - Asia: Ishikawa, Japan  #   'http://jaist.dl.sourceforge.net/sourceforge/clamav'       - Asia: Ishikawa, Japan
115  #   'http://nchc.dl.sourceforge.net/sourceforge/clamav'        - Asia: Tainan, Taiwan  #   'http://nchc.dl.sourceforge.net/sourceforge/clamav'        - Asia: Tainan, Taiwan
# Line 100  Line 126 
126  #   'http://easynews.dl.sourceforge.net/sourceforge/clamav'    - North America: Phoenix, AZ  #   'http://easynews.dl.sourceforge.net/sourceforge/clamav'    - North America: Phoenix, AZ
127  #   'http://superb-west.dl.sourceforge.net/sourceforge/clamav' - North America: Seattle, Washington  #   'http://superb-west.dl.sourceforge.net/sourceforge/clamav' - North America: Seattle, Washington
128  #   'http://ufpr.dl.sourceforge.net/sourceforge/clamav'        - South America: Curitiba, Brazil  #   'http://ufpr.dl.sourceforge.net/sourceforge/clamav'        - South America: Curitiba, Brazil
129  #$Setting->{download}->{src} = 'http://jaist.dl.sourceforge.net/sourceforge/clamav';  #$Setting{download}->{srcBase} = 'http://jaist.dl.sourceforge.net/sourceforge/clamav';
130    
131  # save direcotry  # save direcotry
132  #$Setting->{download}->{dst} = '/tmp';  #$Setting{download}->{dstBase} = '/tmp';
133    
134    # package name
135    #$Setting{download}->{name} = 'clamav';
136    
137    # package file extension
138    #$Setting{download}->{ext} = 'tar.gz';
139    
140    # common
141    #       working directory
142    #$Setting{download}->{workdir} = undef;
143    
144    #       phase commands sequence
145    #$Setting{download}->{sequence} = [
146    #       sub {
147    #               my      ($latestVersion, $currentVersion) = @_;
148    #               my      $fname = sprintf(
149    #                       '%s-%s.%s',
150    #                       $Setting{download}->{name},
151    #                       $latestVersion,
152    #                       $Setting{download}->{ext},
153    #               );
154    #               my      $src = sprintf(
155    #                       '%s/%s', $Setting{download}->{srcBase}, $fname
156    #               );
157    #               my      $dst = sprintf(
158    #                       '%s/%s', $Setting{download}->{dstBase}, $fname
159    #               );
160    #
161    #               if (-f $dst) {
162    #                       Log 'notice', 'already exists: %s', $dst;
163    #                       1;
164    #               }
165    #               else {
166    #                       DoCommand('curl', '--silent', '-o', $dst, $src);
167    #               }
168    #       },
169    #];
170    
 # package name - don't modify  
 #$Setting->{download}->{name} = 'clamav-%s';  
171    
172  # package file extension - don't modify  #### Extract Phase Specification ####
173  #$Setting->{download}->{ext} = '.tar.gz';  # common
174    #       working directory
175    #$Setting{extract}->{workdir} = undef;
176    
177    #       phase commands sequence
178    #$Setting{extract}->{sequence} = [
179    #       sub {
180    #               my      ($latestVersion, $currentVersion) = @_;
181    #               my      @cmd = (
182    #                       'tar', 'xzf',
183    #                       sprintf(
184    #                               '%s/%s-%s.%s',
185    #                               $Setting{download}->{dstBase},
186    #                               $Setting{download}->{name},
187    #                               $latestVersion,
188    #                               $Setting{download}->{ext},
189    #                       ),
190    #                       '-C', $Setting{download}->{dstBase}
191    #               );
192    #
193    #               DoCommand(@cmd);
194    #       },
195    #];
196    
197    
198    #### Build Phase Specification ####
199    # common
200    #       working directory
201    #$Setting{build}->{workdir} = sub {
202    #       my      ($latestVersion, $currentVersion) = @_;
203    #
204    #       sprintf('%s/%s-%s',
205    #               $Setting{download}->{dstBase}, $Setting{download}->{name},
206    #               $latestVersion
207    #       );
208    #};
209    
210  #### Build Method ####  #       phase commands sequence
211  #$Setting->{build} = [  #$Setting{build}->{sequence} = [
212  #       [qw(./configure --prefix=/usr/local/clamXav)],  #       [qw(./configure --prefix=/usr/local/clamXav)],
213  #       [qw(make)],  #       [qw(make)],
214  #];  #];
215    
216    
217  #### Install Method ####  #### Install Phase Specification ####
218  # This sequence is securer than ClamXav original one.  # common
219  #$Setting->{install} = [  #       working directory
220    #$Setting{install}->{workdir} = sub {
221    #       my      ($latestVersion, $currentVersion) = @_;
222    #
223    #       sprintf('%s/%s-%s',
224    #               $Setting{download}->{dstBase}, $Setting{download}->{name},
225    #               $latestVersion
226    #       );
227    #};
228    
229    #       phase commands sequence
230    #$Setting{install}->{sequence} = [
231  #       [qw(make install)],  #       [qw(make install)],
232  #       [qw(chown -R root:admin /usr/local/clamXav)],  #       [qw(chown -R root:admin /usr/local/clamXav)],
233  #       [qw(chmod 664 /usr/local/clamXav/etc/freshclam.conf)],  #       [qw(chmod 664 /usr/local/clamXav/etc/freshclam.conf)],
# Line 134  Line 240 
240  #];  #];
241    
242    
243  #### Daemon Setting and Restart Method ####  #### Post-Install Phase Specification ####
244  # The default.  # common
245  #$Setting->{daemon} = [  #       working directory
246    #$Setting{postInstall}->{workdir} = undef;
247    
248    #       phase commands sequence
249    #$Setting{postInstall}->{sequence} = [
250  #];  #];
251    
252  # using clamd (sample)  #       using clamd (sample)
253  #push @{$Setting->{daemon}},  #push @{$Setting{postInstall}->{sequence}},
254  #       [qw(/Library/StartupItems/ClamAntiVirusDaemon/ClamAntiVirusDaemon restart)];  #       [qw(/Library/StartupItems/ClamAntiVirusDaemon/ClamAntiVirusDaemon restart)];
255    
256  # using freshclam as a daemon (sample)  #       using freshclam as a daemon (sample)
257  #push @{$Setting->{daemon}},  #push @{$Setting{postInstall}->{sequence}},
258  #       [qw(chown root /usr/local/clamXav/bin/freshclam)],  #       [qw(chown root /usr/local/clamXav/bin/freshclam)],
259  #       [qw(chmod u-s /usr/local/clamXav/bin/freshclam)],  #       [qw(chmod u-s /usr/local/clamXav/bin/freshclam)],
260  #       [qw(/Library/StartupItems/FreshClamDaemon/FreshClamDaemon restart)];  #       [qw(/Library/StartupItems/FreshClamDaemon/FreshClamDaemon restart)];
261    
262    
263  #### Clean Targets ####  #### Clean Phase Specification ####
264  # downloaded archive file  # common
265  #$Setting->{doClean}->{archive} = 1;  #       working directory
266    #$Setting{clean}->{workdir} = undef;
267  # builded object files  
268  #$Setting->{doClean}->{objects} = 0;  #       phase commands sequence
269    #$Setting{clean}->{sequence} = [
270  # extracted directory  #       sub {
271  #$Setting->{doClean}->{dir} = 1;  #               my      ($latestVersion, $currentVersion) = @_;
272    #               my      $dir = sprintf(
273    #                       '%s/%s-%s',
274    #                       $Setting{download}->{dstBase},
275    #                       $Setting{download}->{name},
276    #                       $latestVersion,
277    #               );
278    #               my      @cmd = (
279    #                       'rm', '-rf', $dir,
280    #                       sprintf('%s.%s', $dir, $Setting{download}->{ext})
281    #               );
282    #
283    #               DoCommand(@cmd);
284    #       },
285    #];
286    
287    
288  #### DO NOT EDIT ####  #### DO NOT EDIT ####

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26