aboutsummaryrefslogtreecommitdiffstats
path: root/russian/lts
diff options
context:
space:
mode:
authorLev Lamberov <dogsleg@debian.org>2020-06-28 13:47:59 +0500
committerLev Lamberov <dogsleg@debian.org>2020-06-28 13:48:25 +0500
commit4ad1e1b4a99e44a7453006ff96e3ba0a5940b5db (patch)
treea235a6f0a3a3b36b72fa0016f8c3520489c5b178 /russian/lts
parentbb7c12dde8ead8c7224a9e8d4ee42c1f86eda216 (diff)
(Russian) Add script to copy and semi-translate dla (adoptation of script for dsa)
Diffstat (limited to 'russian/lts')
-rwxr-xr-xrussian/lts/security/copyadvisory.pl173
1 files changed, 173 insertions, 0 deletions
diff --git a/russian/lts/security/copyadvisory.pl b/russian/lts/security/copyadvisory.pl
new file mode 100755
index 00000000000..730608cc8ca
--- /dev/null
+++ b/russian/lts/security/copyadvisory.pl
@@ -0,0 +1,173 @@
+#!/usr/bin/perl -w
+
+# This script copies a LTS security advisory named on the command
+# line, and adds the translation-check header to it. It also will
+# create the destination directory if necessary, and copy the Makefile
+# from the source. It is based on copyadvistory.pl for usual security
+# advisories.
+
+# Written in 2000-2004 by Peter Karlsson <peterk@debian.org>
+# © Copyright 2000-2004 Software in the public interest, Inc.
+# This program is released under the GNU General Public License, v2.
+
+# $Id$
+
+# Get command line
+$number = $ARGV[0];
+
+use FindBin;
+use lib "$FindBin::Bin/../../../Perl";
+use Local::VCS;
+
+# Check usage.
+unless ($number)
+{
+ print "Usage: $0 advisorynumber\n\n";
+ print "Copies the LTS advisory from the English directory to the local one and adds\n";
+ print "the translation-check header\n";
+ exit;
+}
+
+# Locate advisory
+$number = "dla-" . $number if $number !~ /^dla-/;
+$year = 2014;
+YEAR: while (-d "../../../english/lts/security/$year")
+{
+ last YEAR if -e "../../../english/lts/security/$year/$number.wml";
+ $year ++;
+}
+
+# Create needed file and directory names
+$srcdir = "../../../english/lts/security/$year";
+die "Unable to locate English version of LTS advisory $number.\n"
+ if ! -d $srcdir;
+$srcfile= "$srcdir/$number.wml";
+$dstdir = "./$year";
+$dstfile= "$dstdir/$number.wml";
+
+# Sanity checks
+die "File $srcfile does not exist\n" unless -e $srcfile;
+die "File $dstfile already exists\n" if -e $dstfile;
+mkdir $dstdir, 0755 unless -d $dstdir;
+
+my $VCS = Local::VCS->new();
+my %file_info = $VCS->file_info($srcfile);
+$revision = $file_info{'cmt_rev'};
+unless ($revision)
+{
+ die "Could not get revision number - bug in script?\n";
+}
+
+# Open the files
+open SRC, $srcfile
+ or die "Could not read $srcfile ($!)\n";
+
+open DST, ">$dstfile"
+ or die "Could not create $dstfile ($!)\n";
+
+# Insert the revision number
+print DST qq'#use wml::debian::translation-check translation="$revision" mindelta="1"\n';
+
+# Copy the file
+while (<SRC>)
+{
+ next if /\$Id/;
+
+ # Header
+ s/LTS security update/обновление безопасности LTS/;
+
+ # Starting
+ s/^(<p>)?A problem has been discovered in\b/$1Была обнаружена проблема в/;
+ s/\bdiscovered a problem in\b/обнаружил проблему в/;
+ s/It was discovered that/Было обнаружено, что/;
+
+ # We recommend
+ s/We recommend that you upgrade your (.*) package immediately/Рекомендуется немедленно обновить пакет $1/;
+ s/We recommend that you upgrade your (.*) packages immediately/Рекомендуется немедленно обновить пакеты $1/;
+ s/We recommend that you upgrade your (.*) and (.*) packages/Рекомендуется обновить пакеты $1 и $2/;
+ s/We recommend that you upgrade your (.*) packages/Рекомендуется обновить пакеты $1/;
+ s/We recommend that you upgrade your (.*) package/Рекомендуется обновить пакет $1/;
+ s/We recommend that you update your (.*) package immediately/Рекомендуется немедленно обновить пакет $1/;
+ s/We recommend that you update your (.*) packages immediately/Рекомендуется немедленно обновить пакеты $1/;
+ s/We recommend that you update your (.*) packages/Рекомендуется обновить пакеты $1/;
+ s/We recommend that you update your (.*) package/Рекомендуется обновить пакет $1/;
+
+ # Vulnerabilities
+ s/buffer overflows?/переполнение буфера/;
+ s/integer overflow/переполнение целых чисел/;
+ s/directory traversal/обход каталога/;
+ s/format string vulnerability/уязвимость форматной строки/;
+ s/format string vulnerabilities/уязвимости форматной строки/;
+ s/insecure temporary files/небезопасные временные файлы/;
+ s/>insecure temporary file creation</>небезопасное создание временного файла</;
+ s/>local root exploit</>локальная уязвимость суперпользователя</;
+ s/>remote root exploit</>удалённая уязвимость суперпользователя</;
+ s/>symlink attack</>атака через символьные ссылки</;
+ s/>remote exploit</>удалённая уязвимость</;
+ s/>missing input sanitising</>отсутствие очистки входных данных</;
+ s/missing input validation/отсутствие очистки входных данных/;
+ s/>the execution of arbitrary code</>выполнение произвольного кода</;
+ s/>execution of arbitrary code</>выполнение произвольного кода</;
+ s/>information disclosure</>раскрытие информации</;
+ s/privilege escalation/повышений привилегий/;
+ s/cross site/межсайтовый/;
+ s/heap overflow/переполнение динамической памяти/;
+
+ # Several/Multiple
+ s/Several vulnerabilities/Несколько уязвимостей/;
+ s/several vulnerabilities/несколько уязвимостей/;
+ s/multiple vulnerabilities/многочисленные уязвимости/;
+ s/>several</>несколько</;
+ s/>multiple</>многочисленные</;
+
+ # Fixed in
+ s/This has been fixed in version/Эта уязвимость была исправлена в версии/;
+ s/this problem has been fixed in/эта проблема была исправлена в/;
+ s/this problem has been fixed$/эта проблема была исправлена/;
+ s/this problem has(?: been)?$/эта проблема была/;
+ s/This problem has been fixed/Эта проблема была исправлена/;
+ s/this problem is fixed in/эта проблема была исправлена в/;
+ s/this problem is fixed/эта проблема исправлена/;
+ s/These problems have been fixed/Эти проблемы были исправлены/;
+ s/these problems have been fixed in/эти проблемы были исправлены в/;
+ s/these problems have been fixed$/эти проблемы были исправлены/;
+ s/these problems have(?: been)?$/эти проблемы были/;
+ s/these problem are fixed in/эти проблемы исправлены в/;
+ s/these problem are fixed/эти проблемы исправлены/;
+ s/these problems will be fixed soon/эти проблемы будут исправлены позже/;
+ s/(?:been )?fixed in version/исправлены в версии/;
+ s/\bin version\b/в версии/;
+ s/\bversion\b/версии/;
+ s/of the Debian package/пакета Debian/;
+ s/upstream version/версии из основной ветки разработки/;
+
+ # For the [..]
+ s/([Ff])or the old stable distribution/В предыдущем стабильном выпуске/;
+ s/([Ff])or the oldstable distribution/В предыдущем стабильном выпуске/;
+ s/([Ff])or the old stable/В предыдущем стабильном/;
+ s/([Ff])or the oldstable/В предыдущем стабильном/;
+ s/For Debian/В Debian/;
+
+ # Some other phrases related to fixing
+ s/([Tt])he old stable distribution/Предыдущий стабильный выпуск/;
+ s/([Tt])he oldstable distribution/Предыдущий стабильный выпуск/;
+ s/does(?: not|n't) contain a(?:ny)? ([^ ]) package/пакет $1 отсутствует/;
+ s/\bis not affected by this problem/не подвержен данной проблеме/;
+ s/does not contain ([[:word:]]*) packages?/пакет $1 отсутствует/;
+ s/does not contain a(?:ny)? ([[:word:]]*) packages/пакеты $1 отсутствуют/;
+ s/does not contain a(?:ny)? ([[:word:]]*) package/пакет $1 отсутствует/;
+ s/this problem will be fixed soon/эта проблема будет исправлена позже/;
+
+ # Further information
+ s/Further information about Debian LTS security advisories, how to apply/Дополнительную информацию о рекомендациях по безопасности Debian LTS,/;
+ s/these updates to your system and frequently asked questions can be/том, как применять эти обновления к вашей системе, а также ответы на часто/;
+ s(found at: <a href="https://wiki.debian.org/LTS">https://wiki.debian.org/LTS)(задаваемые вопросы можно найти по адресу: <a href="https://wiki.debian.org/LTS">\\\nhttps://wiki.debian.org/LTS);
+
+ print DST $_;
+}
+
+close SRC;
+close DST;
+
+# We're done
+print "Copying done, remember to edit $dstfile\n";

© 2014-2024 Faster IT GmbH | imprint | privacy policy