New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --deb-shlibs #405

Merged
merged 1 commit into from Apr 9, 2013

Conversation

Projects
None yet
2 participants
@tmm1
Contributor

tmm1 commented Apr 9, 2013

For creation of shared library debs according to the debian policy manual: http://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-shlibs

@@ -97,6 +97,10 @@ class FPM::Package::Deb < FPM::Package
next @custom_fields
end
option "--shlibs", "SHLIBS", "Include control/shlibs file with SHLIBS" do |shlib|
@shlibs = shlibs

This comment has been minimized.

@jordansissel

jordansissel Apr 9, 2013

Owner

while possibly confusing, the --shlibs value is accessible as attributes[:deb_shlibs] so you don't need to set it as an ivar.

jordansissel added a commit that referenced this pull request Apr 9, 2013

@jordansissel jordansissel merged commit 10295b3 into jordansissel:master Apr 9, 2013

1 check failed

default The Travis build failed
Details
@jordansissel

This comment has been minimized.

Owner

jordansissel commented Apr 9, 2013

Question -

Did you intend to pass --deb-shlibs the path to the file to include? or the contents of the file? Right now it's the contents, so '--deb-shlibs "foo" results in a 'shlibs' file with "foo" in it.

@tmm1

This comment has been minimized.

Contributor

tmm1 commented Apr 9, 2013

Did you intend to pass --deb-shlibs the path to the file to include? or the contents of the file?

I intended it to be the contents, but maybe a path makes more sense. (Especially since the content can include newlines).

@tmm1

This comment has been minimized.

Contributor

tmm1 commented Apr 9, 2013

Generally though, a package only includes one shared library. You would use something like:

fpm -n jemalloc -v "3.2.0" --deb-shlibs "libjemalloc 1 jemalloc (>= 3.2.0)"
@jordansissel

This comment has been minimized.

Owner

jordansissel commented Apr 9, 2013

Will stay with the contents for now; if someone wants a path, we can figure that out later (--deb-shlibs-path, or whatever). Thanks for clarifying! :)

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Apr 9, 2013

% bin/fpm --verbose -f -s dir -t deb -n zlib1 --deb-shlibs "libz 1 zlib1g" /lib/x86_64-linux-gnu/libz.so.1*


% lintian zlib1_1.0_amd64.deb
E: zlib1: postinst-must-call-ldconfig lib/x86_64-linux-gnu/libz.so.1.2.3.4

Worth it to automatically add a postinst to call ldconfig if --deb-shlibs is set but no --after-install is otherwise set?

@tmm1

This comment has been minimized.

Contributor

tmm1 commented Apr 9, 2013

Worth it to automatically add a postinst to call ldconfig if --deb-shlibs is set but no --after-install is otherwise set?

Yea, I think that makes sense.

@jordansissel

This comment has been minimized.

Owner

jordansissel commented Apr 9, 2013

Done!

 % bin/fpm --verbose -f -s dir -t deb -n zlib1 --deb-user root --deb-group root --deb-shlibs "libz 1 zlib1g" /lib/x86_64-linux-gnu/libz.so.1*

You gave --deb-shlibs but no --after-install, so I am adding an after-install script that runs ldconfig to update the system library cache {:level=>:info}
Reading template {:path=>"/home/jls/projects/fpm/templates/deb/ldconfig.sh.erb", :level=>:info}
You gave --deb-shlibs but no --after-remove, so I am adding an after-remove script that runs ldconfig to update the system library cache {:level=>:info}
Reading template {:path=>"/home/jls/projects/fpm/templates/deb/ldconfig.sh.erb", :level=>:info}
...

prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 18, 2014

prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 27, 2014

jordansissel added a commit that referenced this pull request Apr 24, 2015

jordansissel added a commit that referenced this pull request Jun 20, 2016

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