/[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.2 - (show annotations) (download)
Mon Jul 11 15:20:36 2022 UTC (22 months, 1 week ago) by jpp
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
bump version

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