From: Valentin Vidic Date: Fri, 30 Sep 2011 13:43:43 +0000 (+0200) Subject: Fix lintian warnings. X-Git-Tag: debian/6.0.0~9 X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=commitdiff_plain;h=2ca0dbd0c6c05c77ff6b438ac1183c609c36caa6;p=carnet-upgrade.git Fix lintian warnings. --- diff --git a/debian/config b/debian/config new file mode 100644 index 0000000..682051e --- /dev/null +++ b/debian/config @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +# Load debconf +. /usr/share/debconf/confmodule +db_version 2.0 + +# Show dialogs if started from postinst +if [ "$CN_POSTINST" ]; then + rm -f /var/lib/carnet-upgrade/debconf-priority 2>/dev/null + rm -f /var/lib/carnet-upgrade/check-services 2>/dev/null + + # display installation notice for new version + db_fset carnet-upgrade/short-instructions seen false + db_input high carnet-upgrade/short-instructions || true +fi + +db_go || true +db_stop || true diff --git a/debian/control b/debian/control index 6e7ef5c..68617c6 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,8 @@ Section: admin Priority: extra Maintainer: Grupa za izradu paketa Uploaders: Valentin Vidic -Build-Depends: debhelper (>= 7), debiandoc-sgml, texlive, texlive-latex-extra, - ghostscript +Build-Depends: debhelper (>= 7), po-debconf, debiandoc-sgml, texlive, + texlive-latex-extra, ghostscript Standards-Version: 3.9.1 Package: carnet-upgrade diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..d0555a3 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,7 @@ +Copyright 2011 CARNet + +You are free to distribute this software package under the terms of the +GNU General Public License. + +On Debian systems, the complete text of the GNU General Public +License can be found in the file /usr/share/common-licenses/GPL. diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 0000000..82dd950 --- /dev/null +++ b/debian/manpages @@ -0,0 +1 @@ +doc/carnet-upgrade.8 diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in new file mode 100644 index 0000000..cef83a3 --- /dev/null +++ b/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff --git a/debian/po/templates.pot b/debian/po/templates.pot new file mode 100644 index 0000000..1c1b6ef --- /dev/null +++ b/debian/po/templates.pot @@ -0,0 +1,57 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: carnet-upgrade@packages.debian.org\n" +"POT-Creation-Date: 2011-09-30 14:20+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: note +#. Description +#: ../templates:1001 +msgid "CARNet Debian 6.0 (squeeze) nadogradnja" +msgstr "" + +#. Type: note +#. Description +#: ../templates:1001 +msgid "" +"Instalirali ste paket carnet-upgrade za nadogradnju sa CARNet Debian 5.0 " +"(lenny) na CARNet Debian 6.0 (squeeze)." +msgstr "" + +#. Type: note +#. Description +#: ../templates:1001 +msgid "" +"Prije pocetka nadogradnje napravite backup cijelog sustava i procitajte " +"dokumentaciju u /usr/share/doc/carnet-upgrade/ ili na webu: http://sistemac." +"carnet.hr/system/files/carnet-upgrade.pdf" +msgstr "" + +#. Type: note +#. Description +#: ../templates:1001 +msgid "" +"Ukoliko niste restartali posluzitelj nakon instalacije kernela, restartajte " +"ga prije pokretanja nadogradnje. Ukoliko nemate barem 100 MB slobodnog " +"mjesta na / particiji procitajte upute na webu: http://sistemac.carnet.hr/" +"node/401" +msgstr "" + +#. Type: note +#. Description +#: ../templates:1001 +msgid "Nadogradnju pokrenite kao root sa 'carnet-upgrade'." +msgstr "" diff --git a/debian/postinst b/debian/postinst index 589daf7..6413868 100644 --- a/debian/postinst +++ b/debian/postinst @@ -1,54 +1,16 @@ #!/bin/sh -# postinst script for carnet-upgrade -# -# see: dh_installdeb(1) set -e -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package +[ "$1" = "configure" ] || exit 0 - -case "$1" in - configure) - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -if [ "$1" = "configure" ] && [ -e /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule - - # clear old cached values - if dpkg --compare-versions "$2" lt 6.0; then - db_set carnet-upgrade/debconf-priority "" - db_set carnet-upgrade/check-services "" - - # display installation notice for new version - db_fset carnet-upgrade/short-instructions seen false - db_input high carnet-upgrade/short-instructions || true - db_go - fi +# clear old cached values +if dpkg --compare-versions "$2" lt 6.0; then + export CN_POSTINST=1 fi -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. +# Load debconf +. /usr/share/debconf/confmodule +db_version 2.0 #DEBHELPER# - -exit 0 diff --git a/debian/templates b/debian/templates index 45d8237..7c2ce00 100644 --- a/debian/templates +++ b/debian/templates @@ -1,14 +1,6 @@ -Template: carnet-upgrade/debconf-priority -Type: string -Description: for internal use - -Template: carnet-upgrade/check-services -Type: string -Description: for internal use - Template: carnet-upgrade/short-instructions Type: note -Description: CARNet Debian 6.0 (squeeze) nadogradnja +_Description: CARNet Debian 6.0 (squeeze) nadogradnja Instalirali ste paket carnet-upgrade za nadogradnju sa CARNet Debian 5.0 (lenny) na CARNet Debian 6.0 (squeeze). . diff --git a/doc/carnet-upgrade.8 b/doc/carnet-upgrade.8 new file mode 100644 index 0000000..8704239 --- /dev/null +++ b/doc/carnet-upgrade.8 @@ -0,0 +1,22 @@ +.TH carnet-upgrade 8 "September 2011" CARNet "CARNet Debian Commands" +.SH NAME +carnet-upgrade \- Upgrade scripts for CARNet Debian distribution +.SH SYNOPSIS +.B carnet-upgrade +.SH DESCRIPTION +.PP +This is script for upgrading CARNet Debian distribution to a new +major release. +.SH AUTHOR +Written by Valentin Vidic , +Ivan.Rako +.SH "REPORTING BUGS" +Report bugs to . +.SH COPYRIGHT +Copyright 2011 CARNet +.PP +You are free to distribute this software package under the terms of the GNU +General Public License. +.PP +On Debian systems, the complete text of the GNU General Public License can +be found in the file /usr/share/common-licenses/GPL. diff --git a/src/scripts/check_services b/src/scripts/check_services index 05f5119..4ecbe5b 100755 --- a/src/scripts/check_services +++ b/src/scripts/check_services @@ -1,7 +1,6 @@ #!/bin/bash -# Load debconf stuff -. /usr/share/debconf/confmodule +STORE=/var/lib/carnet-upgrade/check-services # Load nase funkcije . /usr/share/carnet-upgrade/data.sh @@ -22,8 +21,7 @@ cs_preupgrade () { done if [ -n "$services" ]; then - db_set carnet-upgrade/check-services "$services" - db_go || true + echo "${services# }" > $STORE fi } @@ -58,8 +56,8 @@ cs_postupgrade () { ;; esac - db_get carnet-upgrade/check-services || true - services="${RET// /|}" + services=$(test -f $STORE && cat $STORE) + services="${services// /|}" failed_services=$( echo "$services_to_check" \ @@ -75,22 +73,22 @@ cs_postupgrade () { fi } -# checkiraj da li je sto zapisano u debconf +# checkiraj da li je sto zapisano cs_check () { - db_get carnet-upgrade/check-services || true - debconf="$RET" + services=$(test -f $STORE && cat $STORE) - if [ -n "$debconf" ]; then + if [ -n "$services" ]; then exit 0 else exit 1 fi } -# prikazi sto je zapisano u debconf +# prikazi sto je zapisano cs_show () { - db_get carnet-upgrade/check-services || true - echo "$RET" + services=$(test -f $STORE && cat $STORE) + + echo "$services" } case "$1" in diff --git a/src/scripts/debconf_priority b/src/scripts/debconf_priority index 4eab0cc..245d263 100755 --- a/src/scripts/debconf_priority +++ b/src/scripts/debconf_priority @@ -1,21 +1,18 @@ #!/bin/bash -# Load debconf stuff -. /usr/share/debconf/confmodule +STORE=/var/lib/carnet-upgrade/debconf-priority # setiraj debconf na high i spremi stari debconf_priority_preupgrade () { local old_debconf - db_get debconf/priority || true - old_debconf="$RET" + old_debconf=$(debconf-show debconf | sed -n '/debconf\/priority: /s///p') if [ -n "$old_debconf" ]; then - db_set carnet-upgrade/debconf-priority "$old_debconf" + echo "$old_debconf" > $STORE fi - db_set debconf/priority high - db_go || true + echo set debconf/priority high | debconf-communicate } @@ -23,21 +20,17 @@ debconf_priority_preupgrade () { debconf_priority_postupgrade () { local new_debconf - db_get carnet-upgrade/debconf-priority || true - new_debconf="$RET" + new_debconf=$(test -f $STORE && cat $STORE) if [ -n "$new_debconf" ]; then - db_set debconf/priority "$new_debconf" - db_set carnet-upgrade/debconf-priority "" + echo set debconf/priority "$new_debconf" | debconf-communicate + rm -f $STORE fi - - db_go || true } # checkiraj debconf_priority_check () { - db_get carnet-upgrade/debconf-priority || true - debconf="$RET" + debconf=$(test -f $STORE && cat $STORE) if [ -n "$debconf" ]; then exit 0