[JIRA] (JENKINS-52781) tar function is breaking symlinks

13 views
Skip to first unread message

pibeitz@gmail.com (JIRA)

unread,
Jul 31, 2018, 4:13:02 AM7/31/18
to jenkinsc...@googlegroups.com
Pierre Beitz updated an issue
 
Jenkins / Bug JENKINS-52781
tar function is breaking symlinks
Change By: Pierre Beitz
Summary: tar function is now breaking symlinks
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

pibeitz@gmail.com (JIRA)

unread,
Jul 31, 2018, 6:44:01 AM7/31/18
to jenkinsc...@googlegroups.com
Pierre Beitz assigned an issue to Pierre Beitz
Change By: Pierre Beitz
Assignee: Pierre Beitz

dnusbaum@cloudbees.com (JIRA)

unread,
Jul 31, 2018, 9:04:01 AM7/31/18
to jenkinsc...@googlegroups.com
Devin Nusbaum commented on Bug JENKINS-52781
 
Re: tar function is breaking symlinks

Pierre Beitz So if I understand correctly, the problem is that Archiver#visitSymlink does not even get called for symlinks when their target is a directory? If so, then something along the lines of what you proposed seems like the best approach. Do you know when the problem was first introduced?

pibeitz@gmail.com (JIRA)

unread,
Jul 31, 2018, 9:18:01 AM7/31/18
to jenkinsc...@googlegroups.com
Pierre Beitz updated an issue
Change By: Pierre Beitz
While debugging the shelve plugin I noticed that the tar function available in the FilePath class is not conserving the symlinks anymore. The shelve plugin is calling the archive function in FilePath:
{code:java}
archive(final ArchiverFactory factory, OutputStream os, final DirScanner scanner) // factory use is TarArchiverFactory with no compression{code}
 

I did several experiment, and ended up narrowing the issue to the release 2.91. It's still Both tar archiving function do not working in properly handle the latest weekly symlinks to directory ( 2.134 but it works correctly for symlinks to files ) :

* public int tar(OutputStream out, final String glob) -> uses a DirScanner
. In Glob (ant style FileSets) that follows the release notes of 2.91 symlink , I saw therefore creates a brand new directory in place of the following that might (or might symlink, not what we want for a tar archive.

* public int tar(OutputStream out, FileFilter filter
) be -> uses a FileFilter wrapper which for some reasons doesn't redirect the cause of this issue: symlink calls to the wrapped FileFilter
{noformat}
Use Java NIO library instead of native code to create and detect symbolic links and Windows junctions to improve compatibility and robustness.   {noformat}
 

I'm not sure I'll have time
Why this week end to have a look is important: this issue has been here for long , but I can for sure provide a non working unit test next week if needed change made on 2 . 91 (see my comment below for Issue 2), made this appear more clearly.

 

pibeitz@gmail.com (JIRA)

unread,
Jul 31, 2018, 11:40:01 AM7/31/18
to jenkinsc...@googlegroups.com
Pierre Beitz commented on Bug JENKINS-52781
 
Re: tar function is breaking symlinks

Devin Nusbaum: I just issued a PR, attaching it to this issue (I though there was a bot doing that for me, but it seems I was wrong).

pibeitz@gmail.com (JIRA)

unread,
Aug 13, 2018, 11:58:02 AM8/13/18
to jenkinsc...@googlegroups.com

pibeitz@gmail.com (JIRA)

unread,
Aug 13, 2018, 11:58:02 AM8/13/18
to jenkinsc...@googlegroups.com
Pierre Beitz started work on Bug JENKINS-52781
 
Change By: Pierre Beitz
Status: Open In Progress

brian.murrell@intel.com (JIRA)

unread,
Jan 17, 2019, 12:35:02 PM1/17/19
to jenkinsc...@googlegroups.com
Brian J Murrell commented on Bug JENKINS-52781
 
Re: tar function is breaking symlinks

This seems to have been In Review for for 5 months now.  Is it really in review or is it stalled for some reason?  Where is the PR?

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

pibeitz@gmail.com (JIRA)

unread,
Mar 10, 2019, 5:47:02 AM3/10/19
to jenkinsc...@googlegroups.com

Brian J Murrell Review is stalled, the changes are a bit touchy and would need to be reviewed/discussed with more people. PR is linked to the ticket: https://github.com/jenkinsci/jenkins/pull/3569

pibeitz@gmail.com (JIRA)

unread,
Apr 11, 2019, 8:58:01 AM4/11/19
to jenkinsc...@googlegroups.com

pibeitz@gmail.com (JIRA)

unread,
Apr 11, 2019, 8:59:01 AM4/11/19
to jenkinsc...@googlegroups.com
Change By: Pierre Beitz
Status: In Review Resolved
Resolution: Won't Fix

jglick@cloudbees.com (JIRA)

unread,
Apr 17, 2019, 3:18:03 PM4/17/19
to jenkinsc...@googlegroups.com
Jesse Glick reopened an issue
 

Pierre Beitz the Shelve plugin could probably work around this issue by excluding known symlink filenames from its patternset.

Change By: Jesse Glick
Resolution: Won't Fix
Status: Resolved Reopened

jglick@cloudbees.com (JIRA)

unread,
Apr 17, 2019, 3:18:03 PM4/17/19
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Component/s: shelve-project-plugin
Component/s: core

pibeitz@gmail.com (JIRA)

unread,
Jun 17, 2019, 3:52:03 PM6/17/19
to jenkinsc...@googlegroups.com
Pierre Beitz started work on Bug JENKINS-52781
 
Change By: Pierre Beitz
Status: Open In Progress

pibeitz@gmail.com (JIRA)

unread,
Jun 17, 2019, 3:52:03 PM6/17/19
to jenkinsc...@googlegroups.com

pibeitz@gmail.com (JIRA)

unread,
Jun 17, 2019, 3:52:03 PM6/17/19
to jenkinsc...@googlegroups.com

pibeitz@gmail.com (JIRA)

unread,
Jun 17, 2019, 3:53:01 PM6/17/19
to jenkinsc...@googlegroups.com

pibeitz@gmail.com (JIRA)

unread,
Jul 13, 2019, 1:47:02 PM7/13/19
to jenkinsc...@googlegroups.com
Change By: Pierre Beitz
Status: In Review Fixed but Unreleased
Resolution: Fixed

pibeitz@gmail.com (JIRA)

unread,
Oct 6, 2019, 12:10:04 PM10/6/19
to jenkinsc...@googlegroups.com
Change By: Pierre Beitz
Status: Fixed but Unreleased Resolved
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

pibeitz@gmail.com (JIRA)

unread,
Oct 6, 2019, 12:11:02 PM10/6/19
to jenkinsc...@googlegroups.com
Pierre Beitz updated an issue
Change By: Pierre Beitz
Labels: 2.5-fixed regression

pibeitz@gmail.com (JIRA)

unread,
Oct 6, 2019, 12:12:04 PM10/6/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages