[Bug 1289634] Review Request: libchardet - Mozilla's universal character set detector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1289634



--- Comment #6 from Petr Pisar <ppisar@xxxxxxxxxx> ---
Spec file changes:

--- libchardet.spec.old 2015-12-09 10:32:02.000000000 +0100
+++ libchardet.spec     2015-12-10 20:09:31.000000000 +0100
@@ -1,14 +1,14 @@
-%global         path_man_en %{_builddir}/%{name}-%{version}/man/en
-
 Name:           libchardet
 Version:        1.0.4
-Release:        1%{?dist}
-Summary:        Mozilla Universal Chardet library
+Release:        2%{?dist}
+Summary:        Mozilla's universal character set detector
 Group:          System Environment/Libraries
-License:        MPLv1.1 or GPLv2+ and MIT
-URL:            http://oops.org
-Source0:       
http://mirror.oops.org/pub/oops/%{name}/%{name}-%{version}.tar.bz2
-Patch0:         libchardet-man.patch
+License:        MPLv1.1 or LGPLv2+ or GPLv2+
+URL:            http://ftp.oops.org/pub/oops/libchardet/
+# wget http://ftp.oops.org/pub/oops/libchardet/libchardet-1.0.4.tar.bz2
+Source0:        %{name}-%{version}.tar.bz2
+Patch0:         %{name}-%{version}-man.patch
+Patch1:         %{name}-%{version}-pc.in.patch
 BuildRequires:  libstdc++-devel

 %description
@@ -27,12 +27,15 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1

 # Fix rpmlint file-not-utf8
+pushd man/en
 for i in detect_init.3 detect_obj_free.3 detect_obj_init.3 detect_reset.3 ; do
-  iconv --from=ISO-8859-1 --to=UTF-8 %{path_man_en}/$i >
%{path_man_en}/$i.conv
-  mv %{path_man_en}/$i.conv %{path_man_en}/$i
+  iconv --from=ISO-8859-1 --to=UTF-8 $i > $i.conv
+  mv $i.conv $i
 done
+popd

 %build
 %configure --disable-static --enable-shared
@@ -47,13 +50,16 @@
 # remove all '*.la' files
 find %{buildroot} -name '*.la' -exec rm -f {} ';'

+# remove LICENSE file from %%_docdir
+rm -rf %{buildroot}%{_datadir}/doc/%{name}/LICENSE
+
 %post -p /sbin/ldconfig

 %postun -p /sbin/ldconfig

 %files -f %{name}.lang
-%doc Changelog
-%license %{_datadir}/doc/%{name}/LICENSE
+%doc Changelog README
+%license LICENSE
 %{_libdir}/%{name}.so.*

 %files devel
@@ -64,6 +70,17 @@
 %{_mandir}/man3/*

 %changelog
+* Thu Dec 10 2015 Martin Gansser <martinkg@xxxxxxxxxxxxxxxxx> - 1.0.4-2
+- fixed url address
+- fixed license tag
+- removed %%path_man_en macro, used %%pushd %%popd instead
+- added README to using %%doc macro.
+- corrected libchardet-1.0.4-man.patch
+- renamed libchardet-man.patch to libchardet-1.0.4-man.patch
+- renamed summary descripton
+- removed LICENSE file from %%_docdir
+- added patch to remove hardcodes CFLAGS from chardet.pc.in
+
 * Tue Dec 08 2015 Martin Gansser <martinkg@xxxxxxxxxxxxxxxxx> - 1.0.4-1
 - initial build


> FIX: The URL is not about libchardet. Please provide better one. Maybe a link to
> directory with the releases would be enough. If there is no better one, add the
> trailing slash. Each URL must have a path.
> FIX: The Source0 does not work for me. I'm getting TCP connection refused from
> 14.0.82.80:80. If it does not work, add a comment about it, or better change the
> URL to some another location where you obtained the file from.
-URL:            http://oops.org
-Source0:       
http://mirror.oops.org/pub/oops/%{name}/%{name}-%{version}.tar.bz2
+URL:            http://ftp.oops.org/pub/oops/libchardet/
+# wget http://ftp.oops.org/pub/oops/libchardet/libchardet-1.0.4.tar.bz2
+Source0:        %{name}-%{version}.tar.bz2
Ok.

> TODO: The libchardet-man.patch is insufficient. The dot is still not rendered.
The new patch is good. Ok.

> TODO: Rename the libchardet-man.patch to libchardet-1.0.4-man.patch, so it's
> visible against what version the patch was developed.
-Patch0:         libchardet-man.patch
+Patch0:         %{name}-%{version}-man.patch
TODO: I recommend not to use the %version macro here. It will cause you
troubles when upgrading the package to new version. If the
libchardet-1.4.0-man.patch worked with a new libchardet version there would no
reason for renaming the patch file.

> FIX: The summary does not explain what is it about. For example the first line from
> README is better. I recommend you this wording: "Mozilla's universal character set
> detector".
-Summary:        Mozilla Universal Chardet library
+Summary:        Mozilla's universal character set detector
Ok.

> FIX: I think correct license tag is "MPLv1.1 or LGPLv2+ or GPLv2+".
-License:        MPLv1.1 or GPLv2+ and MIT
+License:        MPLv1.1 or LGPLv2+ or GPLv2+
Ok.

> TODO: Instead of declaring %path_man_en macro, I recommend to "pushd man/en" before
> documentation recoding loop and "popd" after that.
+pushd man/en
 for i in detect_init.3 detect_obj_free.3 detect_obj_init.3 detect_reset.3 ; do
-  iconv --from=ISO-8859-1 --to=UTF-8 %{path_man_en}/$i >
%{path_man_en}/$i.conv
-  mv %{path_man_en}/$i.conv %{path_man_en}/$i
+  iconv --from=ISO-8859-1 --to=UTF-8 $i > $i.conv
+  mv $i.conv $i
 done
+popd
Ok.

> TODO: Package README using %doc macro.
> FIX: Do not package LICENSE file twice.
-%doc Changelog
-%license %{_datadir}/doc/%{name}/LICENSE
+%doc Changelog README
+%license LICENSE
Ok.

> FIX: Build-require `glibc-common' (libchardet.spec:33).
> FIX: Build-require `coreutils' (libchardet.spec:34).
> FIX: Build-require `make' (libchardet.spec:40).
> FIX: Build-require `findutils' (libchardet.spec:48).
> FIX: Build-require `gcc' for including various standard library headers and having
> toolchain for compilation.
> FIX: Build-require `gcc-c++' for having compiler for the C++ code.
> FIX: Build-require `sed' (configure.ac:24).
> FIX: Build-require `perl' (configure.ac:46).
FIX: Really add the build-requires. It's necessary to specify all directly used
dependencies.

$ rpmlint libchardet.spec ../SRPMS/libchardet-1.0.4-2.fc24.src.rpm
../RPMS/x86_64/libchardet-*
libchardet.spec: W: invalid-url Source0: libchardet-1.0.4.tar.bz2
libchardet.src: W: invalid-url URL: http://ftp.oops.org/pub/oops/libchardet/
<urlopen error [Errno 111] Connection refused>
libchardet.src: W: invalid-url Source0: libchardet-1.0.4.tar.bz2
libchardet.x86_64: W: invalid-url URL: http://ftp.oops.org/pub/oops/libchardet/
<urlopen error [Errno 111] Connection refused>
libchardet-debuginfo.x86_64: W: invalid-url URL:
http://ftp.oops.org/pub/oops/libchardet/ <urlopen error [Errno 111] Connection
refused>
libchardet-devel.x86_64: W: invalid-url URL:
http://ftp.oops.org/pub/oops/libchardet/ <urlopen error [Errno 111] Connection
refused>
libchardet-devel.x86_64: W: only-non-binary-in-usr-lib
libchardet-devel.x86_64: W: no-manual-page-for-binary chardet-config
4 packages and 1 specfiles checked; 0 errors, 8 warnings.
rpmlint is Ok.

$ rpm -q -lv -p ../RPMS/x86_64/libchardet-1.0.4-2.fc24.x86_64.rpm 
lrwxrwxrwx    1 root    root                       19 Dec 11 08:51
/usr/lib64/libchardet.so.1 -> libchardet.so.1.0.0
-rwxr-xr-x    1 root    root                   125440 Dec 11 08:51
/usr/lib64/libchardet.so.1.0.0
drwxr-xr-x    2 root    root                        0 Dec 11 08:51
/usr/share/doc/libchardet
-rw-r--r--    1 root    root                      884 Feb 14  2014
/usr/share/doc/libchardet/Changelog
-rw-r--r--    1 root    root                      831 Feb 10  2014
/usr/share/doc/libchardet/README
drwxr-xr-x    2 root    root                        0 Dec 11 08:51
/usr/share/licenses/libchardet
-rw-r--r--    1 root    root                    25755 Feb 10  2014
/usr/share/licenses/libchardet/LICENSE
-rw-r--r--    1 root    root                     1118 Dec 11 08:51
/usr/share/man/ko/man3/detect.3.gz
-rw-r--r--    1 root    root                      819 Dec 11 08:51
/usr/share/man/ko/man3/detect_destroy.3.gz
-rw-r--r--    1 root    root                     1326 Dec 11 08:51
/usr/share/man/ko/man3/detect_handledata.3.gz
-rw-r--r--    1 root    root                     1021 Dec 11 08:51
/usr/share/man/ko/man3/detect_init.3.gz
-rw-r--r--    1 root    root                      931 Dec 11 08:51
/usr/share/man/ko/man3/detect_obj_free.3.gz
-rw-r--r--    1 root    root                     1017 Dec 11 08:51
/usr/share/man/ko/man3/detect_obj_init.3.gz
-rw-r--r--    1 root    root                     1072 Dec 11 08:51
/usr/share/man/ko/man3/detect_reset.3.gz
FIX: Move the Korean manual pages to devel sub-package. They are from section
3, thus belongs to developmental package.

> FIX: The pkg-config module hardcodes CFLAGS used when building the package:
Ok.

Package builds in F24
(http://koji.fedoraproject.org/koji/taskinfo?taskID=12148166). Ok.

Please correct all the `FIX' items, consider fixing `TODO' items, and provide a
new spec file.
Resolution: Package NOT approved.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review




[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]