Hi, I'm using the SquidAnalyzer network analysis tool in combination with Squid. Up until now, I've been running Slackware Linux on my servers. I built a custom package that installs SquidAnalyzer to /var/www/vhosts/squidreport/html. Then I setup an Apache virtual host for SquidAnalyzer's pages. Since I'm migrating my servers from Slackware to CentOS, I'd like to build a corresponding RPM package for SquidAnalyzer. I downloaded the sources here: http://squidanalyzer.darold.net/download.html Then I set up a local build environment as described in the CentOS wiki. The source tarball already contains a squidanalyzer.spec file in the packaging/RPM subdirectory. So I copied that spec file over to ~/rpmbuild/SPECS and the source tarball to ~/rpmbuild/SOURCES. The version information in the spec file is wrong, it indicates 6.2, but the version of SquidAnalyzer is 6.2-1. Unfortunately when I insert the correct version in the spec file, I get this: $ rpmbuild -ba --clean squidanalyzer.spec error: line 5: Illegal char '-' in: Version: 6.2-1 What can I do now? Niki -- Microlinux - Solutions informatiques 100% Linux et logiciels libres 7, place de l'?glise - 30730 Montpezat Web : http://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32
Le 11/03/2015 09:40, Niki Kovacs a ?crit :> Unfortunately when I insert the correct version in the spec file, I get > this: > > $ rpmbuild -ba --clean squidanalyzer.spec > error: line 5: Illegal char '-' in: Version: 6.2-1I'll answer that myself, since I just found the culprit. There's a version mismatch between the tarball and the extracted source directory. Simply renaming the tarball to version 6.2 fixed it. Cheers, Niki -- Microlinux - Solutions informatiques 100% Linux et logiciels libres 7, place de l'?glise - 30730 Montpezat Web : http://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32
Joseph L. Brunner
2015-Mar-11 11:52 UTC
[CentOS] SquidAnalyzer: minor trouble building RPM
Thanks for the info. Any reason you're leaving slackware now? -----Original Message----- From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On Behalf Of Niki Kovacs Sent: Wednesday, March 11, 2015 05:23 AM To: centos at centos.org Subject: Re: [CentOS] SquidAnalyzer: minor trouble building RPM Le 11/03/2015 09:40, Niki Kovacs a ?crit :> Unfortunately when I insert the correct version in the spec file, I > get > this: > > $ rpmbuild -ba --clean squidanalyzer.spec > error: line 5: Illegal char '-' in: Version: 6.2-1I'll answer that myself, since I just found the culprit. There's a version mismatch between the tarball and the extracted source directory. Simply renaming the tarball to version 6.2 fixed it. Cheers, Niki -- Microlinux - Solutions informatiques 100% Linux et logiciels libres 7, place de l'?glise - 30730 Montpezat Web : http://www.microlinux.fr Mail : info at microlinux.fr T?l. : 04 66 63 10 32 _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos
Jonathan Billings
2015-Mar-11 13:36 UTC
[CentOS] SquidAnalyzer: minor trouble building RPM
On Wed, Mar 11, 2015 at 10:23:07AM +0100, Niki Kovacs wrote:> > Le 11/03/2015 09:40, Niki Kovacs a ?crit : > >Unfortunately when I insert the correct version in the spec file, I get > >this: > > > >$ rpmbuild -ba --clean squidanalyzer.spec > >error: line 5: Illegal char '-' in: Version: 6.2-1 > > I'll answer that myself, since I just found the culprit. There's a version > mismatch between the tarball and the extracted source directory. Simply > renaming the tarball to version 6.2 fixed it.Also, you can't use a - in the Version tag in the rpm spec file. A mismatch between the tarball name and the extracted source directory would be a different error. -- Jonathan Billings <billings at negate.org>