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

RPM-ANT Build, %DOC directive is not working #126

Open
doddegowdahg opened this issue Nov 15, 2017 · 1 comment
Open

RPM-ANT Build, %DOC directive is not working #126

doddegowdahg opened this issue Nov 15, 2017 · 1 comment

Comments

@doddegowdahg
Copy link

The below shown attribute "doc=true" in rpm-build is not working to copy the documents in the standard location of RPM creation.
I want to copy all the html documents from "${build}/docs/output" to a standard location of RPM creation.

@bschatz
Copy link

bschatz commented Jun 7, 2018

I can reproduce it:

Simple build with one single doc file:

$ ls -l doc/engine-interface.txt build.xml 
-rw-r--r-- 1 bschatz bschatz  2273 Jun  7 18:18 build.xml
-rw-r--r-- 1 bschatz bschatz 26211 Mär  2 13:04 doc/engine-interface.txt
<target name="rpm">
    <mkdir dir="rpms"/>
    <redline:rpm group="Java Development" name="uic" version="0.0.0" destination="rpms">
      <rpmfileset file="doc/engine-interface.txt" doc="true" />
    </redline:rpm>
</target>

The default rpm doc directory on my system is /usr/share/local ==>

$ rpm --showrc  | egrep ": _datadir|: _defaultdocdir" 
-14: _datadir   /usr/share
-14: _defaultdocdir     %{_datadir}/doc

Build

$ ant rpm
[...]
[redline:rpm] Created rpm: uic-0.0.0-1.noarch.rpm

BUILD SUCCESSFUL
Total time: 0 seconds

I think the problem is the leading slash in front of the file
see here ==> http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html

$ sudo rpm -qlp rpms/uic-0.0.0-1.noarch.rpm 
/engine-interface.txt

The file is installed as doc but
the leading slash lets RPM to install it on "/" instead of /usr/share/doc/uic-0.0.0-1/.......

$ sudo rpm  -i rpms/uic-0.0.0-1.noarch.rpm 
$ sudo rpm -qld uic-0.0.0-1
/engine-interface.txt

$ ls -l /engine-interface.txt
-rw-r--r-- 1 root root 26211 Mär  2 13:04 /engine-interface.txt

Hope this bug reports helps to fix it.

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

2 participants