Bug 9055 - man-pages-%lang packages group ownership of man directories conflicts with everything
Summary: man-pages-%lang packages group ownership of man directories conflicts with ev...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 8665
  Show dependency treegraph
 
Reported: 2013-02-12 23:12 CET by David Walser
Modified: 2013-03-26 20:47 CET (History)
9 users (show)

See Also:
Source RPM: man-pages-{cs,es,fr,hu,id,it,ja,ko,pt_BR,ru,zh}
CVE:
Status comment:


Attachments

Description David Walser 2013-02-12 23:12:54 CET
As of rpm 4.11, different ownership and/or permissions on a directory between two packages are considered "file conflicts."

Because of this, the man-pages-%lang packages conflict with several other packages.

The man-pages-%lang packages own the /usr/share/man/%lang and /usr/share/man/%lang/man? directories with a group owner of man, while several other packages own those directories with a group owner of root.

One possible fix is to just change the man-pages-%lang packages to use root as the group owner of those directories, and this problem goes away.

You could argue that those other packages shouldn't own those directories at all, but they don't do it directly.  It happens as a result of the %find_lang --with-man macro (/usr/lib/rpm/mageia/find-lang.pl from rpm-mageia-setup-build).

So, if the solution is to fix the find-lang.pl script such that it doesn't give packages that use it ownership of those man directories, the following packages will need to be rebuilt to pick up the changes:
- amule
- awesome
- axel
- dcraw
- deja-dup
- dfc
- dia
- dpkg
- dvdisaster
- gramps
- hunspell
- msec
- nano
- nmap
- po4a
- qelectrotech
- rubber
- run-parts
- spectrwm
- unhide
- wammu
- wesnoth
- wireless-tools
- xfce4-terminal
- xine-ui

Only doing the latter still wouldn't help for packages built outside of mga3 with a fixed find-lang, so ideally both things should be done.

To see the conflicts list, refer to this:
https://bugs.mageia.org/attachment.cgi?id=3451
David Walser 2013-02-12 23:14:00 CET

CC: (none) => thierry.vignaud

David Walser 2013-02-12 23:14:06 CET

CC: (none) => mageia

David Walser 2013-02-12 23:14:34 CET

CC: (none) => mageia

David Walser 2013-02-12 23:14:44 CET

CC: (none) => tmb

David Walser 2013-02-12 23:14:58 CET

CC: (none) => fundawang

David Walser 2013-02-12 23:17:22 CET

Blocks: (none) => 8665

Comment 1 David Walser 2013-02-12 23:19:29 CET
The only package from that list that does own those directories directly, rather than using find_lang, is wireless-tools.  I tried to fix it to use find_lang, and for some unknown reason it didn't work.
Comment 2 David Walser 2013-02-12 23:21:15 CET
I also accidentally left one package the list of those that are using %find_lang --with-man:
- mplayer
Comment 3 David Walser 2013-02-12 23:36:24 CET
It looks like the exact change I proposed to find-lang.pl was also proposed in Bug 3697.

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=3697

David Walser 2013-02-12 23:37:15 CET

CC: (none) => n54

Comment 4 David Walser 2013-02-12 23:44:10 CET
This issue was also raised on the mailing list in July 2011, but it's a bigger issue now because of the behavior change in rpm 4.11.

https://www.mageia.org/pipermail/mageia-dev/2011-July/006501.html
Comment 5 David Walser 2013-03-17 21:54:27 CET
Looks like find-lang.pl was fixed in rpm-mageia-setup-1.168-1.mga3.

Now we just need to rebuild the affected packages and fix the ownership in the man-pages-%lang packages.  Yay progress :o)  Thanks Thierry and Luc!
Comment 6 David Walser 2013-03-18 00:22:52 CET
All needed packages have been rebuilt except for wireless-tools.  Thanks Luc.
Comment 7 Malo Deniélou 2013-03-21 19:30:21 CET
Thanks Luc for your help. So we need someone to change the man-lang packages to not use root:man, as far as I understand.

What about wireless-tools?

CC: (none) => pierre-malo.denielou

Comment 8 Luc Menut 2013-03-23 23:28:10 CET
Sadly, I've just discovered and reported in bug 3697 that rpm-mageia-setup-1.168 has introduced an annoying regression.

CC: (none) => lmenut

Comment 9 David Walser 2013-03-26 15:11:55 CET
OK I believe I've fixed the man-pages-%lang packages.

wireless-tools still needs to be fixed to correctly use find_lang and build.  I really don't understand why it's failing.  I ran the find-lang perl script in the perl debugger, and what happens is in the File::Find::find subroutine, it runs that for every file in the package.  When it gets to the man pages, it hits a line in the code:
-f $File::Find::name or -l $File::Find::name or return;

It appears to be returning there, as in the debugger it does not continue past that line in that subroutine.  When I just make a small perl script to run -f on one of the man pages files, it does not evaluate to false, so it makes no sense that it's doing that during find-lang.  What *should* happen is that evaluates to true and it moves past that into the else-if ladder, and the filename matches the regular expression in the last elsif block and gets added to the list of files.
Comment 10 Guillaume Rousse 2013-03-26 19:53:03 CET
I just fixed the spec file, by adding --all-name option to %find_lang invocation.

The problem comes from the pkg_match function, which apparently tries to filter out files found in the buildroot, but not part of a given subpackage, based on file name. It may works correctly for /usr/share/locale subdirectories, but far less with individual man page file names...

CC: (none) => guillomovitch

Comment 11 David Walser 2013-03-26 20:47:18 CET
Thanks Guillaume!  wireless-tools-30-0.pre9.4.mga3 built successfully.

This should be fixed now.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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