Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add with_doc conditional over -doc subpackage #6

Open
3 of 26 tasks
chkumar246 opened this issue Jul 12, 2017 · 8 comments
Open
3 of 26 tasks

Add with_doc conditional over -doc subpackage #6

chkumar246 opened this issue Jul 12, 2017 · 8 comments

Comments

@chkumar246
Copy link
Contributor

chkumar246 commented Jul 12, 2017

All the RDO packages contains -doc subpackage which contains docs for the specific
projects. Sometime while building doc subpackage, we might need to add more dependencies
or remove some javascript/css files in order to avoid dependency and if any of the dependency
is not packaged, the rpm package building will break in order to avoid that it would be good
to introduce with_doc conditional for -doc subpackage. So that we can enable or disable doc
building step.

What to improve:

  1. Clone openstack-swift spec file git clone https://github.com/rdo-packages/swift-distgit
  2. Go to swift-distgit and open openstack-swift.spec in editor.
  3. Define %global with_doc 1 at the top of spec file.
  4. Go to -doc subpackage,
  5. Above that add %if 0%{?with_doc}, it will start the doc_guard
  6. Go to %description of -doc subpackage and add %endif to end the doc_guard.
  7. Add the same doc_guard condition defined in step 5 just above %{__python2} setup.py build_sphinx
    and end the doc_guard at rm -rf doc/build/html/.{doctrees,buildinfo} as stated in step 6.
  8. Perform the step 7 for adding doc_guard for %files docs section.
  9. Once done! Make changes, add and commit it and send a Gerrit Review.

For example: you can check the spec file of python-os-traits or python-osprofiler

Below is the list of packages which need same fixes:

Mentor: Jon Schlueter - IRC: jschlueter github: yazug
Note: Pick one of the package and comment in the comment box with review link.

@apevec
Copy link
Member

apevec commented Jul 13, 2017

@yazug should man pages be included in %if with_doc or outside?

@yazug
Copy link
Collaborator

yazug commented Jul 13, 2017

man page generation and inclusion if it goes into main package and not just the -doc sub-package should be preserved. If it's going into -doc sub-package then it should be guarded with the %if with_doc

@yazug
Copy link
Collaborator

yazug commented Jul 20, 2017

python-osprofiler - https://review.rdoproject.org/r/7781 add with_doc guard for building docs

@yazug
Copy link
Collaborator

yazug commented Jul 20, 2017

@yazug
Copy link
Collaborator

yazug commented Jul 20, 2017

openstack-sahara https://review.rdoproject.org/r/7786 Add with_doc guards for building -doc sub-package

@OGtrilliams
Copy link

openstack-swift 😸 https://review.rdoproject.org/r/7789

rdoproject pushed a commit to rdo-packages/swift-distgit that referenced this issue Jul 26, 2017
Re-enabled cleanup for docs building

Fixed for redhat-openstack/easyfix#6

Change-Id: Icaf8290e34732619eafdd2496bb4d3a4efc6c2ae
rdoproject pushed a commit to rdo-packages/osprofiler-distgit that referenced this issue Jul 26, 2017
Allow for situation to rebuild package without the -docs rpm

Also move BR: git out of -doc subpackage

Resolves: redhat-openstack/easyfix#6

Change-Id: I9e02762509a318a9b2e79f0b2e2dbd76e77dcb22
@OGtrilliams
Copy link

python-oslo-concurrency - https://review.rdoproject.org/r/8087

rdoproject pushed a commit to rdo-packages/oslo-concurrency-distgit that referenced this issue Aug 7, 2017
Added conditionals over -doc subpackage to guard against package break if/when
dependencies are added.

Per RDO request redhat-openstack/easyfix#6

Change-Id: I1be54bc9e15272459f3d2007bcf99ca1d1f0af65
rdoproject pushed a commit to rdo-packages/watcher-distgit that referenced this issue Sep 11, 2017
As part of the with_doc conditional enablement work, the doc build
on this package had been disabled. This re-enables it along with a
myriad of other fixes to bring it up to scratch.

redhat-openstack/easyfix#6

Change-Id: I595a0e1d9ae7383d965c7d9aa3339a41843412a9
rdoproject pushed a commit to rdo-packages/oslo-log-distgit that referenced this issue Sep 12, 2017
redhat-openstack/easyfix#6

Change-Id: Ibdbcf8d9029d7812cc777e885caf8bdf1f2819f0
rdoproject pushed a commit to rdo-packages/oslo-policy-distgit that referenced this issue Sep 27, 2017
redhat-openstack/easyfix#6

Change-Id: I61d6bee45e934415b314595d43d74330032b638f
rdoproject pushed a commit to rdo-packages/ironic-inspector-distgit that referenced this issue Sep 28, 2017
redhat-openstack/easyfix#6
Also use 'html' doc builder explicitly for doc generation.

Change-Id: Ia73dbbfe4d4cb5d18c898c94f4c2f837b8022b4a
rdoproject pushed a commit to rdo-packages/oslo-messaging-distgit that referenced this issue Oct 16, 2017
redhat-openstack/easyfix#6

Change-Id: I40b6c3ae66952c3b5642158076d7a5ea4a5d4851
rdoproject pushed a commit to rdo-packages/oslo-rootwrap-distgit that referenced this issue Oct 25, 2017
redhat-openstack/easyfix#6

Change-Id: I96b65da7a8616183f5988bdb268a7ba7f6c137f6
rdoproject pushed a commit to rdo-packages/oslo-messaging-distgit that referenced this issue Oct 25, 2017
redhat-openstack/easyfix#6

Change-Id: I40b6c3ae66952c3b5642158076d7a5ea4a5d4851
(cherry picked from commit fa43065)
rdoproject pushed a commit to rdo-packages/oslo-db-distgit that referenced this issue Nov 8, 2017
redhat-openstack/easyfix#6

Change-Id: I67c76284f2538c0e52f8650c28db8e1fbd9de5db
rdoproject pushed a commit to rdo-packages/oslo-service-distgit that referenced this issue Dec 21, 2017
redhat-openstack/easyfix#6

Change-Id: I34d0cae4c7160ff7c78ff009a91b99a4463375ec
@dsilakov
Copy link

dsilakov commented Jun 5, 2018

Found this PR while rebuilding openstack packages without documentation.

Guys, what about possibility to disable doc generation by some global macro as it is already done in some other OpenStack packages?

This can be easily implemented by replacing hardcoded "%global with_doc 1" with a definition that take into account value of other macro ("_without_doc" is usually used for this:

%global with_doc %{!?_without_doc:1}%{?_without_doc:0}

rdoproject pushed a commit to rdo-packages/oslo-log-distgit that referenced this issue Apr 4, 2024
Patch-set: 1
Change-id: Ibdbcf8d9029d7812cc777e885caf8bdf1f2819f0
Subject: Added the doc_guard redhat-openstack/easyfix#6
Branch: refs/heads/rpm-master
rdoproject pushed a commit to rdo-packages/oslo-log-distgit that referenced this issue Apr 4, 2024
Patch-set: 1
Subject: Added the doc_guard redhat-openstack/easyfix#6
Commit: c41db1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants