Re: Missing dependency in glibc package

2016-09-28 Thread Florian Weimer

On 09/27/2016 09:32 PM, Roman Tsisyk wrote:


My package uses getprotobyname(3), getaddrinfo(3), getnameinfo(3)
functions which read /etc/protocols, /etc/hosts, /etc/services and
other network configuration files under the hood.
Despite the fact that all these functions is an integral part of
glibc, required configuration files are provided by a separate package
called `setup`, which is not in the dependency tree of glibc.


I'm not sure there needs to be a glibc dependency.  libresolv and 
nss_dns need a name server, but we don't add a dependency on that, 
either.  We need a kernel, but again, no dependency.


All the files you listed could be provided by other NSS service modules 
instead of nss_files.


We could probably add a Recommends: dependency for /etc/protocols and 
/etc/services.  For /etc/hosts, even that seems unnecessary.


Florian
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Missing dependency in glibc package

2016-09-28 Thread Roman Tsisyk
On Tue, Sep 27, 2016 at 11:36 PM, Björn Esser  wrote:
>
> Yes, because it usually gets installed by `basesystem` and `filesystem`
> packages; if those packages are missing, you broke your system anyways…
>

docker run -t -i fedora:24 /bin/bash
[root@896ac6d48718 /]# dnf remove setup
Dependencies resolved.
===
 PackageArch
Version  Repository
  Size
===
Removing:
 libsemanagex86_64
2.5-2.fc24   @koji-override-0
 271 k
 setup  noarch
2.10.1-1.fc24@koji-override-0
 691 k
 shadow-utils   x86_64
2:4.2.1-8.fc24   @koji-override-0
 3.5 M
 ustr   x86_64
1.0.4-21.fc24@koji-override-0
 284 k

Transaction Summary
===
Remove  4 Packages


I don't see any problems after that.

-- 
WBR,
   Roman Tsisyk 
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Missing dependency in glibc package

2016-09-27 Thread Björn Esser

Am 27.09.2016 um 22:08 schrieb Roman Tsisyk:

On Tue, Sep 27, 2016 at 10:53 PM, Björn Esser  wrote:

Forgot to mention:  Explicit dependencies are usually the better way,
instead of relying on implicit dependencies…


Of course.


File Dependencies
RPM gives you the ability to depend on files instead of packages. Whenever 
possible you should avoid file dependencies as they slow down dependency 
resolution and require the package manager to download file lists in addition 
to to regular dependency information. There are, however, times when other 
technical considerations outweigh these considerations. If the files you need 
are prone to moving between packages of different names, it can be useful to 
depend on those files directly.

I found that a dependency on "setup" package is not common practice:

# dnf repoquery --whatrequires setup|wc -l
19



Yes, because it usually gets installed by `basesystem` and `filesystem` 
packages; if those packages are missing, you broke your system anyways…

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Missing dependency in glibc package

2016-09-27 Thread Roman Tsisyk
On Tue, Sep 27, 2016 at 10:53 PM, Björn Esser  wrote:
>
> Forgot to mention:  Explicit dependencies are usually the better way,
> instead of relying on implicit dependencies…
>

Of course.

> File Dependencies
> RPM gives you the ability to depend on files instead of packages. Whenever 
> possible you should avoid file dependencies as they slow down dependency 
> resolution and require the package manager to download file lists in addition 
> to to regular dependency information. There are, however, times when other 
> technical considerations outweigh these considerations. If the files you need 
> are prone to moving between packages of different names, it can be useful to 
> depend on those files directly.

I found that a dependency on "setup" package is not common practice:

# dnf repoquery --whatrequires setup|wc -l
19

-- 
WBR,
  Roman Tsisyk 
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Missing dependency in glibc package

2016-09-27 Thread Björn Esser

Am 27.09.2016 um 21:48 schrieb Björn Esser:

Am 27.09.2016 um 21:32 schrieb Roman Tsisyk:

Hi,

My package uses getprotobyname(3), getaddrinfo(3), getnameinfo(3)
functions which read /etc/protocols, /etc/hosts, /etc/services and
other network configuration files under the hood.
Despite the fact that all these functions is an integral part of
glibc, required configuration files are provided by a separate package
called `setup`, which is not in the dependency tree of glibc.

I realized that it is possible break getprotoname(2), getaddrinfo(2),
getnameinfo(2) and probably other glibc functions by removing `setup`
package.
Moreover, some authors of Docker containers already do that to
minimize image footprint.

Is it a dependency problem of glibc package? Should I file a ticket
for this case?
Is it better to add /etc/protocols, /etc/services or `setup` as
dependencies for my package?



I'd file a bug on glibc and add a dependency on those files (or the 
package shipping them) in your package at least as long until the 
issue is resolved by the glibc-maintainers.

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Forgot to mention:  Explicit dependencies are usually the better way, 
instead of relying on implicit dependencies…

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Missing dependency in glibc package

2016-09-27 Thread Björn Esser

Am 27.09.2016 um 21:32 schrieb Roman Tsisyk:

Hi,

My package uses getprotobyname(3), getaddrinfo(3), getnameinfo(3)
functions which read /etc/protocols, /etc/hosts, /etc/services and
other network configuration files under the hood.
Despite the fact that all these functions is an integral part of
glibc, required configuration files are provided by a separate package
called `setup`, which is not in the dependency tree of glibc.

I realized that it is possible break getprotoname(2), getaddrinfo(2),
getnameinfo(2) and probably other glibc functions by removing `setup`
package.
Moreover, some authors of Docker containers already do that to
minimize image footprint.

Is it a dependency problem of glibc package? Should I file a ticket
for this case?
Is it better to add /etc/protocols, /etc/services or `setup` as
dependencies for my package?



I'd file a bug on glibc and add a dependency on those files (or the 
package shipping them) in your package at least as long until the issue 
is resolved by the glibc-maintainers.

___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Missing dependency in glibc package

2016-09-27 Thread Roman Tsisyk
Hi,

My package uses getprotobyname(3), getaddrinfo(3), getnameinfo(3)
functions which read /etc/protocols, /etc/hosts, /etc/services and
other network configuration files under the hood.
Despite the fact that all these functions is an integral part of
glibc, required configuration files are provided by a separate package
called `setup`, which is not in the dependency tree of glibc.

I realized that it is possible break getprotoname(2), getaddrinfo(2),
getnameinfo(2) and probably other glibc functions by removing `setup`
package.
Moreover, some authors of Docker containers already do that to
minimize image footprint.

Is it a dependency problem of glibc package? Should I file a ticket
for this case?
Is it better to add /etc/protocols, /etc/services or `setup` as
dependencies for my package?

-- 
WBR,
  Roman Tsisyk 
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org