Spec URL: https://redhat.lupp.es/python-psycopg3/python-psycopg3.spec SRPM URL: https://redhat.lupp.es/python-psycopg3/python-psycopg3-3.0.11-1.fc37.src.rpm Description: Psycopg 3 is a newly designed PostgreSQL database adapter for the Python programming language. Psycopg 3 presents a familiar interface for everyone who has used Psycopg 2 or any other DB-API 2.0 database adapter, but allows to use more modern PostgreSQL and Python features. Fedora Account System Username: osloup
Could you please add a comment describing why you need the libpq.sgml file? I see that you are building manual pages but the result is not installed to the correct location and therefore it's not available for the man command. Also, one big issue is that there is no definition of python3- subpackage. The name of the component and the specfile should be python-psycopg3 but it should produce python3-psycopg3.
Also, the version in the changelog should contain the release number. The documentation should be built in %build, not in %check. It'd be better to exclude specific tests instead of removing the whole files but it depends on how many tests are failing there and why. Also, why it's necessary to remove the import of the main package from the configuration of the documentation? The build of the documentation does not require gcc, it only requires make. The tests are mostly skipped: 239 passed, 3023 skipped not sure there is something we can do about it.
> Could you please add a comment describing why you need the libpq.sgml file? `libpq.sgml is needed as part of the documentation. If not present, documentation build will try to download and fail ` comment added. > I see that you are building manual pages but the result is not installed to the correct location and therefore it's not available for the man command. I added configuration for the man pages and it is now available with man command. > Also, one big issue is that there is no definition of python3- subpackage. The name of the component and the specfile should be python-psycopg3, but it should produce python3-psycopg3. I created a package as requested. > Also, the version in the changelog should contain the release number. Added `-1` to the version. > The documentation should be built in %build, not in %check. Moved to %build and %install. I separated the process to make it clearer. > It'd be better to exclude specific tests instead of removing the whole files but it depends on how many tests are failing there and why. The tests in the directory are testing the `psycopg_pool` object, which is not available. Once this package is released, it will be added as a dependency for those tests, and then they can be run. That is why I remove all the tests until the `psycopg_pool` object is added to Fedora to prevent breaking changes by adding more tests in that directory. > Also, why it's necessary to remove the import of the main package from the configuration of the documentation? The `psycopg` package is not available during the build, and therefore it cannot be imported when building the documentation. I removed it so the documentation can be created. > The build of the documentation does not require gcc, it only requires make. I changed `gcc` to `make`. > The tests are mostly skipped: 239 passed, 3023 skipped not sure there is something we can do about it. without lines 112 - 114: =========== 92 failed, 239 passed, 3143 skipped in 267.25s (0:04:27) =========== without lines 112 - 114 and with DNS package installed: ===== 92 failed, 239 passed, 3104 skipped, 39 errors in 273.38s (0:04:33) ====== with pytest-cov: ====================== 239 passed, 3023 skipped in 3.29s ======================= Current solution: ====================== 239 passed, 3023 skipped in 3.15s ====================== Since the only other thing I'm excluding is pproxy, I think that most of the tests use this package, and those tests are not run by skipping it. However, as pproxy is not in Fedora, I don't think a better solution is available.
Shorter version of `mkdir _build _build/doctrees` is `mkdir -p _build/doctrees`. Also, you can have only one line with this: cp %{SOURCE1} _build/doctrees/libpq-%{libpq_ver}.sgml instead of this: cp %{SOURCE1} libpq.sgml mv libpq.sgml _build/doctrees/libpq-%{libpq_ver}.sgml You do not need the config file for pytest-asyncio, you can just use `--asyncio-mode=auto` CLI argument for the %pytest command. There is nothing in %doc in the %files section. Also, I'd honestly skip building documentation. You can simply set PYTHONPATH for sphinx-build instead of removing the imports from the config files but it does not fully solve the problem because psycopg._dns needs dnspython and even if dnspython is installed, the sphinx build fails because there is no DNS configuration available. We can discuss it together tomorrow.
> Shorter version of `mkdir _build _build/doctrees` is `mkdir -p _build/doctrees`. Fixed. > Also, you can have only one line with this: ... Fixed. > You do not need the config file for pytest-asyncio, you can just use `--asyncio-mode=auto` CLI argument for the %pytest command. I could swear that I tried it, but it did not work, and I had to look for other solutions. Thank you. It looks cleaner. > There is nothing in %doc in the %files section. I put there the `psycopg.3.gz` manpage file. It was on another line. Fixed. The documentation will be discussed in the meeting.
As was discussed in the meeting, the documentation is not in the state that it can be packaged with the "working part of code". Therefore we decided just to include the README.rts from the root directory. There are several reasons why this is an issue, which the biggest impact has the 'dnspython' which is needed for building the documentation, but fails as it expects defined DNS configuration (side effect of the 'dnspython' package) which is non-existant in the building environment. I tested the functionality of the package with a new test that I adapted from the psycopg documentation (test.py). I added the test.py on the server and can be downloaded here: https://redhat.lupp.es/python-psycopg3/test.py
There is still the problem with packages' names - the resulting RPM should be python3-psycopg3-3.0.11-1.fc37.noarch.rpm not python-psycopg3-3.0.11-1.fc37.noarch.rpm. You have to fix the %files section where you have the wrong name. Also, I have found one problem with dependencies. You have `pkgconfig(libpq)` as build and runtime requirement. `pkgconfig(libpq)` is provided by libpq-devel package which contains header files useful for building compiled Python extensions but you don't build anything like that. Also, switching from `pkgconfig(libpq)` to just `libpq` lowers the number of dependencies because libpq-devel depends for example on openssl1.1-devel. I've tested that and the package builds and works fine with just libpq.
These errors should be resolved. I changed the Requires and BuildRequires to use `libpq` instead of `pkgconfig(libpq)`, and I added '3' to `%files -n python3-%{src_name}`.
I've found two more important problems. The resulting RPM has broken summary: # rpm -qi review-python-psycopg3/results/python3-psycopg3-3.0.11-1.fc37.noarch.rpm Name : python3-psycopg3 Version : 3.0.11 Release : 1.fc37 Architecture: noarch Install Date: (not installed) Group : Unspecified Size : 1153603 License : LGPLv3 Signature : (none) Source RPM : python-psycopg3-3.0.11-1.fc37.src.rpm Build Date : Thu May 5 12:14:03 2022 Build Host : localhost.localdomain URL : https://www.psycopg.org/psycopg3/ Summary : %{Summary} Description : Psycopg 3 is a PostgreSQL database adapter for the Python programming language. Psycopg 3 presents a familiar interface for everyone who has used Psycopg 2 or any other DB-API 2.0 database adapter, but allows to use more modern PostgreSQL and Python features. The resulting package does not depend on libpq. This is probably caused by the misplaced "Require:" which should be in the definition of the subpackage, not the main one. # rpm -q --requires review-python-psycopg3/results/python3-psycopg3-3.0.11-1.fc37.noarch.rpm python(abi) = 3.10 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsZstd) <= 5.4.18-1 The rest looks good to me. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed ===== MUST items ===== Generic: [x]: Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [x]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "Unknown or generated", "GNU Lesser General Public License, Version 3", "*No copyright* GNU Lesser General Public License, Version 3", "Public domain". 238 files have unknown license. Detailed output of licensecheck in /home/lbalhar/temp/reviews/review-python- psycopg3/licensecheck.txt [x]: Package contains no bundled libraries without FPC exception. [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [!]: Macros in Summary, %description expandable at SRPM build time. Note: Macros in: python3-psycopg3 (summary) [-]: Package contains desktop file if it is a GUI application. [-]: Development files must be in a -devel package [x]: Package uses nothing in %doc for runtime. [x]: Package consistently uses macros (instead of hard-coded directory names). [x]: Package is named according to the Package Naming Guidelines. [x]: Package does not generate any conflict. [x]: Package obeys FHS, except libexecdir and /usr/target. [-]: If the package is a rename of another package, proper Obsoletes and Provides are present. [!]: Requires correct, justified where necessary. [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [x]: Package is not known to require an ExcludeArch tag. [-]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 10240 bytes in 1 files. [x]: Package complies to the Packaging Guidelines [x]: Package successfully compiles and builds into binary rpms on at least one supported primary architecture. [x]: Package installs properly. [x]: Rpmlint is run on all rpms the build produces. Note: There are rpmlint messages (see attachment). [x]: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package is included in %license. [x]: Package requires other packages for directories it uses. [x]: Package must own all directories that it creates. [x]: Package does not own files or directories owned by other packages. [x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT [x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. [x]: Dist tag is present. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package must not depend on deprecated() packages. [x]: Package use %makeinstall only when make install DESTDIR=... doesn't work. [x]: Package is named using only allowed ASCII characters. [x]: Package does not use a name that already exists. [x]: Package is not relocatable. [x]: Sources used to build the package match the upstream source, as provided in the spec URL. [x]: Spec file name must match the spec package %{name}, in the format %{name}.spec. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local Python: [x]: Python eggs must not download any dependencies during the build process. [-]: A package which is used by another package via an egg interface should provide egg info. [x]: Package meets the Packaging Guidelines::Python [x]: Package contains BR: python2-devel or python3-devel [x]: Packages MUST NOT have dependencies (either build-time or runtime) on packages named with the unversioned python- prefix unless no properly versioned package exists. Dependencies on Python packages instead MUST use names beginning with python2- or python3- as appropriate. [x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files [x]: Binary eggs must be removed in %prep ===== SHOULD items ===== Generic: [-]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. [!]: Final provides and requires are sane (see attachments). [x]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. Note: gpgverify is not used. [-]: Package should compile and build into binary rpms on all supported architectures. [x]: %check is present and all tests pass. [x]: Packages should try to preserve timestamps of original installed files. [x]: Reviewer should test that the package builds in mock. [x]: Buildroot is not present [x]: Package has no %clean section with rm -rf %{buildroot} (or $RPM_BUILD_ROOT) [x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. [x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file [x]: Sources can be downloaded from URI in Source: tag [x]: SourceX is a working URL. [x]: Spec use %global instead of %define unless justified. ===== EXTRA items ===== Generic: [x]: Rpmlint is run on all installed packages. Note: There are rpmlint messages (see attachment). [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: python3-psycopg3-3.0.11-1.fc37.noarch.rpm python-psycopg3-3.0.11-1.fc37.src.rpm Source checksums ---------------- https://github.com/psycopg/psycopg/archive/refs/tags/3.0.11.tar.gz : CHECKSUM(SHA256) this package : dfb45ddde1b0a3139d3afb28d75fda6f47b63f74bd076143c573921887a581c6 CHECKSUM(SHA256) upstream package : dfb45ddde1b0a3139d3afb28d75fda6f47b63f74bd076143c573921887a581c6 Requires -------- python3-psycopg3 (rpmlib, GLIBC filtered): python(abi) Provides -------- python3-psycopg3: python-psycopg3 python3-psycopg3 python3.10-psycopg3 python3.10dist(psycopg) python3dist(psycopg) Generated by fedora-review 0.8.0 (e988316) last change: 2022-04-07 Command line :/usr/bin/fedora-review -n python-psycopg3 Buildroot used: fedora-rawhide-x86_64 Active plugins: Shell-api, Generic, Python Disabled plugins: Haskell, fonts, SugarActivity, R, Perl, PHP, C/C++, Java, Ocaml Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
$ rpm -qi python3-psycopg3-3.0.11-1.fc37.noarch.rpm ``` Name : python3-psycopg3 Version : 3.0.11 Release : 1.fc37 Architecture: noarch Install Date: (not installed) Group : Unspecified Size : 1153603 License : LGPLv3 Signature : (none) Source RPM : python-psycopg3-3.0.11-1.fc37.src.rpm Build Date : Čt 5. května 2022, 23:47:58 Build Host : redtardis URL : https://www.psycopg.org/psycopg3/ Summary : Psycopg 3 is a modern implementation of a PostgreSQL adapter for Python Description : Psycopg 3 is a PostgreSQL database adapter for the Python programming language. Psycopg 3 presents a familiar interface for everyone who has used Psycopg 2 or any other DB-API 2.0 database adapter, but allows to use more modern PostgreSQL and Python features. ``` $ rpm -q --requires python3-psycopg3-3.0.11-1.fc37.noarch.rpm ``` libpq python(abi) = 3.10 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsZstd) <= 5.4.18-1 ``` The summary and dependency issues were fixed. Thank thank you for providing commands to check it.
Thanks for all your hard work! Package is APPROVED The next steps are described in guidelines but there are also some optional steps I consider good to do. After that: - Add the package to Koschei - https://koschei.fedoraproject.org - Add the package to the release monitoring - https://release-monitoring.org/ - Feel free to add me or Python SIG as co-maintainers of the package. We can help you with the maintenance. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed ===== MUST items ===== Generic: [x]: Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [x]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "Unknown or generated", "GNU Lesser General Public License, Version 3", "*No copyright* GNU Lesser General Public License, Version 3", "Public domain". 238 files have unknown license. Detailed output of licensecheck in /home/lbalhar/temp/reviews/review-python- psycopg3/licensecheck.txt [x]: Package contains no bundled libraries without FPC exception. [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [-]: Package contains desktop file if it is a GUI application. [-]: Development files must be in a -devel package [x]: Package uses nothing in %doc for runtime. [x]: Package consistently uses macros (instead of hard-coded directory names). [x]: Package is named according to the Package Naming Guidelines. [x]: Package does not generate any conflict. [x]: Package obeys FHS, except libexecdir and /usr/target. [-]: If the package is a rename of another package, proper Obsoletes and Provides are present. [x]: Requires correct, justified where necessary. [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [x]: Package is not known to require an ExcludeArch tag. [x]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 10240 bytes in 1 files. [x]: Package complies to the Packaging Guidelines [x]: Package successfully compiles and builds into binary rpms on at least one supported primary architecture. [x]: Package installs properly. [x]: Rpmlint is run on all rpms the build produces. Note: There are rpmlint messages (see attachment). [x]: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package is included in %license. [x]: Package requires other packages for directories it uses. [x]: Package must own all directories that it creates. [x]: Package does not own files or directories owned by other packages. [x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT [x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. [x]: Macros in Summary, %description expandable at SRPM build time. [x]: Dist tag is present. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package must not depend on deprecated() packages. [x]: Package use %makeinstall only when make install DESTDIR=... doesn't work. [x]: Package is named using only allowed ASCII characters. [x]: Package does not use a name that already exists. [x]: Package is not relocatable. [x]: Sources used to build the package match the upstream source, as provided in the spec URL. [x]: Spec file name must match the spec package %{name}, in the format %{name}.spec. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local Python: [x]: Python eggs must not download any dependencies during the build process. [-]: A package which is used by another package via an egg interface should provide egg info. [x]: Package meets the Packaging Guidelines::Python [x]: Package contains BR: python2-devel or python3-devel [x]: Packages MUST NOT have dependencies (either build-time or runtime) on packages named with the unversioned python- prefix unless no properly versioned package exists. Dependencies on Python packages instead MUST use names beginning with python2- or python3- as appropriate. [x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files [x]: Binary eggs must be removed in %prep ===== SHOULD items ===== Generic: [x]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. [x]: Final provides and requires are sane (see attachments). [x]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. Note: gpgverify is not used. [x]: Package should compile and build into binary rpms on all supported architectures. [x]: %check is present and all tests pass. [x]: Packages should try to preserve timestamps of original installed files. [x]: Reviewer should test that the package builds in mock. [x]: Buildroot is not present [x]: Package has no %clean section with rm -rf %{buildroot} (or $RPM_BUILD_ROOT) [x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. [x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file [x]: Sources can be downloaded from URI in Source: tag [x]: SourceX is a working URL. [x]: Spec use %global instead of %define unless justified. ===== EXTRA items ===== Generic: [x]: Rpmlint is run on all installed packages. [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: python3-psycopg3-3.0.11-1.fc37.noarch.rpm python-psycopg3-3.0.11-1.fc37.src.rpm Source checksums ---------------- https://github.com/psycopg/psycopg/archive/refs/tags/3.0.11.tar.gz : CHECKSUM(SHA256) this package : dfb45ddde1b0a3139d3afb28d75fda6f47b63f74bd076143c573921887a581c6 CHECKSUM(SHA256) upstream package : dfb45ddde1b0a3139d3afb28d75fda6f47b63f74bd076143c573921887a581c6 Requires -------- python3-psycopg3 (rpmlib, GLIBC filtered): libpq python(abi) Provides -------- python3-psycopg3: python-psycopg3 python3-psycopg3 python3.10-psycopg3 python3.10dist(psycopg) python3dist(psycopg) Generated by fedora-review 0.8.0 (e988316) last change: 2022-04-07 Command line :/usr/bin/fedora-review -n python-psycopg3 Buildroot used: fedora-rawhide-x86_64 Active plugins: Python, Generic, Shell-api Disabled plugins: Ocaml, fonts, SugarActivity, Perl, Java, C/C++, R, Haskell, PHP Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
I have sponsored Ondrej to the packager group.
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/python-psycopg3
Hi Ondrej, If everything is in order, you may close this bug.
FEDORA-2022-f9642e5e3f has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-f9642e5e3f
FEDORA-2022-35dfe6bda5 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-35dfe6bda5
FEDORA-2022-f9642e5e3f has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2022-f9642e5e3f \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-f9642e5e3f See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-35dfe6bda5 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2022-35dfe6bda5 \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-35dfe6bda5 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-35dfe6bda5 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-f9642e5e3f has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.