/[smeserver]/rpms/smeserver-yum/sme10/smeserver-yum-2.6.0.bz1502.DownloadOnly.patch
ViewVC logotype

Contents of /rpms/smeserver-yum/sme10/smeserver-yum-2.6.0.bz1502.DownloadOnly.patch

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


Revision 1.1 - (show annotations) (download)
Thu Aug 4 19:35:45 2016 UTC (8 years, 2 months ago) by stephdl
Branch: MAIN
CVS Tags: smeserver-yum-2_6_0-12_el7_sme, smeserver-yum-2_6_0-20_el7_sme, smeserver-yum-2_6_0-17_el7_sme, smeserver-yum-2_6_0-60_el7_sme, smeserver-yum-2_6_0-39_el7_sme, smeserver-yum-2_6_0-28_el7_sme, smeserver-yum-2_6_0-29_el7_sme, smeserver-yum-2_6_0-48_el7_sme, smeserver-yum-2_6_0-21_el7_sme, smeserver-yum-2_6_0-46_el7_sme, smeserver-yum-2_6_0-34_el7_sme, smeserver-yum-2_6_0-8_el7_sme, smeserver-yum-2_6_0-9_el7_sme, smeserver-yum-2_6_0-52_el7_sme, smeserver-yum-2_6_0-62_el7_sme, smeserver-yum-2_6_0-49_el7_sme, smeserver-yum-2_6_0-44_el7_sme, smeserver-yum-2_6_0-47_el7_sme, smeserver-yum-2_6_0-51_el7_sme, smeserver-yum-2_6_0-45_el7_sme, smeserver-yum-2_6_0-40_el7_sme, smeserver-yum-2_6_0-50_el7_sme, smeserver-yum-2_6_0-25_el7_sme, smeserver-yum-2_6_0-31_el7_sme, smeserver-yum-2_6_0-27_el7_sme, smeserver-yum-2_6_0-22_el7_sme, smeserver-yum-2_6_0-24_el7_sme, smeserver-yum-2_6_0-61_el7_sme, smeserver-yum-2_6_0-64_el7_sme, smeserver-yum-2_6_0-13_el7_sme, smeserver-yum-2_6_0-7_el7_sme, smeserver-yum-2_6_0-23_el7_sme, smeserver-yum-2_6_0-15_el7_sme, smeserver-yum-2_6_0-36_el7_sme, smeserver-yum-2_6_0-26_el7_sme, smeserver-yum-2_6_0-32_el7_sme, smeserver-yum-2_6_0-58_el7_sme, smeserver-yum-2_6_0-55_el7_sme, smeserver-yum-2_6_0-19_el7_sme, smeserver-yum-2_6_0-37_el7_sme, smeserver-yum-2_6_0-14_el7_sme, smeserver-yum-2_6_0-41_el7_sme, smeserver-yum-2_6_0-30_el7_sme, smeserver-yum-2_6_0-33_el7_sme, smeserver-yum-2_6_0-35_el7_sme, smeserver-yum-2_6_0-16_el7_sme, smeserver-yum-2_6_0-57_el7_sme, smeserver-yum-2_6_0-54_el7_sme, smeserver-yum-2_6_0-42_el7_sme, smeserver-yum-2_6_0-56_el7_sme, smeserver-yum-2_6_0-53_el7_sme, smeserver-yum-2_6_0-43_el7_sme, smeserver-yum-2_6_0-18_el7_sme, smeserver-yum-2_6_0-10_el7_sme, smeserver-yum-2_6_0-59_el7_sme, smeserver-yum-2_6_0-38_el7_sme, smeserver-yum-2_6_0-11_el7_sme, smeserver-yum-2_6_0-63_el7_sme
* Thu Aug 04 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-7.sme
- Rpm updates can be downloaded during the night [SME: 1502]
- Added smeserver-yum-2.6.0.bz1502.DownloadOnly.patch

1 diff -Nur smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/yum smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/yum
2 --- smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/yum 2016-07-28 04:12:13.658914687 +0200
3 +++ smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/yum 2016-07-28 04:46:33.447541676 +0200
4 @@ -272,4 +272,16 @@
5 operations consume considerably more CPU cycles</trans>
6 </entry>
7
8 + <entry>
9 + <base>LABEL_YUM_DOWNLOADONLY</base>
10 + <trans>Predownload updates</trans>
11 + </entry>
12 +
13 + <entry>
14 + <base>LABEL_YUM_DOWNLOADONLY_DESCRIPTION</base>
15 + <trans>The rpm updates can be downloaded during the night,
16 + this will ease and give faster the yum update process
17 + (only enabled repositories will be used).</trans>
18 + </entry>
19 +
20 </lexicon>
21 diff -Nur smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/templates/etc/crontab/YumDownloadOnly smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/templates/etc/crontab/YumDownloadOnly
22 --- smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/templates/etc/crontab/YumDownloadOnly 1970-01-01 01:00:00.000000000 +0100
23 +++ smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/templates/etc/crontab/YumDownloadOnly 2016-07-28 13:02:49.834325243 +0200
24 @@ -0,0 +1,11 @@
25 +{
26 + return "\n# yum status is disabled\n" unless $yum{status} eq 'enabled';
27 +
28 + my $downloadonly = $yum{DownloadOnly} || 'disabled';
29 +
30 + return "\n# Yum download only is disabled" if ($downloadonly eq 'disabled');
31 + my $hour = $yum{DownloadOnlyHour} || '4';
32 + return "2 $hour * * * root "
33 + . q{sleep $[ $RANDOM \\% 3600 ]; /sbin/e-smith/yumdownloadonly -m };
34 +
35 +}
36 diff -Nur smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/web/functions/yum smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/web/functions/yum
37 --- smeserver-yum-2.6.0.bz1502.old/root/etc/e-smith/web/functions/yum 2016-07-28 04:12:13.658914687 +0200
38 +++ smeserver-yum-2.6.0.bz1502.new/root/etc/e-smith/web/functions/yum 2016-07-28 04:37:51.303650209 +0200
39 @@ -133,6 +133,13 @@
40
41 <field
42 type="literal"
43 + id="state_downloadonly"
44 + value="get_status('DownloadOnly', 'localise')">
45 + <label>LABEL_YUM_DOWNLOADONLY</label>
46 + </field>
47 +
48 + <field
49 + type="literal"
50 id="button_configuration"
51 value="">
52 <description>DESC_BUTTON_CONFIGURATION</description>
53 @@ -261,6 +268,15 @@
54 <description>LABEL_YUM_DELTARPM</description>
55 </field>
56
57 + <field
58 + type="select"
59 + id="yum_DownloadOnly"
60 + options="'disabled' => 'DISABLED','enabled'=>'ENABLED'"
61 + value="get_status('DownloadOnly')">
62 + <label>LABEL_YUM_DOWNLOADONLY</label>
63 + <description>LABEL_YUM_DOWNLOADONLY_DESCRIPTION</description>
64 + </field>
65 +
66 <subroutine src="print_button('SAVE')" />
67 </page>
68
69 diff -Nur smeserver-yum-2.6.0.bz1502.old/root/sbin/e-smith/yumdownloadonly smeserver-yum-2.6.0.bz1502.new/root/sbin/e-smith/yumdownloadonly
70 --- smeserver-yum-2.6.0.bz1502.old/root/sbin/e-smith/yumdownloadonly 1970-01-01 01:00:00.000000000 +0100
71 +++ smeserver-yum-2.6.0.bz1502.new/root/sbin/e-smith/yumdownloadonly 2016-07-28 21:06:47.775676555 +0200
72 @@ -0,0 +1,26 @@
73 +#! /bin/bash
74 +
75 +mkdir -p /tmp/downloadonly.$$
76 +TMPFILE=`mktemp /tmp/downloadonly.$$/XXXXXXXXXX` || exit 1
77 +TMP1=`mktemp /tmp/downloadonly.$$/XXXXXXXXXX` || exit 1
78 +
79 +MAILADDR=admin-yum
80 +
81 +yum -e 0 -d 0 check-update >/dev/null
82 +if [ $? = 100 ]; then
83 + yum update -e 0 -d 1 --downloadonly -y > $TMP1
84 + echo -e "===\n=== yum reports downloaded files:\n===" >> $TMPFILE
85 + cat $TMP1 >> $TMPFILE
86 +fi
87 +
88 +if [ -s $TMPFILE ]; then
89 + if [ "$1" = "-m" ]; then
90 + mail -s "Downloaded updates for `hostname`" $MAILADDR < $TMPFILE
91 + else
92 + echo "Downloaded updates for `hostname`"
93 + cat $TMPFILE
94 + fi
95 +fi
96 +
97 +rm -f $TMPFILE $TMP1
98 +rm -fr /tmp/downloadonly.*
99 diff -Nur smeserver-yum-2.6.0.bz1502.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/yum.pm smeserver-yum-2.6.0.bz1502.new/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/yum.pm
100 --- smeserver-yum-2.6.0.bz1502.old/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/yum.pm 2016-07-28 04:12:13.659914685 +0200
101 +++ smeserver-yum-2.6.0.bz1502.new/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/yum.pm 2016-07-28 04:36:48.019784562 +0200
102 @@ -210,6 +210,9 @@
103 my $deltarpm = $q->param("yum_DeltaRpmProcess");
104 $db->set_prop('yum', 'DeltaRpmProcess', $deltarpm);
105
106 + my $downloadonly = $q->param("yum_DownloadOnly");
107 + $db->set_prop('yum', 'DownloadOnly', $downloadonly);
108 +
109 my %selected = map {$_ => 1} $q->param('SelectedRepositories');
110
111 foreach my $repos (

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed