Bug 837988 - Review Request: python-alembic - A database migration tool for SQLAlchemy
Review Request: python-alembic - A database migration tool for SQLAlchemy
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Toshio Ernie Kuratomi
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 956412
  Show dependency treegraph
 
Reported: 2012-07-05 23:12 EDT by Ralph Bean
Modified: 2013-04-25 11:37 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-01 14:12:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
a.badger: fedora‑review+
limburgher: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Ralph Bean 2012-07-05 23:12:25 EDT
Spec URL: http://threebean.org/rpm/python-alembic.spec
SRPM URL: http://threebean.org/rpm/python-alembic-0.3.4-1.fc17.src.rpm
Description:
Alembic is a new database migrations tool, written by the author of
`SQLAlchemy <http://www.sqlalchemy.org>`_.  A migrations tool offers the
following functionality:

* Can emit ALTER statements to a database in order to change the structure
of tables and other constructs.
* Provides a system whereby "migration scripts" may be constructed; each script
indicates a particular series of steps that can "upgrade" a target database to
a new version, and optionally a series of steps that can "downgrade"
similarly, doing the same steps in reverse.
* Allows the scripts to execute in some sequential manner.

Documentation and status of Alembic is at http://readthedocs.org/docs/alembic/

Fedora Account System Username: ralph



rpmlint output
--------------
(pypi2spec)--- ~/rpmbuild » rpmlint {SRPMS,SPECS}/python-alembic*                                                      
python-alembic.src: W: spelling-error %description -l en_US http -> HTTP
python-alembic.src: W: spelling-error %description -l en_US www -> WWW, wow
python-alembic.src: W: spelling-error %description -l en_US sqlalchemy -> alchemy
1 packages and 1 specfiles checked; 0 errors, 3 warnings.
(pypi2spec)--- ~/rpmbuild » rpmlint /var/lib/mock/fedora-17-x86_64/result/*.rpm
python3-alembic.noarch: W: spelling-error %description -l en_US http -> HTTP
python3-alembic.noarch: W: spelling-error %description -l en_US www -> WWW, wow
python3-alembic.noarch: W: spelling-error %description -l en_US sqlalchemy -> alchemy
python3-alembic.noarch: W: no-manual-page-for-binary python3-alembic
python-alembic.noarch: W: spelling-error %description -l en_US http -> HTTP
python-alembic.noarch: W: spelling-error %description -l en_US www -> WWW, wow
python-alembic.noarch: W: spelling-error %description -l en_US sqlalchemy -> alchemy
python-alembic.noarch: W: no-manual-page-for-binary alembic
python-alembic.src: W: spelling-error %description -l en_US http -> HTTP
python-alembic.src: W: spelling-error %description -l en_US www -> WWW, wow
python-alembic.src: W: spelling-error %description -l en_US sqlalchemy -> alchemy
3 packages and 0 specfiles checked; 0 errors, 11 warnings.


koji f17 - http://koji.fedoraproject.org/koji/taskinfo?taskID=4222129
koji el6 - http://koji.fedoraproject.org/koji/taskinfo?taskID=4222131
Comment 1 Ralph Bean 2012-07-05 23:41:09 EDT
Spec URL: http://threebean.org/rpm/python-alembic.spec
SRPM URL: http://threebean.org/rpm/python-alembic-0.3.4-2.fc17.src.rpm

New revision makes progress on the broken el6 scratch build by requiring python-argparse, the forward-compat sqlalchemy package, and the forward-compat python-nose package on epel6.  f17 still works fine, but two tests are now failing on el6.

koji f17 - http://koji.fedoraproject.org/koji/taskinfo?taskID=4222145
koji el6 - http://koji.fedoraproject.org/koji/taskinfo?taskID=4222143
Comment 2 Ralph Bean 2012-07-06 10:32:28 EDT
It looks like we won't get things working on el6 until https://bugzilla.redhat.com/show_bug.cgi?id=838099 is resolved.  We can still proceed with the review process for Fedora without it, though.
Comment 3 Michael Scherer 2012-07-22 14:04:50 EDT
Hi,

According to python policy :
https://fedoraproject.org/wiki/Packaging:Python#Subpackages

the python3 module should be added only if upstream suggest it, and i didn't found where this is suggested on http://alembic.readthedocs.org/en/latest/.
Could you clarify this ?
Comment 4 Ralph Bean 2012-07-23 09:23:16 EDT
Ah, you can tell because http://pypi.python.org/pypi/alembic lists "Programming Language :: Python :: 3" as a category.
Comment 5 Toshio Ernie Kuratomi 2012-08-30 15:52:11 EDT
1f44d48d329e9a1b1d6ab72303797edf653fc1145260ff12d6463308190fce6a  alembic-0.3.4.tar.gz

Good:
* Package naming follows the naming guidelines
* License is MIT and matches in source and spec
* License included as %doc
* Spec file is readable
* Source matches upstream
* No locale files
* No shared libraries
* No bundled libs
* Not relocatable
* No files listed more than once
* Macros used consistently
* Code, not content
* No large doc files
* Doc files do not affect application at runtime
* Not a GUI application
* Builds in koji
* Owns all directories it creates and nothing more
* All filenames are utf-8
* Tested that alembic init works on F16.
* No file dependencies
* man pages see below

Needswork:

* The docs directory should be included in the packages.
* Would like confirmation from upstream that python3 is something they support.
  Have asked Ralph on IRC and we're awaiting an answer.

rpmlint:
python3-alembic.noarch: W: no-manual-page-for-binary python3-alembic
python-alembic.noarch: W: no-manual-page-for-binary alembic

These are warnings because it's only a should.  The idea is if there's man
pages available somewhere we should ship them. But we're not requiring
packagers to write one from scratch.  Looks like debian has manpages generated
by help2man.  We can either utilize theirs or run help2man ourselves.

http://anonscm.debian.org/viewvc/python-modules/packages/alembic/tags/0.3.4%2Bds-3/debian/alembic.1?revision=22440&view=markup&pathrev=22440

or:
BuildRequires: help2man

%build
[...]
mkdir bin

echo 'python -c "import alembic.config; alembic.config.main()" $*' > bin/alembic
chmod 0755 bin/*alembic
help2man --version-string %{version} --no-info -s 1 bin/alembic > alembic.1

# And similar in the python3 portion:
echo 'python3 -c "import alembic.config; alembic.config.main()" $*' > bin/python3-alembic
chmod 0755 bin/*alembic
help2man  --version-string %{version} --no-info -s 1 bin/python3-alembic > python3-alembic.1

%install
install -d -m 0755 %{buildroot}%{_mandir}/man1
install -m 0644 alembic.1 %{buildroot}%{_mandir}/man1/alembic.1
[...]
# python3 portion
install -m 0644 python3-alembic.1 %{buildroot}%{_mandir}/man1/python3-alembic.1

I prefer running help2man ourselves so that the listed version will match.


python-alembic.noarch: W: spelling-error %description -l en_US http -> HTTP
python-alembic.noarch: W: spelling-error %description -l en_US www -> WWW, wow

You can change the case of these two if you like

python-alembic.noarch: W: spelling-error %description -l en_US sqlalchemy -> alchemy

This one is a false positive.

Cosmetic:
* In %files add a trailing slash to directories.  Makes it apparent to future
  maintainers/random people downloading the srpm that it's intentional
* This is really trivial:  Summary doesn't need to begin with an article or end
  with punctuation.  So it could be: "Database migration tool for SQLAlchemy"

Notes:
* Upstream has updated to 0.3.6
* I've offered to update python-sqlalchemy0.7 in EPEL6 -- waiting for an EPEL6
  maintainer response
Comment 6 Ralph Bean 2012-08-31 10:59:59 EDT
I've cut a new release.  I tried updating to 0.3.6, but some of the tests were failing so I kept it at 0.3.4.

- Include docs folder in %%doc section.
- Use help2man to build man pages for executables.
- Remove article from summary (cosmetic).
- Add trailing slash to directories in %%files (cosmetic).

Spec URL: http://threebean.org/rpm/python-alembic.spec
SRPM URL: http://threebean.org/rpm/python-alembic-0.3.4-3.fc17.src.rpm

I've run into an odd issue.. not sure what's going on here:

Even though the man pages appear to be generated correctly and they appear to be installed into man1 correctly, mock reports file-not-found for the man pages when they're declared in the %files section.  It's probably something obvious I'm just not seeing.

The logs for this f17 koji build show the error:

  http://koji.fedoraproject.org/koji/taskinfo?taskID=4441660
Comment 7 Toshio Ernie Kuratomi 2012-08-31 12:03:18 EDT
APPROVED

If you use a wildcard it should work.  For instance:

%{_mandir}/man1/alembic.1*

The reason is that rpm has a script that gets run automatically to compress man pages.  The compressed pages get a suffix (alembic.1.gz right now but man also handles xz and bz2 so perhaps that will change in the future) so without the wildcard it fails to match.

For other interested people, Ralph talked to Mike Bayer (upstream for alembic) and he says python3 is supported.  Right now he's testing by hand when he makes a release.  They're getting a jenkins buildbot setup that will test on python3 automatically in the future.

Since everything else is fixed and man pages are an easy fix you can make when you import the package, this is approved.
Comment 8 Ralph Bean 2012-08-31 12:17:43 EDT
New Package SCM Request
=======================
Package Name: python-alembic
Short Description: A database migration tool for SQLAlchemy
Owners: ralph
Branches: f18, f17, el6
InitialCC:
Comment 9 Jon Ciesla 2012-08-31 12:18:26 EDT
Git done (by process-git-requests).
Comment 10 Ralph Bean 2012-09-01 14:12:17 EDT
Fedora updates are in testing -> https://admin.fedoraproject.org/updates/python-alembic

el6 still needs the latest python-sqlalchemy to make it to stable (or a buildroot override).

Note You need to log in before you can comment on or make changes to this bug.