Spec URL: https://fedorapeople.org/~dkopecek/usbguard/json.spec SRPM URL: https://fedorapeople.org/~dkopecek/usbguard/json-0-1.20150410git.d7d0509.fc20.src.rpm Description: JSON for Modern C++ Fedora Account System Username: mildew
TODO: Please note there has already been a `json' package in Fedora (bug #495801). The name of this package is not very inventive and it can lead to confusions. Please consider more designating name. URL and Source0 are usable. Ok. Source archive is original (SHA-256: e12befc18961eb3eb8c0fe3aaa27ea34e073af7ae331c8b99360d8ba0c291cee). Ok. TODO: Use the github syntax for computing shorttag recommended by guidelines. The recommended code does not depend on coreutils. The version and release conform to git snapshot guidelines. Ok. Summary verified from README.md. Ok. Description is good. Ok. License verified from test/unit.cpp, src/json.hpp.re2c, src/json.hpp, README.md, LICENSE.MIT. Ok. TODO: Document Boost license (test/catch.hpp) in a spec file comment. TODO: I recommend not creating non-upstream pkg-config module. Such distribution-specific extensions give to developers an opportunity to write non-portable code. TODO: The src/json.hpp is generated file. Regenerate it from src/json.hpp.re2c. TODO: Run the tests (make && ./json_unit). The header-only library is packaged properly. Ok. $ rpmlint json.spec ../SRPMS/json-0-1.20150410git.d7d0509.fc23.src.rpm ../RPMS/x86_64/json-* json.spec:24: W: mixed-use-of-spaces-and-tabs (spaces: line 24, tab: line 1) json.src: W: name-repeated-in-summary C JSON json.src: W: spelling-error %description -l en_US nlohmann -> Eichmann json.src:24: W: mixed-use-of-spaces-and-tabs (spaces: line 24, tab: line 1) json.x86_64: W: name-repeated-in-summary C JSON json.x86_64: W: spelling-error %description -l en_US nlohmann -> Eichmann json.x86_64: E: no-binary json-debuginfo.x86_64: E: empty-debuginfo-package json-devel.x86_64: W: only-non-binary-in-usr-lib 4 packages and 1 specfiles checked; 2 errors, 7 warnings. TODO: Normalize spaces in the spec file. FIX: Disable generating debuginfo package (%global debug_package %{nil}). $ rpm -q -lv -p ../RPMS/x86_64/json-0-1.20150410git.d7d0509.fc23.x86_64.rpm drwxr-xr-x 2 root root 0 Apr 14 09:38 /usr/share/doc/json -rw-r--r-- 1 root root 15911 Apr 9 19:21 /usr/share/doc/json/README.md drwxr-xr-x 2 root root 0 Apr 14 09:38 /usr/share/licenses/json -rw-r--r-- 1 root root 1148 Apr 9 19:21 /usr/share/licenses/json/LICENSE.MIT $ rpm -q -lv -p ../RPMS/x86_64/json-devel-0-1.20150410git.d7d0509.fc23.x86_64.rpm |less -rw-r--r-- 1 root root 141967 Apr 9 19:21 /usr/include/json.hpp -rw-r--r-- 1 root root 219 Apr 14 09:38 /usr/lib64/pkgconfig/json.pc drwxr-xr-x 2 root root 0 Apr 14 09:38 /usr/share/doc/json-devel drwxr-xr-x 2 root root 0 Apr 14 09:38 /usr/share/doc/json-devel/html -rw-r--r-- 1 root root 9822 Apr 14 09:38 /usr/share/doc/json-devel/html/annotated.html [...] File permissions and layout are Ok. $ rpm -q --requires -p ../RPMS/x86_64/json-0-1.20150410git.d7d0509.fc23.x86_64.rpm | sort -f | uniq -c 1 rpmlib(CompressedFileNames) <= 3.0.4-1 1 rpmlib(FileDigests) <= 4.6.0-1 1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 1 rpmlib(PayloadIsXz) <= 5.2-1 $ rpm -q --requires -p ../RPMS/x86_64/json-devel-0-1.20150410git.d7d0509.fc23.x86_64.rpm | sort -f | uniq -c 1 /usr/bin/pkg-config 1 json = 0-1.20150410git.d7d0509.fc23 1 pkgconfig 1 rpmlib(CompressedFileNames) <= 3.0.4-1 1 rpmlib(FileDigests) <= 4.6.0-1 1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 1 rpmlib(PayloadIsXz) <= 5.2-1 FIX: Run-require `libstdc++-devel' by json-devel because /usr/include/json.hpp includes its header files. $ rpm -q --provides -p ../RPMS/x86_64/json-0-1.20150410git.d7d0509.fc23.x86_64.rpm | sort -f | uniq -c 1 json = 0-1.20150410git.d7d0509.fc23 1 json(x86-64) = 0-1.20150410git.d7d0509.fc23 $ rpm -q --provides -p ../RPMS/x86_64/json-devel-0-1.20150410git.d7d0509.fc23.x86_64.rpm | sort -f | uniq -c 1 json-devel = 0-1.20150410git.d7d0509.fc23 1 json-devel(x86-64) = 0-1.20150410git.d7d0509.fc23 1 json-static = 0-1.20150410git.d7d0509.fc23 1 pkgconfig(json) = 0-1.20150410git.d7d0509.fc23 Binary provides are Ok. Package build in F23 (http://koji.fedoraproject.org/koji/taskinfo?taskID=9474845). Ok. Otherwise the package is in line with Fedora packaging guidelines. Please correct all `FIX' items, consider fixing `TODO' items, and provide updated spec file. Resolution: Package NOT approved.
(In reply to Petr Pisar from comment #1) > TODO: Please note there has already been a `json' package in Fedora (bug > #495801). The name of this package is not very inventive and it can lead to > confusions. Please consider more designating name. I have considered including the authors nickname in the package name since it's used in the source as the namespace. However, it seems better to use just json since that's the stated project name. The upstream github project can be easily transferred to a different user. Although it's a generic name, there wasn't any active "json" package in Fedora for years. The one you mentioned is long dead/retired in Fedora and it seems to be dead in upstream too (not sure, can't really tell from the URL provided in the old spec).
Updated the spec file and srpm. URLs are the same. (In reply to Petr Pisar from comment #1) > TODO: Please note there has already been a `json' package in Fedora (bug > #495801). The name of this package is not very inventive and it can lead to > confusions. Please consider more designating name. Not fixed. > TODO: Use the github syntax for computing shorttag recommended by > guidelines. The recommended code does not depend on coreutils. Fixed. > TODO: Document Boost license (test/catch.hpp) in a spec file comment. Fixed. > TODO: I recommend not creating non-upstream pkg-config module. Such > distribution-specific extensions give to developers an opportunity to write > non-portable code. Fixed. > TODO: The src/json.hpp is generated file. Regenerate it from > src/json.hpp.re2c. Not fixed. > TODO: Run the tests (make && ./json_unit). Fixed. > TODO: Normalize spaces in the spec file. Fixed. > FIX: Disable generating debuginfo package (%global debug_package %{nil}). Fixed. > FIX: Run-require `libstdc++-devel' by json-devel because Fixed.
Increased the release number. Spec URL: https://fedorapeople.org/~dkopecek/usbguard/json.spec SRPM URL: https://fedorapeople.org/~dkopecek/usbguard/json-0-2.20150410git.d7d0509.fc20.src.rpm
Spec file changes: --- json.spec.old 2015-04-10 15:38:34.000000000 +0200 +++ json.spec 2015-04-14 13:37:12.000000000 +0200 @@ -1,16 +1,19 @@ -%global gitdate 20150410 -%global gittag d7d05091617d8173923df14cf46bc74311dc176e -%global shorttag %(cut -b -7 <<< %{gittag}) -%global user nlohmann - -Name: json -Version: 0 -Release: 1.%{gitdate}git.%{shorttag}%{?dist} -Summary: JSON for Modern C++ -Group: Development/Libraries -License: MIT -URL: https://github.com/%{user}/%{name}/ -Source0: https://github.com/%{user}/%{name}/tarball/%{gittag}/%{user}-%{name}-%{shorttag}.tar.gz +%global gitdate 20150410 +%global gittag d7d05091617d8173923df14cf46bc74311dc176e +%global shorttag %(c=%{gittag}; echo ${c:0:7}) +%global user nlohmann +%global debug_package %{nil} + +Name: json +Version: 0 +Release: 2.%{gitdate}git.%{shorttag}%{?dist} +Summary: JSON for Modern C++ +Group: Development/Libraries +License: MIT +## Not installed +# src/json.hpp: Boost Software License, Version 1.0 +URL: https://github.com/%{user}/%{name}/ +Source0: https://github.com/%{user}/%{name}/tarball/%{gittag}/%{user}-%{name}-%{shorttag}.tar.gz BuildRequires: cppcheck BuildRequires: /usr/bin/make @@ -26,6 +29,7 @@ Provides: %{name}-static = %{version}-%{release} Requires: %{name} = %{version}-%{release} Requires: pkgconfig +Requires: libstdc++-devel %description devel The %{name}-devel package contains libraries and header files for @@ -39,27 +43,12 @@ %check make cppcheck +make json_unit %install mkdir -p %{buildroot}%{_includedir} install -p -m 0644 src/json.hpp %{buildroot}%{_includedir}/json.hpp -mkdir -p %{buildroot}%{_libdir}/pkgconfig -cat > %{buildroot}%{_libdir}/pkgconfig/json.pc << EOF -prefix=%{_prefix} -exec_prefix=%{_exec_prefix} -libdir=%{_libdir} -includedir=%{_includedir} - -Name: json -Description: JSON for Modern C++ -URL: https://github.com/%{user}/%{name} -Version: %{version}-%{release} -Requires: -Libs: -Cflags: -I${includedir} -EOF - %files %doc README.md %license LICENSE.MIT @@ -67,8 +56,13 @@ %files devel %doc html/ %{_includedir}/json.hpp -%{_libdir}/pkgconfig/json.pc %changelog +* Tue Apr 14 2015 Daniel Kopecek <dkopecek> - 0-2.20150410git.d7d0509 +- run json_unit target from the check section +- document catch.hpp license +- don't build the debuginfo subpackage +- don't generate a distribution specific pkg-config file + * Fri Apr 10 2015 Daniel Kopecek <dkopecek> - 0-1.20150410git.d7d0509 - Initial package > TODO: Please note there has already been a `json' package in Fedora (bug > #495801). The name of this package is not very inventive and it can lead to > confusions. Please consider more designating name. Not addressed. Ok. > TODO: Use the github syntax for computing shorttag recommended by guidelines. > The recommended code does not depend on coreutils. -%global shorttag %(cut -b -7 <<< %{gittag}) +%global shorttag %(c=%{gittag}; echo ${c:0:7}) Ok. > TODO: Document Boost license (test/catch.hpp) in a spec file comment. +## Not installed +# src/json.hpp: Boost Software License, Version 1.0 TODO: The file is test/catch.hpp, not src/json.hpp. > TODO: I recommend not creating non-upstream pkg-config module. Such > distribution-specific extensions give to developers an opportunity to write > non-portable code. -mkdir -p %{buildroot}%{_libdir}/pkgconfig -cat > %{buildroot}%{_libdir}/pkgconfig/json.pc << EOF -prefix=%{_prefix} -exec_prefix=%{_exec_prefix} -libdir=%{_libdir} -includedir=%{_includedir} - -Name: json -Description: JSON for Modern C++ -URL: https://github.com/%{user}/%{name} -Version: %{version}-%{release} -Requires: -Libs: -Cflags: -I${includedir} -EOF Ok. > TODO: The src/json.hpp is generated file. Regenerate it from src/json.hpp.re2c. Not addressed. Ok. > TODO: Run the tests (make && ./json_unit). %check make cppcheck +make json_unit TODO: This compiles the test, but does not execute it. You have to execute the resulting ./json_unit. > TODO: Normalize spaces in the spec file. Ok. > FIX: Disable generating debuginfo package (%global debug_package %{nil}). +%global debug_package %{nil} Ok. > FIX: Run-require `libstdc++-devel' by json-devel because /usr/include/json.hpp > includes its header files. +Requires: libstdc++-devel ok. FIX: The package does not build in F23 (http://koji.fedoraproject.org/koji/taskinfo?taskID=9476433): + make json_unit g++ -std=c++11 -Wall -Wextra -pedantic -Weffc++ -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-di rs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch -Wundef -Wno-unused -Wnon-virtual-dtor -Wreorder -Wdepre cated -Wfloat-equal -I src -I test -Dprivate=public test/unit.cpp -o json_unit In file included from test/catch.hpp:60:0, from test/unit.cpp:11: /usr/include/c++/5.0.0/sstream:300:7: error: 'struct std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs' redeclared with different access struct __xfer_bufptrs ^ TODO: You should unbundle the catch.hpp. It could be fixed in the upstream <https://github.com/philsquared/Catch>. Please correct all `FIX' items, consider fixing `TODO' items, and provide new spec file. Resolution: Package NOT approved.
* Package fails to build on Fedora > 21: .. + doxygen Doxyfile sh: dot: command not found error: Problems running dot: exit code=127, .. Seems to me as if a BR: /usr/bin/dot is missing * The package doesn't contain a *.pc file, so I don't see any reason why it "R: pkgconfig" Did you intend to add a *.pc and stop half-ways? * I'd suggest to not ship the base-package (It doesn't contain any actual contents), but to fold its contents into *-devel or alternatively, to fold the *devel package into the base package.
(In reply to Petr Pisar from comment #5) >> TODO: Document Boost license (test/catch.hpp) in a spec file comment. > +## Not installed > +# src/json.hpp: Boost Software License, Version 1.0 > TODO: The file is test/catch.hpp, not src/json.hpp. Fixed. > > TODO: Run the tests (make && ./json_unit). > %check > make cppcheck > +make json_unit > TODO: This compiles the test, but does not execute it. You have to execute > the resulting ./json_unit. Yeah, I just realized it too. Spec file is now updated with the "make && ./json_unit" > FIX: The package does not build in F23 > (http://koji.fedoraproject.org/koji/taskinfo?taskID=9476433): Should be ok now: http://koji.fedoraproject.org/koji/taskinfo?taskID=9476566 > TODO: You should unbundle the catch.hpp. It could be fixed in the upstream > <https://github.com/philsquared/Catch>. Not fixed.
(In reply to Ralf Corsepius from comment #6) > * The package doesn't contain a *.pc file, so I don't see any reason why it > "R: pkgconfig" > > Did you intend to add a *.pc and stop half-ways? Updated (removed).
(In reply to Ralf Corsepius from comment #6) > * I'd suggest to not ship the base-package (It doesn't contain any actual > contents), but to fold its contents into *-devel or alternatively, to fold > the *devel package into the base package. True. Didn't really know what to do with that. I guess shipping only -devel would be the right option. I'm ok with that, if it's the preferred way to do that (instead of putting everything into the base package?)
According to guidelines, there must be devel sub-package in case of header-only library <https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Packaging_Header_Only_Libraries>. I also think the rule is stupid, especially if next rule is that the package must required via static symbol, but I cannot go against the guidelines.
Spec file changes: --- json.spec.old 2015-04-14 13:37:12.000000000 +0200 +++ json.spec 2015-04-14 14:31:50.000000000 +0200 @@ -11,7 +11,7 @@ Group: Development/Libraries License: MIT ## Not installed -# src/json.hpp: Boost Software License, Version 1.0 +# test/catch.hpp: Boost Software License, Version 1.0 URL: https://github.com/%{user}/%{name}/ Source0: https://github.com/%{user}/%{name}/tarball/%{gittag}/%{user}-%{name}-%{shorttag}.tar.gz @@ -28,7 +28,6 @@ Group: Development/Libraries Provides: %{name}-static = %{version}-%{release} Requires: %{name} = %{version}-%{release} -Requires: pkgconfig Requires: libstdc++-devel %description devel @@ -43,7 +42,7 @@ %check make cppcheck -make json_unit +make && ./json_unit %install mkdir -p %{buildroot}%{_includedir} > TODO: The file is test/catch.hpp, not src/json.hpp. -# src/json.hpp: Boost Software License, Version 1.0 +# test/catch.hpp: Boost Software License, Version 1.0 Ok. > TODO: This compiles the test, but does not execute it. You have to execute > the resulting ./json_unit. -make json_unit +make && ./json_unit Ok. > FIX: The package does not build in F23 (http://koji.fedoraproject.org/koji/taskinfo?taskID=9476433) It passes, but only but only because of a bug in the rpmbuild. The `make' fails, so the ./json_unit is not executed, the return value of this command list is non-zero, but rpmbuild interprets it as a success. You can verify it with `false && false'. This should stop the rpmbuild, but it passes. I will pass this review because if you do not want to fix the Catch.hpp, you will disable the test and guidelines does not require running tests. But please note that once rpmbuild get fixed, your contemporary spec file will fail too. Package builds in F23 (http://koji.fedoraproject.org/koji/taskinfo?taskID=9476781). Ok. > TODO: You should unbundle the catch.hpp. It could be fixed in the upstream <https://github.com/philsquared/Catch>. Not addressed. Ok. $ rpmlint json.spec ../SRPMS/json-0-2.20150410git.d7d0509.fc23.src.rpm ../RPMS/x86_64/json-* json.src: W: name-repeated-in-summary C JSON json.src: W: spelling-error %description -l en_US nlohmann -> Eichmann json.x86_64: W: name-repeated-in-summary C JSON json.x86_64: W: spelling-error %description -l en_US nlohmann -> Eichmann json.x86_64: E: no-binary 3 packages and 1 specfiles checked; 1 errors, 4 warnings. rpmlint is Ok. $ rpm -q --requires -p ../RPMS/x86_64/json-0-2.20150410git.d7d0509.fc23.x86_64.rpm | sort -f | uniq -c 1 rpmlib(CompressedFileNames) <= 3.0.4-1 1 rpmlib(FileDigests) <= 4.6.0-1 1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 1 rpmlib(PayloadIsXz) <= 5.2-1 $ rpm -q --requires -p ../RPMS/x86_64/json-devel-0-2.20150410git.d7d0509.fc23.x86_64.rpm | sort -f | uniq -c 1 json = 0-2.20150410git.d7d0509.fc23 1 libstdc++-devel 1 rpmlib(CompressedFileNames) <= 3.0.4-1 1 rpmlib(FileDigests) <= 4.6.0-1 1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 1 rpmlib(PayloadIsXz) <= 5.2-1 Binary requires are Ok. $ resolvedeps rawhide ../RPMS/x86_64/json-* Binary dependencies resolvable. Ok. Resolution: Package APPROVED.
I've just reported the rpmbuild behavior as bug #1211629.
Created attachment 1014334 [details] gcc 5.x fix I have patched the Makefile and test/unit.cpp so that it compiles with GCC 5. I have also removed the -Weffc++ option. These warning messages aren't really useful for a package maintainer. scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=9477152 I have also split the make && ./json_unit to two line so that the bug you found in rpmbuild isn't triggered. make json_unit ./json_unit Updated spec and SPRM: Spec URL: https://fedorapeople.org/~dkopecek/usbguard/json.spec SRPM URL: https://fedorapeople.org/~dkopecek/usbguard/json-0-3.20150410git.d7d0509.fc20.src.rpm
Fix sent upstream: https://github.com/nlohmann/json/pull/59
New Package SCM Request ======================= Package Name: json Short Description: JSON for Modern C++ Upstream URL: https://github.com/nlohmann/json/ Owners: mildew Branches: f20 f21 f22 epel7 InitialCC:
Git done (by process-git-requests).
Hello, (In reply to Jon Ciesla from comment #16) > Git done (by process-git-requests). I have probably used the wrong SCM request here. I don't see myself as the package admin in pkgdb and neither do I see the requested branches. I have requested them using the webui, but nothing happened since yesterday... Could you please check that? https://admin.fedoraproject.org/pkgdb/package/json/ Thanks!
Package Change Request ====================== Package Name: json New Branches: f20 f21 f22 devel epel7 Owners: mildew
Odd. Should be good once the next branch creation job runs, give in 30 minutes or so.
Well, so far it only returned to the previous state where the new branch requests that I created using the webui are no longer there :]
Let's try it the old way.. . .
Ok, I'll check on why the pkgdb version didn't work. It failed for me for one of mine as well.
Thanks Jon! Something happened :] Can I touch it now or are doing something with it? I don't want to interfere. I'm not assigned to the devel branch yet, but since I'm the admin of the package now I should be able to fix this, I guess.
Git pull and you should be ok.
What about this?: ---- Users whose admin rights are awaiting review. mildew (Fedora devel) --- * You are not allowed to approve or deny ACLs for yourself. * Nothing to update --- Same for commiters on the devel branch.
Huh. Fixed.
Well, this is a problematic package... I cannot build it. Koji says: FAILED: BuildError: package json is blocked for tag f23 and it's the same for other branches.
Created a rel-eng ticket to unblock the package: https://fedorahosted.org/rel-eng/ticket/6148
Also, the description of the package in pkgdb is wrong. It should be "JSON for Modern C++".
Rel-eng ticked resolved. Packages are build in all branches.
Package Change Request ====================== Package Name: json Short Description: JSON for Modern C++
Misformatted request.