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

Can't install under Fedora 23 #364

Closed
ghost opened this issue Feb 3, 2016 · 8 comments
Closed

Can't install under Fedora 23 #364

ghost opened this issue Feb 3, 2016 · 8 comments
Milestone

Comments

@ghost
Copy link

ghost commented Feb 3, 2016

The rpm package provided by http://binaries.html-tidy.org/ does not install under Fedora 23.

The error provided by dnf is:

Error: Transaction check error:
  file /usr/share/man from install of tidy-5.1.25-1.x86_64 conflicts with file from package filesystem-3.2-35.fc23.x86_64
  file /usr/share/man/man1 from install of tidy-5.1.25-1.x86_64 conflicts with file from package filesystem-3.2-35.fc23.x86_64
@geoffmcl
Copy link
Contributor

geoffmcl commented Feb 3, 2016

@jsmad thanks for the report...

Sorry there is an install problem, and hope someone with Fedora 23 can shed some light on the problem...

@geoffmcl geoffmcl added this to the 5.2 milestone Feb 3, 2016
hguemar added a commit to hguemar/tidy-html5 that referenced this issue Feb 4, 2016
CPack generated RPM failed to install due to the RPM
owning directories owned by filesystem packages.
Exclude mandir directories from CPack.

Resolves htacg#364
@hguemar
Copy link
Contributor

hguemar commented Feb 4, 2016

It's a problem w/ CMake/CPack. I verified the package metadata, and it owns directories from base system package filesystem.
Fixed by the PR #366

rpm -qp --fileclass tidy-5.1.25-64bit.rpm  
/usr/bin/tidy   ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=a47d915eb211a8509ffefb1221d3425efc3db960, not stripped
/usr/include/tidy.h C source, ASCII text
/usr/include/tidybuffio.h   C source, ASCII text
/usr/include/tidyenum.h C source, ASCII text
/usr/include/tidyplatform.h C source, ASCII text
/usr/lib/libtidy.so symbolic link to `libtidy.so.5'
/usr/lib/libtidy.so.5   symbolic link to `libtidy.so.5.1.25'
/usr/lib/libtidy.so.5.1.25  ELF 64-bit LSB  shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=9703d64a92d489f39bb85e80a68eb5bb59098d43, not stripped
/usr/lib/libtidys.a current ar archive
/usr/share/man  directory
/usr/share/man/man1 directory
/usr/share/man/man1/tidy.1.gz   troff or preprocessor input, ASCII text, with very long lines (gzip compressed data, from Unix, max compression)
``

@hguemar
Copy link
Contributor

hguemar commented Feb 4, 2016

Comparison with package generated using the fixed CMake file.

rpm -qp --fileclass tidy-5.1.*-64bit.rpm 
/usr/bin/tidy   ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d23281d0e318573a1abb800ebc5ca2b3825b4b76, not stripped
/usr/include/tidy.h C source, ASCII text
/usr/include/tidybuffio.h   C source, ASCII text
/usr/include/tidyenum.h C source, ASCII text
/usr/include/tidyplatform.h C source, ASCII text
/usr/lib/libtidy.so symbolic link to `libtidy.so.5'
/usr/lib/libtidy.so.5   symbolic link to `libtidy.so.5.1.36'
/usr/lib/libtidy.so.5.1.36  ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=073c484854f5dc6f347db0d04dc55fd909c5de24, not stripped
/usr/lib/libtidys.a current ar archive
/usr/share/man/man1/tidy.1.gz   troff or preprocessor input, ASCII text, with very long lines (gzip compressed data, max compression, from Unix)

Installs fine now

@mojavelinux
Copy link

Excellent!

When I tried it, I had to exclude many more folders:

SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST "/usr;/usr/bin;/usr/share;/usr/share/man;/usr/share/man/man1*;/usr/include;/usr/lib")

However, I might need to do a clean. Verifying.

@mojavelinux
Copy link

Yep, your patch works perfectly for me. The relevant bit from the generate spec file is as follows.

%files
%defattr(-,root,root,-)
"/usr/share/man/man1/tidy.1*"
"/usr/bin/tidy"
"/usr/include/tidy.h"
"/usr/include/tidyenum.h"
"/usr/include/tidyplatform.h"
"/usr/include/tidybuffio.h"
"/usr/lib/libtidys.a"
"/usr/lib/libtidy.so"
"/usr/lib/libtidy.so.5"
"/usr/lib/libtidy.so.5.1.36"

Notice it includes no paths owned by the system.

Great work @hguemar!

@hguemar
Copy link
Contributor

hguemar commented Feb 4, 2016

The variable you used override default paths from CPack, CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION can be used to easily add more paths without this side effect

@mojavelinux
Copy link

It looks like this eliminates the need for an upstream patch in Fedora.

https://pkgs.fedoraproject.org/cgit/rpms/tidy.git/tree/0001-allow-modified-install-paths.patch

So it should be possible now for Fedora to package this without modification.

Here's the upstream (downstream?) package:

https://apps.fedoraproject.org/packages/tidy

@mojavelinux
Copy link

@hguemar Now I understand. Excellent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants