new upstream release - 2.00
This commit is contained in:
parent
80b31d3204
commit
7fa522b1c0
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
units-1.88.tar.gz
|
||||
/units-2.00.tar.gz
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
9b2ee6e7e0e9c62741944cf33fc8a656 units-1.88.tar.gz
|
||||
6d0518d493f9bab5aa318a3c7d0801b2 units-2.00.tar.gz
|
||||
|
@ -1,97 +0,0 @@
|
||||
From 149121fe597e9d3ee818d6d1d0facf9175d6674d Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Tue, 15 Nov 2011 19:24:00 +0100
|
||||
Subject: [PATCH 1/2] units - fix defects found by Coverity
|
||||
|
||||
---
|
||||
units.c | 18 +++++++++++-------
|
||||
1 files changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/units.c b/units.c
|
||||
index cdda76a..c4230c9 100644
|
||||
--- a/units.c
|
||||
+++ b/units.c
|
||||
@@ -383,7 +383,7 @@ readunits(char *file, FILE *errfile,
|
||||
struct prefixlist *pfxptr;
|
||||
struct unitlist *uptr;
|
||||
FILE *unitfile;
|
||||
- char *line, *lineptr, *unitdef, *unitname, *permfile;
|
||||
+ char *line = 0, *lineptr, *unitdef, *unitname, *permfile;
|
||||
int len, linenum, linebufsize, goterr;
|
||||
unsigned hashval, pval;
|
||||
int locunitcount, locprefixcount, locfunccount;
|
||||
@@ -399,12 +399,13 @@ readunits(char *file, FILE *errfile,
|
||||
|
||||
growbuffer(&line,&linebufsize);
|
||||
|
||||
- permfile = dupstr(file); /* This is a permanent copy to
|
||||
- reference in the database.
|
||||
- It is never freed. */
|
||||
unitfile = fopen(file, "rt");
|
||||
if (!unitfile)
|
||||
return E_FILE;
|
||||
+
|
||||
+ permfile = dupstr(file); /* This is a permanent copy to
|
||||
+ reference in the database.
|
||||
+ It is never freed. */
|
||||
while (!feof(unitfile)) {
|
||||
if (!fgetslong(&line, &linebufsize, unitfile, &linenum))
|
||||
break;
|
||||
@@ -471,8 +472,10 @@ readunits(char *file, FILE *errfile,
|
||||
}
|
||||
readerr = readunits(includefile, errfile, unitcount, prefixcount,
|
||||
funccount, depth+1);
|
||||
- if (readerr == E_MEMORY)
|
||||
+ if (readerr == E_MEMORY) {
|
||||
+ fclose(unitfile);
|
||||
return readerr;
|
||||
+ }
|
||||
if (readerr == E_FILE) {
|
||||
if (errfile)
|
||||
fprintf(errfile, "%s: unable to open included file '%s' at line %d of file '%s\n", progname, includefile, linenum, file);
|
||||
@@ -1381,7 +1384,7 @@ subunitroot(int n,char *in[], char *out[])
|
||||
char **ptr,**current;
|
||||
int count;
|
||||
|
||||
- for(current = in;*current && *current==NULLUNIT;current++);
|
||||
+ for(current = in;*current==NULLUNIT;current++)
|
||||
count = 0;
|
||||
for(ptr=in;*ptr;ptr++){
|
||||
if (*ptr==NULLUNIT) continue;
|
||||
@@ -2618,7 +2621,7 @@ Typing 'search text' will show units whose names contain 'text'.\n\n",
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
- struct unittype have, want;
|
||||
+ static struct unittype have, want;
|
||||
char *havestr=0, *wantstr=0;
|
||||
struct func *funcval;
|
||||
int havestrsize=0; /* Only used if READLINE is undefined */
|
||||
--
|
||||
1.7.1
|
||||
|
||||
|
||||
From 30ede89a0147189cd815afc58b1d82545b881bcd Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Wed, 16 Nov 2011 13:37:09 +0100
|
||||
Subject: [PATCH 2/2] units - use an annotation to suppress a false positive of Coverity
|
||||
|
||||
---
|
||||
units.c | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/units.c b/units.c
|
||||
index c4230c9..28555a4 100644
|
||||
--- a/units.c
|
||||
+++ b/units.c
|
||||
@@ -403,6 +403,7 @@ readunits(char *file, FILE *errfile,
|
||||
if (!unitfile)
|
||||
return E_FILE;
|
||||
|
||||
+ /* coverity[alloc_fn] */
|
||||
permfile = dupstr(file); /* This is a permanent copy to
|
||||
reference in the database.
|
||||
It is never freed. */
|
||||
--
|
||||
1.7.1
|
||||
|
@ -1,16 +0,0 @@
|
||||
units.man | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/units.man b/units.man
|
||||
index 6199904..e202da4 100644
|
||||
--- a/units.man
|
||||
+++ b/units.man
|
||||
@@ -446,7 +446,7 @@ The temperature differences are done using units starting with
|
||||
Think of `tempF(x)' not as a function but as a notation which
|
||||
indicates that `x' should have units of `tempF' attached to
|
||||
it. See \fINonlinear units\fR. The first conversion shows that if it's 45
|
||||
-degrees Fahrehneit outside it's 7.2 degrees Celsius. The second
|
||||
+degrees Fahrenheit outside it's 7.2 degrees Celsius. The second
|
||||
conversions indicates that a change of 45 degrees Fahrenheit corresponds
|
||||
to a change of 25 degrees Celsius.
|
||||
.PP
|
Binary file not shown.
43
units-2.00-make-install.patch
Normal file
43
units-2.00-make-install.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From adfae89daffafd4f1a07dcc2a6f4689cf07c2b54 Mon Sep 17 00:00:00 2001
|
||||
From: Kamil Dudka <kdudka@redhat.com>
|
||||
Date: Mon, 2 Jul 2012 11:16:13 +0200
|
||||
Subject: [PATCH] Makefile.in: do not ignore $(DESTDIR) when installing data
|
||||
|
||||
---
|
||||
Makefile.in | 13 +++++++------
|
||||
1 files changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 60b8966..111f4e7 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -84,10 +84,10 @@ units_cur_inst: units_cur
|
||||
sed -e "s:outfile = 'currency.units':outfile='@UDAT@currency.units':" units_cur > units_cur_inst
|
||||
|
||||
install-support: definitions.units currency.units units_cur_inst
|
||||
- $(srcdir)/mkinstalldirs @UDAT@ $(DESTDIR)$(bindir)
|
||||
- $(INSTALL_DATA) $(srcdir)/definitions.units @UDAT@definitions.units
|
||||
- $(INSTALL_DATA) $(srcdir)/currency.units @UDAT@currency.units
|
||||
- $(INSTALL_DATA) $(srcdir)/locale.map @UDAT@locale.map
|
||||
+ $(srcdir)/mkinstalldirs $(DESTDIR)@UDAT@ $(DESTDIR)$(bindir)
|
||||
+ $(INSTALL_DATA) $(srcdir)/definitions.units $(DESTDIR)@UDAT@definitions.units
|
||||
+ $(INSTALL_DATA) $(srcdir)/currency.units $(DESTDIR)@UDAT@currency.units
|
||||
+ $(INSTALL_DATA) $(srcdir)/locale.map $(DESTDIR)@UDAT@locale.map
|
||||
$(INSTALL_PROGRAM) units_cur_inst $(DESTDIR)$(bindir)/`echo units_cur|sed '$(transform)'`
|
||||
|
||||
install: units@EXEEXT@ install-doc install-support
|
||||
@@ -138,8 +138,9 @@ Makefile: Makefile.in config.status
|
||||
uninstall:
|
||||
-rm -f $(DESTDIR)$(bindir)/`echo units@EXEEXT@|sed '$(transform)'` \
|
||||
$(DESTDIR)$(mandir)/man1/`echo units|sed '$(transform)'`.1 \
|
||||
- $(DESTDIR)$(infodir)/units.info @UDAT@definitions.units \
|
||||
- @UDAT@currency.units \
|
||||
+ $(DESTDIR)$(infodir)/units.info \
|
||||
+ $(DESTDIR)@UDAT@definitions.units \
|
||||
+ $(DESTDIR)@UDAT@currency.units \
|
||||
@if test -f $(DESTDIR)$(infodir)/dir; then \
|
||||
echo You may need to remove units.info from $(DESTDIR)$(infodir)/dir; \
|
||||
else true; fi
|
||||
--
|
||||
1.7.1
|
||||
|
BIN
units-2.00.tar.gz.sig
Normal file
BIN
units-2.00.tar.gz.sig
Normal file
Binary file not shown.
16
units.spec
16
units.spec
@ -1,7 +1,7 @@
|
||||
Summary: A utility for converting amounts from one unit to another
|
||||
Name: units
|
||||
Version: 1.88
|
||||
Release: 6%{?dist}
|
||||
Version: 2.00
|
||||
Release: 1%{?dist}
|
||||
Source: ftp://ftp.gnu.org/gnu/units/%{name}-%{version}.tar.gz
|
||||
URL: http://www.gnu.org/software/units/units.html
|
||||
License: GPLv3+
|
||||
@ -12,8 +12,7 @@ Requires(preun): /sbin/install-info
|
||||
BuildRequires: bison
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: readline-devel
|
||||
Patch1: units-1.88-man-typo.patch
|
||||
Patch2: units-1.88-coverity.patch
|
||||
Patch0: units-2.00-make-install.patch
|
||||
|
||||
%description
|
||||
Units converts an amount from one unit to another, or tells you what
|
||||
@ -23,8 +22,7 @@ well as conversions such as Fahrenheit to Celsius.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
@ -54,11 +52,15 @@ fi
|
||||
%defattr(-,root,root,-)
|
||||
%doc ChangeLog COPYING NEWS README
|
||||
%{_bindir}/*
|
||||
%{_datadir}/units.dat
|
||||
%{_datadir}/units
|
||||
%{_infodir}/*
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Mon Jun 02 2012 Kamil Dudka <kdudka@redhat.com> - 2.00-1
|
||||
- new upstream release, dropped applied patches
|
||||
- patch Makefile.in to respect $(DESTDIR)
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.88-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user