According to http://www.rpm.org/api/4.4.2.2/specfile.html a Version: tag can contain a hyphen, as the tarball for the source I am compiling is named 2.3-pre4 etc. When I try to build it I get an error about the illegal char? Anyone know about the discrepancy between the docs and RHEL's rpmbuild? Without recreating a new tarball and bungling the name how does one gracefully handle this? Thanks! jlc
On Mon, 2010-06-07 at 22:20 +0000, Joseph L. Casale wrote:> According to http://www.rpm.org/api/4.4.2.2/specfile.html a > Version: tag can contain a hyphen, as the tarball for the source > I am compiling is named 2.3-pre4 etc. > > When I try to build it I get an error about the illegal char? > > Anyone know about the discrepancy between the docs and RHEL's > rpmbuild? Without recreating a new tarball and bungling the name > how does one gracefully handle this? > > Thanks! > jlc--- Ok Special Attention here: Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/inotify-tools-3.13-3.el5-root-ethan Wrote: /home/ethan/rpmbuild/SRPMS/inotify-tools-3.13-3.el5.src.rpm Wrote: /home/ethan/rpmbuild/RPMS/i386/inotify-tools-3.13-3.el5.i386.rpm Wrote: /home/ethan/rpmbuild/RPMS/i386/inotify-tools-devel-3.13-3.el5.i386.rpm Wrote: /home/ethan/rpmbuild/RPMS/i386/inotify-tools-debuginfo-3.13-3.el5.i386.rpm ############################################################################ inotify-tools/spec ############################################################################ Name: inotify-tools Version: 3.13 Release: 3%{?dist} ## Here is you wanted `-`... ## Summary: Command line utilities for inotify Release: pre4%{?dist} John
On Mon, 2010-06-07 at 22:20 +0000, Joseph L. Casale wrote: Ok a follow up... What you want is the release tag not the version because it will not work in the version tag. Why I do not know. I tried again with another src.rpm and has to be release tag for sure. Bombs out with an illegal tag. John
On Mon, 7 Jun 2010, Joseph L. Casale wrote:> According to http://www.rpm.org/api/4.4.2.2/specfile.html a > Version: tag can contain a hyphen, as the tarball for the source > I am compiling is named 2.3-pre4 etc.ehh? Names must not include whitespace and may include a hyphen '-' (unlike version and release tags). That is, version and release are UNLIKE name. name MAY have a hyphen. by inference (and as you have seen), version and release may not. The computational load from extracting this information from a package with --querytags is VERY HIGH, compared to simple textual processing [herrold at new bin]$ time rpm -qp graphviz-2.8-1.sl.src.rpm --qf \ '%{name} \t %{version} \t %{release} \n' 2> /dev/null graphviz 2.8 1.sl real 0m0.030s user 0m0.019s sys 0m0.011s [herrold at new bin]$ time ./split-rpm.sh graphviz-2.8-1.sl.src.rpm Tgt.: graphviz-2.8-1.sl.src.rpm Name: graphviz Ver.: 2.8 Rel.: 1.sl real 0m0.017s user 0m0.004s sys 0m0.013s [herrold at new bin]$ #!/bin/sh # # split-rpm.sh # an RPH original released under GPLv3 # Copyright (c) 2010 R P Herrold, Columbus, OH # info at owlriver.com # [ "x${1}" = "x" ] && { echo "Usage: $0 (rpmpackage_name)" 1>&2 exit 1 } REL=`echo "$1" | rev | cut -d- -f 1 | cut -d'.' -f 3- | rev ` VER=`echo "$1" | rev | cut -d- -f 2 | rev` NAM=`echo "$1" | rev | cut -d- -f 3- | rev` echo "Tgt.: ${1}" echo "Name: ${NAM}" echo "Ver.: ${VER}" echo "Rel.: ${REL}" # -- Russ herrold