Bug 1537432 - libtirpc: Provide header files in /usr/include/rpc
Summary: libtirpc: Provide header files in /usr/include/rpc
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: libtirpc
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-23 08:21 UTC by Florian Weimer
Modified: 2018-09-12 16:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-12 16:44:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1627295 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 1627295

Description Florian Weimer 2018-01-23 08:21:07 UTC
Now that the RPC headers are gone from glibc, libtirpc-devel could provide them in /usr/include/rpc.  /usr/include/tirpc should be kept as a symbolic link.

I think it is better to make the tirpc subdirectory the symbolic link because there is a slightly higher likelihood that other packages install files into /usr/include/rpc, although there are currently no such packages in Fedora.

libtirpc-devel needs to add this:

Conflicts: glibc-headers < 2.26.9000-35

Comment 1 Fedora End Of Life 2018-02-20 15:36:50 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 2 Steve Dickson 2018-03-01 15:34:59 UTC
(In reply to Florian Weimer from comment #0)
> Now that the RPC headers are gone from glibc, libtirpc-devel could provide
> them in /usr/include/rpc.  /usr/include/tirpc should be kept as a symbolic
> link.
> 
> I think it is better to make the tirpc subdirectory the symbolic link
> because there is a slightly higher likelihood that other packages install
> files into /usr/include/rpc, although there are currently no such packages
> in Fedora.
I'm a bit confused on this....Are you asking for
ln -s /usr/include/rpc /usr/include/tirpc? 

The only problem is as of glibc-headers-2.26.9000-51
those directories have different contents:
 ls /usr/include/tirpc
./  ../  netconfig.h  rpc/  rpcsvc/

ls  /usr/include/rpc
./  ../  netdb.h

> 
> libtirpc-devel needs to add this:
> 
> Conflicts: glibc-headers < 2.26.9000-35

Also it appears /usr/include/rpc is still in glibc-headers-2.26.9000-51
rpm -qf /usr/include/rpc
glibc-headers-2.26.9000-51.fc28.x86_64

Comment 3 Florian Weimer 2018-03-01 15:43:47 UTC
(In reply to Steve Dickson from comment #2)
> (In reply to Florian Weimer from comment #0)
> > Now that the RPC headers are gone from glibc, libtirpc-devel could provide
> > them in /usr/include/rpc.  /usr/include/tirpc should be kept as a symbolic
> > link.
> > 
> > I think it is better to make the tirpc subdirectory the symbolic link
> > because there is a slightly higher likelihood that other packages install
> > files into /usr/include/rpc, although there are currently no such packages
> > in Fedora.
> I'm a bit confused on this....Are you asking for
> ln -s /usr/include/rpc /usr/include/tirpc? 
> 
> The only problem is as of glibc-headers-2.26.9000-51
> those directories have different contents:
>  ls /usr/include/tirpc
> ./  ../  netconfig.h  rpc/  rpcsvc/
> 
> ls  /usr/include/rpc
> ./  ../  netdb.h

Good point.  So you either need to install into /usr/include/rpc and provide a symlink in the opposite direction, or we need to coordinate further and move the netdb.h to a different directory.

Which one do you prefer?

Comment 4 Steve Dickson 2018-03-01 16:05:50 UTC
(In reply to Florian Weimer from comment #3)
> (In reply to Steve Dickson from comment #2)
> > (In reply to Florian Weimer from comment #0)
> > > Now that the RPC headers are gone from glibc, libtirpc-devel could provide
> > > them in /usr/include/rpc.  /usr/include/tirpc should be kept as a symbolic
> > > link.
> > > 
> > > I think it is better to make the tirpc subdirectory the symbolic link
> > > because there is a slightly higher likelihood that other packages install
> > > files into /usr/include/rpc, although there are currently no such packages
> > > in Fedora.
> > I'm a bit confused on this....Are you asking for
> > ln -s /usr/include/rpc /usr/include/tirpc? 
> > 
> > The only problem is as of glibc-headers-2.26.9000-51
> > those directories have different contents:
> >  ls /usr/include/tirpc
> > ./  ../  netconfig.h  rpc/  rpcsvc/
> > 
> > ls  /usr/include/rpc
> > ./  ../  netdb.h
> 
> Good point.  So you either need to install into /usr/include/rpc and provide
> a symlink in the opposite direction, or we need to coordinate further and
> move the netdb.h to a different directory.
> 
> Which one do you prefer?
Whatever is less destructive ;-)

Looking at the contents of netdb.h it extern routines 
that I'm assuming are still in glibc, I know they are
not in libtirpc... so why should libtirpc be installing 
netdb.h in the first place?

Comment 5 Florian Weimer 2018-03-01 16:07:47 UTC
I would move the declarations from <rpc/netb.h> into <netdb.h>, and libtirpc could then install a <rpc/netdb.h> file which just contains:

#include <netdb.h>

Does this make sense?

Comment 6 Steve Dickson 2018-03-01 16:24:28 UTC
(In reply to Florian Weimer from comment #5)
> I would move the declarations from <rpc/netb.h> into <netdb.h>, and libtirpc
> could then install a <rpc/netdb.h> file which just contains:
> 
> #include <netdb.h>
> 
> Does this make sense?

Sorry but no... What I don't understand is why a library 
would install a header file that contain externs for routines 
it does not have? 

There are 60 externs of routines in netdb.h. Is all
that going to be moved out of glibc?

Comment 7 Florian Weimer 2018-03-01 16:27:44 UTC
I'm not following.  We are going to remove <rpc/netdb.h> from glibc, move those declarations into <netdb.h>, and libtirpc can ship a compatibility header in place of of <rpc/netdb.h> which simply includes <netdb.h>.  It does not need to repeat any declarations.

Comment 8 Steve Dickson 2018-03-01 16:54:26 UTC
(In reply to Florian Weimer from comment #7)
> I'm not following.  
I'm trying ;-)

>We are going to remove <rpc/netdb.h> from glibc, 
Got it... 

> move those declarations into <netdb.h>, 
So the code is staying in glibc.. got that too... 

> and libtirpc can ship a compatibility header in 
> place of of <rpc/netdb.h> which simply includes <netdb.h>. 
I see this logic but as of today libtirpc-devel does not
install anything into /usr/include/rpc. All the header
files go under /usr/include/tirpc.

So you are asking that libtirpc-devel install an
new file called netdb.h under /usr/include/rpc
that contains a '#include <netdb.h>'

Or are you asking a new netdb.h header that
contains the above include to be install 
under /usr/include/tirpc/rpc then 
create a symlink like 
ln -s /usr/include/tirpc/rpc /usr/include/rpc

In both cause libtirpc-devel will be taking over
the ownership of /usr/include/rpc.

Comment 9 Florian Weimer 2018-03-12 10:31:27 UTC
(In reply to Steve Dickson from comment #8)

> I see this logic but as of today libtirpc-devel does not
> install anything into /usr/include/rpc. All the header
> files go under /usr/include/tirpc.

Understood.

> So you are asking that libtirpc-devel install an
> new file called netdb.h under /usr/include/rpc
> that contains a '#include <netdb.h>'
> 
> Or are you asking a new netdb.h header that
> contains the above include to be install 
> under /usr/include/tirpc/rpc then 
> create a symlink like 
> ln -s /usr/include/tirpc/rpc /usr/include/rpc

Both approaches work.

> In both cause libtirpc-devel will be taking over
> the ownership of /usr/include/rpc.

This is the key point, yes.

The idea was that if the tirpc headers are substantially compatible, they should be installed under /usr/include/rpc, so that applications need fewer changes for the switch to tirpc.  However, I'm not convinced anymore that this is such a great idea because the RPC interfaces *are* different.  But perhaps we can do it for the XDR interfaces?

Comment 10 Steve Dickson 2018-04-12 15:42:06 UTC
What the story with  /usr/include/rpc and  /usr/include/rpc/netdb.h

both are still owned by glibc-headers

fedora# rpm -qf /usr/include/rpc
glibc-headers-2.27.9000-7.fc29.x86_64

fedora# rpm -qf /usr/include/rpc/netdb.h 
glibc-headers-2.27.9000-7.fc29.x86_64

f28# rpm -qf /usr/include/rpc
glibc-headers-2.27-8.fc28.x86_64

f28# rpm -qf /usr/include/rpc/netdb.h 
glibc-headers-2.27-8.fc28.x86_64

I'm not sure how to move forward

Comment 11 Florian Weimer 2018-05-30 07:33:07 UTC
/usr/include/rpc/netdb.h provides NSS-related functionality which is only in glibc, not in libtirpc.  It could theoretically be used without RPC, too.

So … considering that libtirpc-devel has a .pc file, I'm no longer sure if this switch is such a good idea.  Maybe we should tell developers instead to use pkg-config, and close this bug?

Comment 12 Steve Dickson 2018-08-27 14:57:09 UTC
Here is how I handled this

CFLAGS+=`pkg-config --cflags libtirpc`
LIBS=`pkg-config --libs libtirpc`

Comment 14 Steve Dickson 2018-09-12 16:44:49 UTC
(In reply to Florian Weimer from comment #11)
> /usr/include/rpc/netdb.h provides NSS-related functionality which is only in
> glibc, not in libtirpc.  It could theoretically be used without RPC, too.
> 
> So … considering that libtirpc-devel has a .pc file, I'm no longer sure if
> this switch is such a good idea.  Maybe we should tell developers instead to
> use pkg-config, and close this bug?

I agree...


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