Skip to content

Remove RPM specific dependencies - #14456

Merged
jessfraz merged 1 commit into
moby:masterfrom
Djelibeybi:issue14042
Jul 9, 2015
Merged

jessfraz merged 1 commit into
moby:masterfrom
Djelibeybi:issue14042

Conversation

@Djelibeybi

Copy link
Copy Markdown
Contributor

Let RPM auto-generate the dependencies on libraries during build. RPM will still generate the correct dependencies with the right architecture:

# rpm -qpR docker-engine-1.8.0-0.0.20150708.023155.gitf9aefd1.el7.centos.x86_64.rpm
...
libc.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.9)(64bit)
libdevmapper.so.1.02()(64bit)
libdevmapper.so.1.02(Base)(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libsqlite3.so.0()(64bit)
...

This resolves issue #14042 on all current RPM platforms. Tested on CentOS 6 and 7; Fedora 20, 21, 22.

Signed-off-by: Avi Miller [email protected]

…es on libraries during build.

Signed-off-by: Avi Miller <[email protected]>
@Djelibeybi Djelibeybi changed the title Remove specific dependencies Remove RPM specific dependencies Jul 8, 2015
@jessfraz

jessfraz commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

this is incorrect, we need sqlite.....
we cannot just remove it.

@vbatts

vbatts commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

tricky. just specifying libsqlite3.so.0 is how the i686 was in the mix. It satisfies that requirement.

@jessfraz

jessfraz commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

also this is how it is specified in the fedora spec

@vbatts

vbatts commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

hah. nicely. :-\

@jessfraz

jessfraz commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

@estesp

estesp commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

I'm a bit dated on my RPM skills (I only built distro RPMs for 10 years, but that ended years ago), but I think there is confusion between specifying Requires: and letting AutoReqProv: yes (the default) do it's magic during RPM build. More info on auto-requires/provides here: http://www.rpm.org/max-rpm-snapshot/s1-rpm-depend-auto-depend.html

Usually you never specify direct library names/versions in a hardcoded Requires: line in a spec file unless you turn AutoReqProv "off" and are trying to build for a closed system where you know exact names/versions of dependent libraries. Requires: lines are usually meant for package names that you want to make sure are installed prior to your package being installed. For library dependencies you let the rpm build scripts (e.g. find-requires) do the ELF binary parsing magic to find the list of explicitly required libraries that will be required on the system. These requirements will be added to your RPM, and will be listable after you build your RPM by using the rpm -qpR command like in the first comment of this PR. That comment shows that libsqlite is most definitely required by Docker, but shows you don't need an explicit Requires: line to make it happen, because find-requires during rpmbuild looked at the ELF headers and figured out the list of shared libs that Docker requires to run properly.

@vbatts

vbatts commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

+1

On Wed, Jul 8, 2015 at 4:42 PM, Phil Estes [email protected] wrote:

I'm a bit dated on my RPM skills (I only built distro RPMs for 10 years,
but that ended years ago), but I think there is confusion between
specifying Requires: and letting AutoReqProv: yes (the default) do it's
magic during RPM build. More info on auto-requires/provides here:
http://www.rpm.org/max-rpm-snapshot/s1-rpm-depend-auto-depend.html

Usually you never specify direct library names/versions in a hardcoded
Requires: line in a spec file unless you turn AutoReqProv "off" and are
trying to build for a closed system where you know exact names/versions of
dependent libraries. Requires: lines are usually meant for package names
that you want to make sure are installed prior to your package being
installed. For library dependencies you let the rpm build scripts (e.g.
find-requires) do the ELF binary parsing magic to find the list of
explicitly required libraries that will be required on the system. These
requirements will be added to your RPM, and will be listable after you
build your RPM by using the rpm -qpR command like in the first comment of
this PR. That comment shows that libsqlite is most definitely required
by Docker, but shows you don't need an explicit Requires: line to make it
happen, b ecause < code>find-requires during rpmbuild looked at the ELF
headers and figured out the list of shared libs that Docker requires to run
properly.

—
Reply to this email directly or view it on GitHub
#14456 (comment).

@Djelibeybi

Copy link
Copy Markdown
Contributor Author

@jfrazelle what @estesp said. :) The Requires for libsqlite.so.3 is automatically pulled in by RPM.

@jessfraz

jessfraz commented Jul 9, 2015

Copy link
Copy Markdown
Contributor

ok cool lets merge it LGTM

jessfraz pushed a commit that referenced this pull request Jul 9, 2015
Remove RPM specific dependencies
@jessfraz
jessfraz merged commit cab02a5 into moby:master Jul 9, 2015
@Djelibeybi
Djelibeybi deleted the issue14042 branch July 9, 2015 00:18
@jessfraz

jessfraz commented Jul 9, 2015

Copy link
Copy Markdown
Contributor

@calavera can we cherry-pick into 1.7.1 please thanks :)

@jessfraz jessfraz assigned calavera and unassigned jessfraz Jul 9, 2015
@thaJeztah thaJeztah added this to the 1.7.1 milestone Jul 9, 2015
@thaJeztah thaJeztah mentioned this pull request Jul 9, 2015
@calavera

Copy link
Copy Markdown
Contributor

Cherry picked into #14264

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants