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

EPERM on hardlinking files is not rescued when packaging a dir #253

Merged
merged 1 commit into from Sep 7, 2012

Conversation

Projects
None yet
2 participants
@JacekLach
Contributor

JacekLach commented Aug 29, 2012

Reproduction steps:

mkdir /tmp/fpmlinks
sudo touch /tmp/fpmlinks/sufile
sudo ln -s sufile /tmp/fpmlinks/sulink
fpm -s dir -t deb -n links /tmp/fpmlinks
(...)/gems/fpm-0.4.14/lib/fpm/package/dir.rb:112:in `link': Operation not permitted - (/tmp/fpmlinks/sufile, /tmp/package-dir-staging20120829-19938-msthu0/tmp/fpmlinks/sufile) (Errno::EPERM)
    from /home/jacek/.rvm/gems/ruby-1.9.3-p194/gems/fpm-0.4.14/lib/fpm/package/dir.rb:112:in `copy'
    from /home/jacek/.rvm/gems/ruby-1.9.3-p194/gems/fpm-0.4.14/lib/fpm/package/dir.rb:79:in `block in clone'
    from /home/jacek/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/find.rb:41:in `block in find'
    from /home/jacek/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/find.rb:40:in `catch'
    from /home/jacek/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/find.rb:40:in `find'
(...)
Try copying file when linking fails with EPERM
Thus files that are owned by different users but can be copied will not
break packaging.
@jordansissel

This comment has been minimized.

Owner

jordansissel commented Sep 7, 2012

Cool beans! Thanks for the patch :)

jordansissel added a commit that referenced this pull request Sep 7, 2012

Merge pull request #253 from JacekLach/rescue-eperm-while-linking
EPERM on hardlinking files is not rescued when packaging a dir

@jordansissel jordansissel merged commit 649b47c into jordansissel:master Sep 7, 2012

jordansissel added a commit that referenced this pull request Sep 7, 2012

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

jls
Merge pull request jordansissel#253 from JacekLach/rescue-eperm-while…
…-linking

EPERM on hardlinking files is not rescued when packaging a dir

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

Merge pull request jordansissel#253 from JacekLach/rescue-eperm-while…
…-linking

EPERM on hardlinking files is not rescued when packaging a dir

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

Merge pull request #253 from JacekLach/rescue-eperm-while-linking
EPERM on hardlinking files is not rescued when packaging a dir

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

Merge pull request #253 from JacekLach/rescue-eperm-while-linking
EPERM on hardlinking files is not rescued when packaging a dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment