Package list debian-goodies / 2bb16f4
Imported Debian version 0.48 Javier Fernandez-Sanguino 9 years ago
16 changed file(s) with 339 addition(s) and 58 deletion(s). Raw diff Collapse all Expand all
5959 return 0
6060
6161 def usage():
62 sys.stderr.write('usage: checkrestart [-v]\n')
62 sys.stderr.write('usage: checkrestart [-vhpa]\n')
6363
6464 def main():
6565 process = None
6767
6868 # Process options
6969 try:
70 opts, args = getopt.getopt(sys.argv[1:], "hv", ["help", "verbose"])
70 opts, args = getopt.getopt(sys.argv[1:], "hvpa", ["help", "verbose", "packages", "all"])
7171 except getopt.GetoptError, err:
7272 # print help information and exit:
73 print str(err) # will print something like "option -a not recognized"
73 print str(err) # will print something like "option -x not recognized"
7474 usage()
7575 sys.exit(2)
76
77 # Global variables set through the command line
78 global verbose, onlyPackageFiles, allFiles
7679 verbose = False
80 # Only look for deleted files that belong to packages
81 onlyPackageFiles = False
82 # Look for any deleted file
83 allFiles = False
84
7785 for o, a in opts:
7886 if o == "-v":
7987 verbose = True
8088 elif o in ("-h", "--help"):
8189 usage()
8290 sys.exit()
91 elif o in ("-p", "--packages"):
92 onlyPackageFiles = True
93 elif o in ("-a", "--all"):
94 allFiles = True
95 onlyPackageFiles = False
8396 else:
8497 assert False, "unhandled option"
8598
232245
233246 # Tells if a file has to be considered a deleted file
234247 # Returns:
235 # - 0 (NO) for known locations of files which might be delted
248 # - 0 (NO) for known locations of files which might be deleted
236249 # - 1 (YES) for valid deleted files we are interested in
237250 def isdeletedFile (f):
251 if allFiles:
252 return 1
238253 # We don't care about log files
239254 if f.startswith('/var/log/'):
240255 return 0
259274 # Skip mutt files
260275 if re.compile("/tmp/mutt-\w+-[\-0-9]").search(f):
261276 return 0
277 # Skip font files
278 if f.startswith('/var/cache/fontconfig/'):
279 return 0
280 # Skip, if asked to, files that do not belong to any package
281 if onlyPackageFiles:
282 dpkgQuery = ["dpkg", "--search", f]
283 dpkgProc = subprocess.Popen(dpkgQuery, stdout=subprocess.PIPE, stderr=None)
284 for line in dpkgProc.stdout.readlines():
285 if line.endswith(f):
286 return 0
287
262288 # TODO: it should only care about library files (i.e. /lib, /usr/lib and the like)
263289 # build that check with a regexp to exclude others
264290 if f.endswith(' (deleted)'):
55 .SH NAME
66 checkrestart \- check which processes need to be restarted after an upgrade
77 .SH SYNOPSIS
8 .B checkrestart [ -hv ]
8 .B checkrestart [ -hvpa ]
99 .SH DESCRIPTION
1010 The
1111 .B checkrestart
3939 Generate detailed output. This output includes the list of all
4040 processes found using deleted files or descriptors as well as the deleted files
4141 and descriptors found.
42
43 .TP
44 .BI -p, --package
45 Only process deleted files that belong to a package, ignoring deleted files
46 which do not have an associated package in the package system.
47
48 .TP
49 .BI -a, --all
50 Process all deleted files regardless of location. This makes
51 the program analyse deleted files even if they would be discarded
52 because they are located in locations, such as
53 .I /tmp
54 , which are known to produce false positives. It will take preceded if used
55 simultaneously with the
56 .I -p
57 option.
4258
4359 .SH EXIT STATUS
4460
00 #!/bin/sh -e
1
2 # debget - Fetch a .deb for a package in APT's database
3
4 # Copyright (C) 2001,2002 Matt Zimmerman <mdz@debian.org>
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 # 02111-1307, USA.
20 #
21
122
223 # Set the locale so we can control apt-get errors properly
324 LC_ALL=C
2445 echo "ERROR: There was an error calling apt-get. Check that the database is in a consistent state and try again"
2546 exit 1
2647 fi
48 if ! ls /var/lib/apt/lists/ |grep Release >/dev/null; then
49 echo "ERROR: Your apt lists are empty. Update your package database"
50 echo "using 'apt-get update'"
51 fi
52
2753
2854 for pkgspec in $*; do
2955 apt-get -q2 --print-uris --reinstall install "$pkgspec" 2>/dev/null >/dev/null
3056 if [ $? -ne 0 ] ; then
3157 echo "ERROR: There is no '$pkgspec' package. Sorry."
58 echo "If you believe the package exists then consider updating your."
59 echo "package database using 'apt-get update'"
3260 continue
3361 fi
3462 # This provides only one version, but it's better than the apt-get
0 .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.07)
0 .\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.07)
11 .\"
22 .\" Standard preamble:
33 .\" ========================================================================
4 .de Sh \" Subsection heading
5 .br
6 .if t .Sp
7 .ne 5
8 .PP
9 \fB\\$1\fR
10 .PP
11 ..
124 .de Sp \" Vertical space (when we can't use .PP)
135 .if t .sp .5v
146 .if n .sp
5244 .el .ds Aq '
5345 .\"
5446 .\" If the F register is turned on, we'll generate index entries on stderr for
55 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
47 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
5648 .\" entries marked with X<> in POD. Of course, you'll have to process the
5749 .\" output yourself in some meaningful fashion.
5850 .ie \nF \{\
0 debian-goodies (0.48) unstable; urgency=low
1
2 * Provide dhomepage application (and manual page) that can be used
3 to open a packages' homepage. This program was provided by
4 Thadeu Lima de Souza Cascardo (Closes: 500397)
5 * Document degrep, dfgrep and dzgrep through the dgrep manpage by creating a
6 symlink during package installation, thanks to Xavier Luthi for the
7 patch. (Closes: 403845, 403844, 403843)
8 * Add a proper (C) and license header to debget and dpigs
9 * checkrestart:
10 - skip deleted files in /var/cache/fontconfig/
11 - add a 'a' ('all') command line switch to process all deleted
12 files, regardless of location
13 - add a 'p' ('package') command line switch to process only
14 files which are associated with a given package
15 - adjust command line options in usage()
16 (Closes: 497611)
17 * dpigs: Use script snipet provided by Aaron M. Ucko to make it possible
18 to group by source package, use a new (-S, --source) option.
19 (Closes: 511349)
20 * debget:
21 - check the contents of /var/lib/apt/lists before executing
22 apt to warn if there is no Release information there
23 - document that APT's package database needs to be up-to-dat if a
24 package is not found (might happen to aptitude users)
25 * popbugs: adjust error message:
26 - popularity contest is now run through cron.daily
27 - provide the command line needed to generate the popconf data
28 (Closes: 500432)
29
30
31 -- Javier Fernandez-Sanguino Pen~a <jfs@debian.org> Sun, 25 Jan 2009 20:59:06 +0100
32
033 debian-goodies (0.47) unstable; urgency=low
134
235 * debget: use 'head' instead of 'tail' when using apt-get --print-uris to
66
77 Package: debian-goodies
88 Architecture: all
9 Depends: dctrl-tools | grep-dctrl, curl, python (>= 2.4), lsof, whiptail | dialog, less
9 Depends: dctrl-tools | grep-dctrl, debianutils, curl, python (>= 2.4), lsof, whiptail | dialog, less
1010 Suggests: popularity-contest, xdg-utils, zenity
1111 Conflicts: debget
1212 Replaces: debget
77
88 Copyright:
99
10 # Copyright (C) 2001 Matt Zimmerman <mdz@debian.org>
10 The programs in this package hold the following copyrights:
11
12 - checkrestart:
13 Copyright (C) 2001 Matt Zimmerman <mdz@debian.org>
14 Copyright (C) 2007,2008 Javier Fernandez-Sanguino <jfs@debian.org>
15
16 - debget, dgrep, dglob, dpigs, popbugs
17
18 Copyright (C) 2001-2004 Matt Zimmerman <mdz@debian.org>
19
20 - debman
21 Copyright (C) 2003 Colin Watson <cjwatson@debian.org>
22
23 - which-pkg-broke
24
25 Written by Bill Gribble <grib@billgribble.com> and placed in the public
26 domain.
27
28 - dhomepage
29
30 Copyright (C) 2008 Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
31
32 - debian/ contents
33
34 Copyright (C) 2001-2004 Matt Zimmerman <mdz@debian.org>
35 Copyright (C) 2006-2009 Javier Fernandez-Sanguino <jfs@debian.org>
36
37
38 The license of all programs in this package, excluding 'which-pkg-broke' which
39 is in the public domain, is:
1140
1241 # This program is free software; you can redistribute it and/or modify
1342 # it under the terms of the GNU General Public License as published by
2453 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
2554 # MA 02110-1301 USA
2655
56
2757 On Debian systems, a copy of the GNU General Public License may be
2858 found in /usr/share/common-licenses/GPL.
6161 dh_installexamples
6262 dh_link
6363 dh_compress
64 ln -s dgrep.1.gz debian/debian-goodies/usr/share/man/man1/degrep.1.gz
65 ln -s dgrep.1.gz debian/debian-goodies/usr/share/man/man1/dfgrep.1.gz
66 ln -s dgrep.1.gz debian/debian-goodies/usr/share/man/man1/dzgrep.1.gz
6467 dh_fixperms
6568 dh_installdeb
6669 dh_gencontrol
(No changes)
0 .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.07)
0 .\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.07)
11 .\"
22 .\" Standard preamble:
33 .\" ========================================================================
4 .de Sh \" Subsection heading
5 .br
6 .if t .Sp
7 .ne 5
8 .PP
9 \fB\\$1\fR
10 .PP
11 ..
124 .de Sp \" Vertical space (when we can't use .PP)
135 .if t .sp .5v
146 .if n .sp
5244 .el .ds Aq '
5345 .\"
5446 .\" If the F register is turned on, we'll generate index entries on stderr for
55 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
47 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
5648 .\" entries marked with X<> in POD. Of course, you'll have to process the
5749 .\" output yourself in some meaningful fashion.
5850 .ie \nF \{\
0 .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.07)
0 .\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.07)
11 .\"
22 .\" Standard preamble:
33 .\" ========================================================================
4 .de Sh \" Subsection heading
5 .br
6 .if t .Sp
7 .ne 5
8 .PP
9 \fB\\$1\fR
10 .PP
11 ..
124 .de Sp \" Vertical space (when we can't use .PP)
135 .if t .sp .5v
146 .if n .sp
5244 .el .ds Aq '
5345 .\"
5446 .\" If the F register is turned on, we'll generate index entries on stderr for
55 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
47 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
5648 .\" entries marked with X<> in POD. Of course, you'll have to process the
5749 .\" output yourself in some meaningful fashion.
5850 .ie \nF \{\
160152 \&\fBgrep\fR documentation (i.e. the manpage or the texinfo manual) for
161153 a complete listing. Only a few options are excluded because they do not
162154 conform with the intended behaviour, see the list below.
163 .Sh "Options of grep that are not supported by dgrep"
155 .SS "Options of grep that are not supported by dgrep"
164156 .IX Subsection "Options of grep that are not supported by dgrep"
165157 .IP "\fB\-r\fR, \fB\-\-recursive\fR, \fB\-d\fR \fIrecurse\fR, \fB\-\-directories\fR=\fIrecurse\fR" 4
166158 .IX Item "-r, --recursive, -d recurse, --directories=recurse"
0 #!/bin/sh
1 #
2 # Copyright (C) 2008 Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License along
15 # with this program; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 #
18
19 VERSION="0.1"
20
21 function version()
22 {
23 echo "dhomepage version $VERSION"
24 echo "dhomepage is licensed under the GNU General Public License"
25 echo "version 2 or later"
26 }
27
28 function usage()
29 {
30 echo "dhomepage PACKAGE"
31 echo ""
32 echo "--version Show version information"
33 echo "--help Show this help message"
34 echo ""
35 }
36
37 PACKAGE="$1"
38
39 if [ -z "$PACKAGE" ]; then
40 usage
41 exit 0
42 fi
43
44 case "$1" in
45 --help)
46 usage
47 exit 0
48 ;;
49 --version)
50 version
51 exit 0
52 ;;
53 esac
54
55 HOMEPAGE=`grep-aptavail -PX $PACKAGE -s Homepage | sed 's,^Homepage: ,,'`
56
57 if [ -z "$HOMEPAGE" ]; then
58 HOMEPAGE=`grep-aptavail -PX $PACKAGE -s Description | \
59 sed -n '/^ Homepage: /{s,^ Homepage: ,,;p}'`
60 fi
61
62 if [ -z "$HOMEPAGE" ]; then
63 echo "$PACKAGE has no homepage"
64 exit 1
65 fi
66
67 sensible-browser "$HOMEPAGE"
0 .\"
1 .\" Copyright (C) 2008 Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
2 .\"
3 .\" This program is free software; you can redistribute it and/or modify
4 .\" it under the terms of the GNU General Public License as published by
5 .\" the Free Software Foundation; either version 2 of the License, or
6 .\" (at your option) any later version.
7 .\"
8 .\" This program is distributed in the hope that it will be useful,
9 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
10 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 .\" GNU General Public License for more details.
12 .\"
13 .\" You should have received a copy of the GNU General Public License along
14 .\" with this program; if not, write to the Free Software Foundation, Inc.,
15 .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 .\"
17
18 .TH DHOMEPAGE 1 2008-09-27
19
20 .SH NAME
21 dhomepage - show the homepage of a package in a browser
22
23 .SH SYNOPSIS
24 dhomepage PACKAGE
25
26 .SH DESCRIPTION
27 Shows the homepage of a Debian package using a sensible browser.
28
29 .SH OPTIONS
30
31 .TP
32 \fB\-\-help\fR
33 Print help message
34
35 .TP
36 \fB\-\-help\fR
37 Print version message
38
39 .SH EXIT STATUS
40 Returns 0 if homepage was found, and 1 otherwise.
41
42 .SH BUGS
43 Report bugs to this man page and program to cascardo@minaslivre.org.
44
45 .SH SEE ALSO
46 .BR dgrep (1)
47 .BR sensible-browser (1)
00 #!/bin/sh
1
2 # dpigs - Show which installed packages occupy the most space
3
4 # Copyright (C) 2001,2002 Matt Zimmerman <mdz@debian.org>
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 # 02111-1307, USA.
20 #
121
222 set -e
323
2040 LINES=10
2141 # grep-status provides a default
2242 STATUS=
43 # Default: provide binary package information
44 SOURCE=0
2345
24 OPTS=$(getopt -o n:s:h --long lines:,status:,help -- "$@")
46 OPTS=$(getopt -o n:s:Sh --long lines:,status:,source,help -- "$@")
2547 eval set -- "$OPTS"
2648
2749 while true; do
3355 -s|--status)
3456 STATUS="$2"
3557 shift 2
58 ;;
59 -S|--source)
60 SOURCE=1
61 shift 1
3662 ;;
3763 -h|--help)
3864 Usage
4975 esac
5076 done
5177
52 grep-status -nsInstalled-size,Package -F Status ' installed' $STATUS \
53 | perl -p00l12 -e 's/\n/ /' \
54 | sort -rn \
55 | head --lines=$LINES
78 if [ $SOURCE -eq 0 ] ; then
79 grep-status -nsInstalled-size,Package -F Status ' installed' $STATUS \
80 | perl -p00l12 -e 's/\n/ /' \
81 | sort -rn \
82 | head --lines=$LINES
83 else
84 # Order by source package
85 grep-status -nsInstalled-size,Source:Package -F Status ' installed' $STATUS \
86 | perl -n00a -e '$s{$F[1]}+=$F[0]; END { for(keys %s) {print"$s{$_} $_\n"} }' \
87 | sort -rn \
88 | head --lines=$LINES
89 # Alternatively use this:
90 # It adds details of which binary packages are
91 # involved (but not how big they are), with % standing in for the source
92 #grep-status -nsInstalled-size,Package,Source:Package -F Status ' installed' \
93 # $STATUS \
94 # | perl -n00al12 -e '$s{$F[2]} += $F[0];
95 # $F[1] =~ s/\Q$F[2]\E/%/; $b{$F[2]}{$F[1]} = 1;
96 # END {$, = " "; for(keys %s) {print "$s{$_} $_:", sort keys %{$b{$_}}} }' \
97 # | sort -rn \
98 # | head --lines=$LINES
99 fi
0 .\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.07)
0 .\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.07)
11 .\"
22 .\" Standard preamble:
33 .\" ========================================================================
4 .de Sh \" Subsection heading
5 .br
6 .if t .Sp
7 .ne 5
8 .PP
9 \fB\\$1\fR
10 .PP
11 ..
124 .de Sp \" Vertical space (when we can't use .PP)
135 .if t .sp .5v
146 .if n .sp
5244 .el .ds Aq '
5345 .\"
5446 .\" If the F register is turned on, we'll generate index entries on stderr for
55 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
47 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
5648 .\" entries marked with X<> in POD. Of course, you'll have to process the
5749 .\" output yourself in some meaningful fashion.
5850 .ie \nF \{\
00 #!/usr/bin/python
11
2 # popbugs - Find RC bugs in packages you commonly use
3 # Copyright (C) 2001-2004 Matt Zimmerman <mdz@debian.org>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 # 02111-1307, USA.
219 #
3 # popbugs - Find RC bugs in packages you commonly use
4 # Matt Zimmerman <mdz@debian.org> 2001
5 #
20
621
722 import sys
823 import re
5974 sys.stderr.write('''
6075 There is no popularity-contest data present on your system. This
6176 probably means that popularity-contest has not yet run since it
62 was installed. Try running /etc/cron.weekly/popularity-contest by
63 hand to collect some data.
77 was installed. Try waiting for /etc/cron.daily/popularity-contest to
78 to collect some data or manually run (as root user):
79
80 /usr/sbin/popularity-contest >/var/log/popularity-contest
6481
6582 ''')
6683 sys.exit(1)