fedora-rpmdevtools rpmls, NONE, 1.1.2.1 .cvsignore, 1.4, 1.4.2.1 Makefile.am, 1.9, 1.9.2.1 configure.ac, 1.6, 1.6.2.1 rmdevelrpms.conf, 1.3, 1.3.2.1 rpmdev-rmdevelrpms, 1.2, 1.2.2.1 rpmdev-vercmp, 1.1, 1.1.2.1 rpmdevtools.spec, 1.19, 1.19.2.1 spectemplate-perl.spec, 1.14, 1.14.2.1 template.init, 1.3, 1.3.2.1
Ville Skytta (scop)
fedora-extras-commits at redhat.com
Thu Jul 5 21:19:46 UTC 2007
Author: scop
Update of /cvs/fedora/fedora-rpmdevtools
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12617
Modified Files:
Tag: rpmdevtools-5
.cvsignore Makefile.am configure.ac rmdevelrpms.conf
rpmdev-rmdevelrpms rpmdev-vercmp rpmdevtools.spec
spectemplate-perl.spec template.init
Added Files:
Tag: rpmdevtools-5
rpmls
Log Message:
Sync nonintrusive changes from HEAD since rpmdevtools 5.3 to rpmdevtools-5 branch.
--- NEW FILE rpmls ---
#!/bin/sh
# rpmls -- List contents of rpm packages
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
owner=
if [ "$1" = "-l" ] ; then
owner='%-8{fileusername} %-8{filegroupname} '
shift
fi
qf="[%-11{filemodes:perms} $owner%{filenames}\\n]"
for file in "$@" ; do
p=
case "$file" in *.[rs]pm) p=p ;; esac
rpm -q$p --qf="$qf" "$file"
done
Index: .cvsignore
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- .cvsignore 20 Aug 2006 15:17:41 -0000 1.4
+++ .cvsignore 5 Jul 2007 21:19:44 -0000 1.4.2.1
@@ -10,3 +10,4 @@
install-sh
missing
rpminfo
+spectool-*
Index: Makefile.am
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -r1.9 -r1.9.2.1
--- Makefile.am 4 Sep 2006 16:16:15 -0000 1.9
+++ Makefile.am 5 Jul 2007 21:19:44 -0000 1.9.2.1
@@ -8,7 +8,7 @@
dist_bin_SCRIPTS = rpmdev-checksig rpmdev-diff rpmdev-extract rpmdev-md5 \
rpmdev-newspec rpmdev-rmdevelrpms rpmdev-setuptree rpmdev-vercmp \
- rpmdev-wipetree rpminfo
+ rpmdev-wipetree rpminfo rpmls
dist_man1_MANS = rpmdev-diff.1 rpmdev-extract.1
dist_man8_MANS = rpmdev-rmdevelrpms.8
Index: configure.ac
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/configure.ac,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -r1.6 -r1.6.2.1
--- configure.ac 25 Oct 2006 12:22:46 -0000 1.6
+++ configure.ac 5 Jul 2007 21:19:44 -0000 1.6.2.1
@@ -1,7 +1,13 @@
AC_INIT(rpmdevtools, 5.3)
AM_INIT_AUTOMAKE
-AC_PATH_PROG(HELP2MAN,help2man)
-AC_PATH_PROG(WGET,wget)
+AC_PATH_PROG([HELP2MAN], [help2man], [no])
+if test "$HELP2MAN" = "no" ; then
+ AC_MSG_ERROR([help2man is required])
+fi
+AC_PATH_PROG([WGET], [wget], [no])
+if test "$WGET" = "no" ; then
+ AC_MSG_ERROR([wget is required])
+fi
AC_OUTPUT(
Makefile
emacs/Makefile
Index: rmdevelrpms.conf
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/rmdevelrpms.conf,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- rmdevelrpms.conf 20 Aug 2006 15:40:44 -0000 1.3
+++ rmdevelrpms.conf 5 Jul 2007 21:19:44 -0000 1.3.2.1
@@ -2,17 +2,17 @@
#
# To prevent rpmdev-rmdevelrpms from removing some packages, add them to
# nondevpkgs. The value can be a Python tuple or a whitespace separated
-# string. For example:
-# nondevpkgs = ("foo-devel", "bar-devel")
-# nondevpkgs = "foo-devel bar-devel"
+# string containing package names or name.arch strings. For example:
+# nondevpkgs = ("foo-devel.x86_64", "bar-devel")
+# nondevpkgs = "foo-devel.x86_64 bar-devel"
#
nondevpkgs = ""
#
# To add packages to the removal list, add them to devpkgs.
-# The value can be a Python tuple or a whitespace separated string.
+# The value's format is the same as for nondevpkgs above.
# For example:
-# devpkgs = ("libfoo", "bar")
-# devpkgs = "libfoo bar"
+# devpkgs = ("libfoo", "bar.i386", "quux-tools.noarch")
+# devpkgs = "libfoo bar.i386 quux-tools.noarch"
#
devpkgs = ""
Index: rpmdev-rmdevelrpms
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/rpmdev-rmdevelrpms,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -r1.2 -r1.2.2.1
--- rpmdev-rmdevelrpms 2 Oct 2006 16:03:21 -0000 1.2
+++ rpmdev-rmdevelrpms 5 Jul 2007 21:19:44 -0000 1.2.2.1
@@ -24,7 +24,7 @@
import getopt, os, re, rpm, stat, sys, types
-__version__ = "1.3"
+__version__ = "1.6"
dev_re = re.compile("-(?:de(?:buginfo|vel)|sdk|static)\\b", re.IGNORECASE)
@@ -40,12 +40,13 @@
def_devpkgs =\
("autoconf", "autoconf213", "automake", "automake14", "automake15",
- "automake16", "automake17", "bison", "byacc", "dev86", "djbfft",
+ "automake16", "automake17", "bison", "byacc", "cmake", "dev86", "djbfft",
"docbook-utils-pdf", "doxygen", "flex", "gcc-g77", "gcc-gfortran", "gcc-gnat",
"gcc-objc", "gcc32", "gcc34", "gcc34-c++", "gcc34-java", "gcc35", "gcc35-c++",
"gcc4", "gcc4-c++", "gcc4-gfortran", "gettext", "glade", "glade2",
"kernel-source", "kernel-sourcecode", "libtool", "m4", "nasm",
- "perl-Module-Build", "pkgconfig", "qt-designer", "swig", "texinfo", "yasm",
+ "perl-Module-Build", "pkgconfig", "qt-designer", "scons", "swig", "texinfo",
+ "yasm",
)
# zlib-devel: see #151622
@@ -66,10 +67,11 @@
if not hdr: return 0
name = hdr[rpm.RPMTAG_NAME]
if not name: return 0
- if name in nondevpkgs: return 0
- if name in devpkgs: return 1
- if name in def_nondevpkgs: return 0
- if name in def_devpkgs: return 1
+ na = "%s.%s" % (name, hdr[rpm.RPMTAG_ARCH])
+ if name in nondevpkgs or na in nondevpkgs: return 0
+ if name in devpkgs or na in devpkgs: return 1
+ if name in def_nondevpkgs or na in def_nondevpkgs: return 0
+ if name in def_devpkgs or na in def_devpkgs: return 1
if jdev_re.search(name): return 0
if dev_re.search(name): return 1
if test_re.search(name): return 1
@@ -140,7 +142,8 @@
Usage: rpmdev-rmdevelrpms [OPTION]...
Options:
- -y, --yes Assume yes to all questions, do not prompt.
+ -y, --yes Remove without prompting (no-op if not root).
+ -l, --list-only Output condensed list of found packages, do not remove.
-v, --version Print program version and exit.
-h, --help Print help message and exit.'''
if exit is not None:
@@ -150,7 +153,7 @@
def version():
print "rpmdev-rmdevelrpms version %s" % __version__
print '''
-Copyright (c) 2004-2006 Fedora Project <http://fedoraproject.org/>.
+Copyright (c) 2004-2007 Fedora Project <http://fedoraproject.org/>.
This program is licensed under the GNU General Public License, see the
file COPYING included in the distribution archive.
@@ -163,77 +166,91 @@
try:
# TODO: implement -r|--root for checking a specified rpm root
opts, args = getopt.getopt(sys.argv[1:],
- "yvh",
- ["yes", "version", "help"])
+ "ylvh",
+ ["yes", "list", "version", "help"])
except getopt.GetoptError:
usage(2)
+ listonly = 0
confirm = 1
for o, a in opts:
if o in ("-v", "--version"):
version()
if o in ("-h", "--help"):
help()
+ if o in ("-l", "--list"):
+ listonly = 1
elif o in ("-y", "--yes"):
confirm = 0
ts = rpm.TransactionSet("/")
ts.setVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS))
- for pkg in ts.dbMatch():
+ mi = ts.dbMatch()
+ for pkg in mi:
if isDevelPkg(pkg):
- # addErase behaves like "--allmatches"
- ts.addErase(pkg[rpm.RPMTAG_NAME])
+ ts.addErase(mi.instance())
ts.order()
pkgs = []
try:
te = ts.next()
while te:
- pkgs.append(te.NEVR())
+ arch = te.A()
+ if arch:
+ pkgs.append("%s.%s" % (te.NEVR(), arch))
+ else:
+ pkgs.append(te.NEVR())
te = ts.next()
except StopIteration:
pass
try:
if len(pkgs) > 0:
pkgs.sort()
- print "Found %d devel packages:" % len(pkgs)
+ indent = ""
+ if not listonly:
+ indent = " "
+ print "Found %d devel packages:" % len(pkgs)
for pkg in pkgs:
- print " %s" % pkg
- unresolved = ts.check()
- if unresolved:
- print "...but removal would cause unresolved dependencies:"
- unresolved.sort(lambda x, y: cmp(x[0][0], y[0][0]))
- for t in unresolved:
- dep = t[1][0]
- if t[1][1]:
- dep = dep + " "
- if t[2] & rpm.RPMSENSE_LESS:
- dep = dep + "<"
- if t[2] & rpm.RPMSENSE_GREATER:
- dep = dep + ">"
- if t[2] & rpm.RPMSENSE_EQUAL:
- dep = dep + "="
- dep = dep + " " + t[1][1]
- if t[4] == rpm.RPMDEP_SENSE_CONFLICTS:
- dep = "conflicts with " + dep
- elif t[4] == rpm.RPMDEP_SENSE_REQUIRES:
- dep = "requires " + dep
- print " %s-%s-%s %s" % (t[0][0], t[0][1], t[0][2], dep)
- print "Skipped."
- elif os.geteuid() == 0:
- if confirm:
- proceed = raw_input("Remove them? [y/N] ")
- else:
- proceed = "y"
- if (proceed in ("Y", "y")):
- sys.stdout.write("Removing...")
- errors = ts.run(callback, "")
- print "Done."
- if errors:
- for error in errors:
- print error
- sys.exit(1)
- else:
- print "Not removed."
+ print indent + pkg
+ if listonly:
+ pass
else:
- print "Not running as root, skipping remove."
+ # TODO: is there a way to get arch for the unresolved deps?
+ unresolved = ts.check()
+ if unresolved:
+ print "...whose removal would cause unresolved dependencies:"
+ unresolved.sort(lambda x, y: cmp(x[0][0], y[0][0]))
+ for t in unresolved:
+ dep = t[1][0]
+ if t[1][1]:
+ dep = dep + " "
+ if t[2] & rpm.RPMSENSE_LESS:
+ dep = dep + "<"
+ if t[2] & rpm.RPMSENSE_GREATER:
+ dep = dep + ">"
+ if t[2] & rpm.RPMSENSE_EQUAL:
+ dep = dep + "="
+ dep = dep + " " + t[1][1]
+ if t[4] == rpm.RPMDEP_SENSE_CONFLICTS:
+ dep = "conflicts with " + dep
+ elif t[4] == rpm.RPMDEP_SENSE_REQUIRES:
+ dep = "requires " + dep
+ print " %s-%s-%s %s" % (t[0][0], t[0][1], t[0][2], dep)
+ print "Not removed due to dependencies."
+ elif os.geteuid() == 0:
+ if confirm:
+ proceed = raw_input("Remove them? [y/N] ")
+ else:
+ proceed = "y"
+ if (proceed in ("Y", "y")):
+ sys.stdout.write("Removing...")
+ errors = ts.run(callback, "")
+ print "Done."
+ if errors:
+ for error in errors:
+ print error
+ sys.exit(1)
+ else:
+ print "Not removed."
+ else:
+ print "Not running as root, skipping remove."
else:
print "No devel packages found."
finally:
Index: rpmdev-vercmp
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/rpmdev-vercmp,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -r1.1 -r1.1.2.1
--- rpmdev-vercmp 20 Aug 2006 15:40:44 -0000 1.1
+++ rpmdev-vercmp 5 Jul 2007 21:19:44 -0000 1.1.2.1
@@ -5,11 +5,19 @@
import rpm
import sys
+have_miscutils = 0
+try:
+ from rpmUtils.miscutils import stringToVersion
+ have_miscutils = 1
+except:
+ pass
+
def usage():
print """
- rpmdev-vercmp epoch1, ver1, release1, epoch2, ver2, release2
- or just let it ask you.
- """
+rpmdev-vercmp <epoch1> <ver1> <release1> <epoch2> <ver2> <release2>
+rpmdev-vercmp <EVR1> <EVR2> # if rpmUtils.miscutils is available
+rpmdev-vercmp # with no arguments, prompt
+"""
def vercmp((e1, v1, r1), (e2, v2, r2)):
rc = rpm.labelCompare((e1, v1, r1), (e2, v2, r2))
@@ -24,6 +32,16 @@
if len(sys.argv) > 1 and sys.argv[1] in ['-h', '--help', '-help', '--usage']:
usage()
sys.exit(0)
+ elif len(sys.argv) == 3:
+ if have_miscutils:
+ (e1, v1, r1) = stringToVersion(sys.argv[1])
+ (e2, v2, r2) = stringToVersion(sys.argv[2])
+ else:
+ print """
+Sorry, the 2-argument form is available only if rpmUtils.miscutils (which
+ships eg. with yum) is available."""
+ usage()
+ sys.exit(1)
elif len(sys.argv) < 7:
e1 = askforstuff('Epoch1')
v1 = askforstuff('Version1')
@@ -38,15 +56,9 @@
if rc > 0:
print "%s:%s-%s is newer" % (e1, v1, r1)
elif rc == 0:
- print "These are Equal"
+ print "These are equal"
elif rc < 0:
print "%s:%s-%s is newer" % (e2, v2, r2)
if __name__ == "__main__":
main()
-
-
-
-
-
-
Index: rpmdevtools.spec
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/rpmdevtools.spec,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -r1.19 -r1.19.2.1
--- rpmdevtools.spec 25 Oct 2006 12:22:46 -0000 1.19
+++ rpmdevtools.spec 5 Jul 2007 21:19:44 -0000 1.19.2.1
@@ -1,6 +1,6 @@
%define emacs_sitestart_d %{_datadir}/emacs/site-lisp/site-start.d
%define xemacs_sitestart_d %{_datadir}/xemacs/site-packages/lisp/site-start.d
-%define spectool_version 1.0.8
+%define spectool_version 1.0.9
Name: rpmdevtools
Version: 5.3
@@ -9,7 +9,7 @@
Group: Development/Tools
License: GPL
-URL: http://fedora.redhat.com/
+URL: http://fedoraproject.org/
Source0: %{name}-%{version}.tar.bz2
Source1: http://people.redhat.com/nphilipp/spectool/spectool-%{spectool_version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -19,10 +19,25 @@
Provides: fedora-rpmdevtools = %{version}
Obsoletes: fedora-rpmdevtools < 5.0
# Required for tool operations
-Requires: rpm-python, python, cpio, sed, perl, wget, file
+Requires: rpm-python
+Requires: python
+Requires: cpio
+Requires: sed
+Requires: perl
+Requires: wget
+Requires: file
# Minimal RPM build requirements
-Requires: rpm-build, gcc, gcc-c++, redhat-rpm-config, make, tar, patch
-Requires: diffutils, gzip, bzip2, unzip
+Requires: rpm-build
+Requires: gcc
+Requires: gcc-c++
+Requires: redhat-rpm-config
+Requires: make
+Requires: tar
+Requires: patch
+Requires: diffutils
+Requires: gzip
+Requires: bzip2
+Requires: unzip
%description
This package contains scripts and (X)Emacs support files to aid in
@@ -116,10 +131,35 @@
%{_bindir}/*
%{_prefix}/lib/rpm/check-*
%ghost %{_datadir}/*emacs
-%{_mandir}/man?/*.*
+%{_mandir}/man[18]/rpm*.[18]*
%changelog
+* Thu Jul 5 2007 Ville Skyttä <ville.skytta at iki.fi>
+- Add cmake and scons to default devel package list in rpmdev-rmdevelrpms.
+- Add LSB comment block to init script template.
+
+* Wed Jun 27 2007 Ville Skyttä <ville.skytta at iki.fi>
+- Add 2-argument form for comparing EVR strings to rpmdev-vercmp
+ (available only if rpmUtils.miscutils is available).
+
+* Sat Jun 16 2007 Ville Skyttä <ville.skytta at iki.fi>
+- Include rpmls (#213778).
+
+* Fri Jun 15 2007 Ville Skyttä <ville.skytta at iki.fi>
+- Update spectool to 1.0.9 (#243731).
+
+* Wed Apr 11 2007 Ville Skyttä <ville.skytta at iki.fi>
+- Add --list-only option to rmdevelrpms (Thorsten Leemhuis).
+
+* Tue Mar 13 2007 Ville Skyttä <ville.skytta at iki.fi>
+- BR perl(ExtUtils::MakeMaker) by default in perl spec template.
+- Update URL.
+
+* Wed Nov 8 2006 Ville Skyttä <ville.skytta at iki.fi>
+- Arch-qualify output of matched packages in rmdevelrpms and allow
+ arch-qualified packages in the config file.
+
* Wed Oct 25 2006 Ville Skyttä <ville.skytta at iki.fi> - 5.3-1
- Update spectool to 1.0.8, fixes #212108.
Index: spectemplate-perl.spec
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/spectemplate-perl.spec,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -r1.14 -r1.14.2.1
--- spectemplate-perl.spec 20 Jul 2006 17:46:34 -0000 1.14
+++ spectemplate-perl.spec 5 Jul 2007 21:19:44 -0000 1.14.2.1
@@ -10,7 +10,8 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:
-BuildRequires: perl
+# Correct for lots of packages, other common choices include eg. Module::Build
+BuildRequires: perl(ExtUtils::MakeMaker)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
Index: template.init
===================================================================
RCS file: /cvs/fedora/fedora-rpmdevtools/template.init,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- template.init 11 Dec 2004 00:34:41 -0000 1.3
+++ template.init 5 Jul 2007 21:19:44 -0000 1.3.2.1
@@ -10,6 +10,19 @@
# config: </path/to/conffile2>
# pidfile: </path/to/pidfile>
+# http://fedoraproject.org/wiki/FCNewInit/Initscripts
+### BEGIN INIT INFO
+# Provides:
+# Required-Start:
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start:
+# Default-Stop:
+# Short-Description:
+# Description:
+### END INIT INFO
+
# Source function library.
. /etc/rc.d/init.d/functions
@@ -28,7 +41,7 @@
start() {
echo -n $"Starting $prog: "
- # start it up here, usually something like "daemon $exec"
+ # if not running, start it up here, usually something like "daemon $exec"
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
More information about the scm-commits
mailing list