Bug 604422

Summary: xfce4-dev-tools depends on gtk-doc unnecessarily
Product: [Fedora] Fedora Reporter: Felipe Contreras <felipe.contreras>
Component: xfce4-dev-toolsAssignee: Christoph Wickert <christoph.wickert>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: christoph.wickert
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-07 21:28:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 604169    

Description Felipe Contreras 2010-06-15 20:59:18 UTC
There's no need to depend on gtk-doc to install .html files. See the tracking bug for details.

Comment 1 Christoph Wickert 2010-06-15 21:18:28 UTC
There is no xfce4-dev-tools-devel package. What package are you referring to? Have you taken directory ownership of /usr/share/gtk-doc into account?

xfce4-dev-tools is a collection of scripts to build the latest Xfce packages from git and many of them do build documentation, so having gtk-doc as a dependency makes sense to me.

Comment 2 Felipe Contreras 2010-06-15 21:35:57 UTC
(In reply to comment #1)
> There is no xfce4-dev-tools-devel package. What package are you referring to?

xfce4-dev-tools (as per the tracking bug)

> Have you taken directory ownership of /usr/share/gtk-doc into account?

What ownership? root.root?

In fact, I took a look at xfce4-dev-tools, it's not even installing files in /usr/share/gtk-doc. So it doesn't use gtk-doc at all.

> xfce4-dev-tools is a collection of scripts to build the latest Xfce packages
> from git and many of them do build documentation, so having gtk-doc as a
> dependency makes sense to me.    

What *you* use xfce4-dev-tools for is irrelevant.

If I was an Xfce user I would use it to build Xfce and install on /opt/xfce (no packaging required). As such, I might decide to do --disable-gtk-doc.

In the end it's a *personal* choice.

In your particular case, if building a specific Xfce package requires gtk-doc, then it should be listed on the BuildRequires.

Comment 3 Christoph Wickert 2010-06-15 22:06:51 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > There is no xfce4-dev-tools-devel package. What package are you referring to?
> 
> xfce4-dev-tools (as per the tracking bug)

Ok, I changed the summary to avoid further confusion.

> > Have you taken directory ownership of /usr/share/gtk-doc into account?
> 
> What ownership? root.root?

The directory ownership in the rpm database:
$ rpm -qf /usr/share/gtk-doc/
gtk-doc-1.14-1.fc13.noarch
gnome-python2-gnomevfs-2.28.1-1.fc13.x86_64
(the latter is bogus)

> In fact, I took a look at xfce4-dev-tools, it's not even installing files in
> /usr/share/gtk-doc. So it doesn't use gtk-doc at all.

Wrong, the xdt-autogen script calls gtkdocize which is provided by gtk-doc.

$ grep gtkdoc $(rpm -ql xfce4-dev-tools | grep bin)
/usr/bin/xdt-autogen:## Check for gtkdocize
/usr/bin/xdt-autogen:test -z "${XDT_PROG_GTKDOCIZE}" && XDT_PROG_GTKDOCIZE="gtkdocize"
$ rpm -qf $(which gtkdocize)
gtk-doc-1.14-1.fc13.noarch

> > xfce4-dev-tools is a collection of scripts to build the latest Xfce packages
> > from git and many of them do build documentation, so having gtk-doc as a
> > dependency makes sense to me.    
> 
> What *you* use xfce4-dev-tools for is irrelevant.
> 
> If I was an Xfce user I would use it to build Xfce and install on /opt/xfce (no
> packaging required). As such, I might decide to do --disable-gtk-doc.
>
> In the end it's a *personal* choice.

In this case I could just argue: What *you* would decide is irrelevant. You see: This kind of discussion will lead us nowhere. It's not about a personal choice, everything that counts are the default build options.

> In your particular case, if building a specific Xfce package requires gtk-doc,
> then it should be listed on the BuildRequires.    

Tarballs or git checkouts do not have BuildRequires.


I will close this bug now because this package really needs gtk-doc to work correctly. We can certainly argue about the other ones from bug 604169, but please read the packaging guidelines [1] before mass filing nearly 100 bugs.

[1] https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Ownership

Comment 4 Felipe Contreras 2010-06-15 23:05:02 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > In fact, I took a look at xfce4-dev-tools, it's not even installing files in
> > /usr/share/gtk-doc. So it doesn't use gtk-doc at all.
> 
> Wrong, the xdt-autogen script calls gtkdocize which is provided by gtk-doc.
> 
> $ grep gtkdoc $(rpm -ql xfce4-dev-tools | grep bin)
> /usr/bin/xdt-autogen:## Check for gtkdocize
> /usr/bin/xdt-autogen:test -z "${XDT_PROG_GTKDOCIZE}" &&
> XDT_PROG_GTKDOCIZE="gtkdocize"
> $ rpm -qf $(which gtkdocize)
> gtk-doc-1.14-1.fc13.noarch

Wrong, that scritps checks if the configure.ac has GTK_DOC_CHECK:
for configure_ac_file in $CONFIGURE_AC_FILES; do
  if grep -q "^GTK_DOC_CHECK" "${configure_ac_file}"; then
    (${XDT_PROG_GTKDOCIZE} --version) </dev/null >/dev/null 2>&1 || {
      cat >&2 <<EOF
xdt-autogen: You must have "gtk-doc" installed. You can get if from
             http://www.gtk.org/gtk-doc/.
EOF
      exit 1
    };
    break;
  fi;
done

If there's no GTK_DOC_CHECK in the specific package, there's no need for gtk-doc.

> > > xfce4-dev-tools is a collection of scripts to build the latest Xfce packages
> > > from git and many of them do build documentation, so having gtk-doc as a
> > > dependency makes sense to me.    
> > 
> > What *you* use xfce4-dev-tools for is irrelevant.
> > 
> > If I was an Xfce user I would use it to build Xfce and install on /opt/xfce (no
> > packaging required). As such, I might decide to do --disable-gtk-doc.
> >
> > In the end it's a *personal* choice.
> 
> In this case I could just argue: What *you* would decide is irrelevant. You
> see: This kind of discussion will lead us nowhere. It's not about a personal
> choice, everything that counts are the default build options.

There are thousands of use-cases that are irrelevant for this bug. We need only one use-case that proves that gtk-doc is not needed for xfce4-dev-tools, and that's what I provided.

Your use-case is not relevant because it doesn't prove a direct dependency.

> > In your particular case, if building a specific Xfce package requires gtk-doc,
> > then it should be listed on the BuildRequires.    
> 
> Tarballs or git checkouts do not have BuildRequires.

So? When you run xdt-autogen it will warn you that you need gtk-doc to build that particular package. You install it and problem solved.

And what happens if you install xdt-autogen from git? Exactly the same issue: gtk-doc is missing, and you need to install it.

If you want autogen to automagically install the required packages for you, that's a separate issue.

> I will close this bug now because this package really needs gtk-doc to work
> correctly. We can certainly argue about the other ones from bug 604169, but
> please read the packaging guidelines [1] before mass filing nearly 100 bugs.

I will reopen it because I don't see any proof that gtk-doc is indeed required.

Comment 5 Felipe Contreras 2010-06-15 23:06:54 UTC
Er, reopening.

Comment 6 Christoph Wickert 2010-07-04 18:15:59 UTC
(In reply to comment #4)

> There are thousands of use-cases that are irrelevant for this bug. We need only
> one use-case that proves that gtk-doc is not needed for xfce4-dev-tools, and
> that's what I provided.

No you didn't. As explained before gtk-doc is needed for proper directory ownership.

> Your use-case is not relevant because it doesn't prove a direct dependency.

Even if it is not a direct dependency there is one in many cases (if a package has gtk documentation). A package management is used to provide a good out of the box experience. After installation of a package everything the user expects it to work rather than to having to install more packages manually.

This would be a case where 'weak' dependencies like 'recommends' or 'suggests' from Debian's deb could be used, but we don't have this in rpm currently. 

> If you want autogen to automagically install the required packages for you,
> that's a separate issue.

I don't want autogen to install anything, this is the job of a package management and this is why gtk-doc is a requirement of this package. I have no intentions to change this.

Comment 7 Felipe Contreras 2010-07-05 01:19:23 UTC
(In reply to comment #6)
> (In reply to comment #4)
> 
> > There are thousands of use-cases that are irrelevant for this bug. We need only
> > one use-case that proves that gtk-doc is not needed for xfce4-dev-tools, and
> > that's what I provided.
> 
> No you didn't. As explained before gtk-doc is needed for proper directory
> ownership.

Apparently you have trouble reading, so I'm going to copy paste the guidelines for you:

----
Multiple packages own files in a common directory but none of them needs to require the others.
An example:

bash-completion owns the /etc/bash_completion.d directory and uses the files placed there to configure itself.
git places files into /etc/bash_completion.d
bzr places files into /etc/bash_completion.d
Solution: Both the git and bzr packages should own the /etc/bash_completion.d directory as bash-completion is optional functionality and the installation of git or bzr should not force the installation of bash-completion.


Rule of Thumb
When determining whether this exception applies, packagers and reviewers should ask this question: Do the files in this common directory enhance or add functionality to another package, where that other package is not necessary to be present for the primary functionality of this package?
----

Were you able to read the part where it says *both* packages should own the directory?

So, no, gtk-doc is not needed, and no, directory ownership is not needed.

If the guideline is amended, as it seems to be happening, then the dependency would be gtk-doc-filesystem, but *not* gtk-doc.

> > Your use-case is not relevant because it doesn't prove a direct dependency.
> 
> Even if it is not a direct dependency there is one in many cases (if a package
> has gtk documentation). A package management is used to provide a good out of
> the box experience. After installation of a package everything the user expects
> it to work rather than to having to install more packages manually.

xfce4-dev-tools does *not* need gtk-doc to work properly.

> This would be a case where 'weak' dependencies like 'recommends' or 'suggests'
> from Debian's deb could be used, but we don't have this in rpm currently. 

Maybe, but as you say: we don't have that; we only have "requires", and gtk-doc is not required.

> > If you want autogen to automagically install the required packages for you,
> > that's a separate issue.
> 
> I don't want autogen to install anything, this is the job of a package
> management and this is why gtk-doc is a requirement of this package. I have no
> intentions to change this.    

You are not listening. Here's what I said (again):
"And what happens if you install xdt-autogen from git?"

See? There's no mention of any package manager.

What happens in this case? You *have* to install gtk-doc manually. Yes?

Comment 8 Christoph Wickert 2010-07-05 08:33:47 UTC
(In reply to comment #7)

> Apparently you have trouble reading, so I'm going to copy paste the guidelines
> for you:

If you looked at the history of the wiki page you would see that this is a recent change that was never ratified by the packaging committee nor announced to the packagers. If you don't have the full picture you should not start getting impolite.

> So, no, gtk-doc is not needed, and no, directory ownership is not needed.

Directory ownership is *always* needed, the question is only whether multiple packages should own a directory or if they should require the single package that owns that dir. So far we did the latter because the first caused troubles with rpm.

> xfce4-dev-tools does *not* need gtk-doc to work properly.

It does need it for many packages and we want to cover these cases with the package management for a good out of the box experience. Diskspace is cheap these days, people who develop software will need plenty of it and will most likely need gtk-doc anyway.

> Maybe, but as you say: we don't have that; we only have "requires", and gtk-doc
> is not required.

As long as we don't have weak dependencies and tools to handle them, hard ones are the only was to make sure a package gets installed.

If a script contains 10 commands, then package management should take care of installing them, even if the commands are only called inside an 'if-clause'. Package management assures that the *full* functionality of an application is available after installation.

> You are not listening. Here's what I said (again):
> "And what happens if you install xdt-autogen from git?"
> 
> See? There's no mention of any package manager.

I *did* read what you wrote. Indeed, there is no mention of package management, but *I* mentioned package management because it is my business as a packager. Whatever people install from source is their problem, not mine. I have to make sure that things that get installed through the package management work out of the box in the best possible way.

> What happens in this case? You *have* to install gtk-doc manually. Yes?    

Again, this is completely irrelevant for me as a package maintainer. People could install all kinds of things manually, but then they are responsible for it, not me.

In case the packaging committee confirms the new guidelines, I will change the other packages but I will definitely not change this one. You filed this bug accidentally when you mass filed the other bugs against the *-devel packages. You were assuming this was a devel package too and didn't even look at it's content.

Comment 9 Felipe Contreras 2010-07-05 11:23:40 UTC
(In reply to comment #8)
> (In reply to comment #7)
> 
> > Apparently you have trouble reading, so I'm going to copy paste the guidelines
> > for you:
> 
> If you looked at the history of the wiki page you would see that this is a
> recent change that was never ratified by the packaging committee nor announced
> to the packagers. If you don't have the full picture you should not start
> getting impolite.

Nobody ever has the full picture, I just know that you are assuming you already know everything that's there to know, and that I only know what I can see, and what I can see is that the guideline is saying the contrary to what you say.

> > So, no, gtk-doc is not needed, and no, directory ownership is not needed.
> 
> Directory ownership is *always* needed, the question is only whether multiple
> packages should own a directory or if they should require the single package
> that owns that dir. So far we did the latter because the first caused troubles
> with rpm.

Yes, I agree, but the guideline is not saying that. IMO a gtk-doc-filesystem packages solves the problem, and the guideline is being updated for that.

> > xfce4-dev-tools does *not* need gtk-doc to work properly.
> 
> It does need it for many packages

For the *packages*, not for xfce4-dev-tools.

> and we want to cover these cases with the
> package management for a good out of the box experience. Diskspace is cheap
> these days, people who develop software will need plenty of it and will most
> likely need gtk-doc anyway.

It might be cheap for you, but you never know how people are going to use the system. That's why is better to avoid making assumptions and just do the right thing.

> > Maybe, but as you say: we don't have that; we only have "requires", and gtk-doc
> > is not required.
> 
> As long as we don't have weak dependencies and tools to handle them, hard ones
> are the only was to make sure a package gets installed.

No, 'requires' is for *required* dependencies; period.

You are abusing the field for purposes it was not intended to.

> If a script contains 10 commands, then package management should take care of
> installing them, even if the commands are only called inside an 'if-clause'.
> Package management assures that the *full* functionality of an application is
> available after installation.

The script is only calling the command to check if gtk-doc is there; let's suppose that the check for gtk-doc is not there.

What happens if I try to install a package that has GTK_DOC_CHECK and I don't have gtk-doc, will it fail? No. gtk-doc.m4 can be copied to the package's m4 directory.

So the script is trying to be smart by checking for GTK_DOC_CHECK, but it doing it wrong because it's not checking for gtk-doc.m4.

Even if GTK_DOC_CHECK is there, but not gtk-doc.m4; the package will fail to compile anyway, the only thing the script is doing is failing prematurely.

So, gtk-doc is not required for *full* functionality of this script. You can even patch the script to remove the GTK_DOC_CHECK check, and the script will not loose any functionality at all.

> > You are not listening. Here's what I said (again):
> > "And what happens if you install xdt-autogen from git?"
> > 
> > See? There's no mention of any package manager.
> 
> I *did* read what you wrote. Indeed, there is no mention of package management,
> but *I* mentioned package management because it is my business as a packager.
> Whatever people install from source is their problem, not mine.

You are contradicting yourself; xfce4-dev-tools is supposed to be for people that install from source (comment #1). So do you care about this use-case or not?

> I have to make
> sure that things that get installed through the package management work out of
> the box in the best possible way.

Yes, and xfce4-dev-tools will work just fine without gtk-doc.

> > What happens in this case? You *have* to install gtk-doc manually. Yes?    
> 
> Again, this is completely irrelevant for me as a package maintainer. People
> could install all kinds of things manually, but then they are responsible for
> it, not me.

You are deliberatively trying to be myopic and not trying to see the full picture. I think there's no way to discuss forward.


You are trying to achieve with this package what should be achieved with "XFCE Software Development". Should this package also require gcc, autoconf, automake, binutils, libtool, etc? No, that depends on the xfce4 packages being compiled, and if you want to have the "*full* functionality" and not having to install dependencies of the packages as you go on, then that's what the group "XFCE Software Development" is for.

Comment 10 Felipe Contreras 2010-08-23 16:48:29 UTC
It is a bug, see:
https://fedoraproject.org/wiki/PackagingDrafts/Revised_File_and_Directory_Ownership

From the original bug #604169 comment #31
---
Which by my reading means that all packages which place files in
/usr/share/gtk-doc/ should go ahead and own that dir. (root/root, mode 755).
---

Now, do you want me to fetch somebody to arbiter and tell you that "requires" is for *required* packages?

Comment 11 Christoph Wickert 2010-10-07 21:28:14 UTC
(In reply to comment #10)
> It is a bug, see:
> https://fedoraproject.org/wiki/PackagingDrafts/Revised_File_and_Directory_Ownership

As the URL indicates this was only a draft. Now that FPC has recently confirmed the draft in https://fedorahosted.org/fpc/ticket/5 I have fixed the other bugs, but I will definitely not change this one because...

> Now, do you want me to fetch somebody to arbiter and tell you that "requires"
> is for *required* packages?

... unlike dpkg rpm has no 'weak' dependencies (yet) and therefor we use "requires" for all possible dependencies in order to provide the best out of the box experience. Unlike other distributions we try to follow a 'Just works(TM)' approach. If you don't like it, please complain on fedora-devel, to the packaging committee or the QA contact, but I' tired arguing.

And please direct the problems you have with the script itself (in comment 9) to the upstream developers instead of downstream package maintainers. Thanks!

Comment 12 Felipe Contreras 2010-10-16 13:22:53 UTC
(In reply to comment #11)
> ... unlike dpkg rpm has no 'weak' dependencies (yet) and therefor we use
> "requires" for all possible dependencies in order to provide the best out of
> the box experience. Unlike other distributions we try to follow a 'Just
> works(TM)' approach. If you don't like it, please complain on fedora-devel, to
> the packaging committee or the QA contact, but I' tired arguing.

There is if of course nothing in the guidelines that allows you to do that.

> And please direct the problems you have with the script itself (in comment 9)
> to the upstream developers instead of downstream package maintainers. Thanks!

I'm not interested in doing that, nor trying to argue any more, I think I have been very clear.