Skip to content
This repository has been archived by the owner on Jul 10, 2022. It is now read-only.

Use ar to determine the control file's actual name #158

Closed
wants to merge 1 commit into from
Closed

Use ar to determine the control file's actual name #158

wants to merge 1 commit into from

Conversation

sleepdeprecation
Copy link

Not all deb packages use gzip for compressing their files, and gzip is
no longer the default (Debian's documentation says xz is used by default
now), because of this Deb::S3::Packages#extract_control fails on newly
built deb packages.

This change uses ar to determine the actual control file name before
attempting to do operations on it.

Confirmed that this worked

# old output
>> Retrieving existing manifests
>> Examining package file bash-static_4.4.18-2ubuntu1journera1_amd64.deb
Failed to find control data in .deb with ar, trying tar.
tar: control.tar.gz: Not found in archive
tar: Error exit delayed from previous errors.
Traceback (most recent call last):
        14: from /usr/local/bin/deb-s3:23:in `<main>'
        13: from /usr/local/bin/deb-s3:23:in `load'
        12: from /usr/local/lib/ruby/gems/2.5.0/gems/deb-s3-0.10.0/bin/deb-s3:9:in `<top (required)>'
        11: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        10: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
         9: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
         8: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
         7: from /usr/local/lib/ruby/gems/2.5.0/gems/deb-s3-0.10.0/lib/deb/s3/cli.rb:188:in `upload'
         6: from /usr/local/lib/ruby/gems/2.5.0/gems/deb-s3-0.10.0/lib/deb/s3/cli.rb:188:in `each'
         5: from /usr/local/lib/ruby/gems/2.5.0/gems/deb-s3-0.10.0/lib/deb/s3/cli.rb:190:in `block in upload'
         4: from /usr/local/lib/ruby/gems/2.5.0/gems/deb-s3-0.10.0/lib/deb/s3/package.rb:46:in `parse_file'
         3: from /usr/local/lib/ruby/gems/2.5.0/gems/deb-s3-0.10.0/lib/deb/s3/package.rb:74:in `extract_control'
         2: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/tmpdir.rb:89:in `mktmpdir'
         1: from /usr/local/lib/ruby/gems/2.5.0/gems/deb-s3-0.10.0/lib/deb/s3/package.rb:76:in `block in extract_control'
/usr/local/lib/ruby/gems/2.5.0/gems/deb-s3-0.10.0/lib/deb/s3/package.rb:76:in `read': No such file or directory @ rb_sysopen - /var/folders/17/77jz89_9663076r0nlw91ny80000gn/T/d20180924-81675-fahdb1/control (Errno::ENOENT)

# new output
>> Retrieving existing manifests
>> Examining package file bash-builtins_4.4.18-2ubuntu1journera1_amd64.deb
>> Examining package file bash-doc_4.4.18-2ubuntu1journera1_all.deb
>> Examining package file bash-static_4.4.18-2ubuntu1journera1_amd64.deb
>> Examining package file bash_4.4.18-2ubuntu1journera1_amd64.deb
>> Uploading packages and new manifests to S3

Not all deb packages use gzip for compressing their files, and gzip is
no longer the default (Debian's documentation says xz is used by default
now), because of this Deb::S3::Packages#extract_control fails on newly
built deb packages.

This change uses ar to determine the actual control file name before
attempting to do operations on it.
@sleepdeprecation
Copy link
Author

@krobertson can you please look at this? it's preventing other people on my team from uploading new packages to our repo.

@lzecca78
Copy link

are there any news about this issue?

braxton9460 added a commit to braxton9460/deb-s3 that referenced this pull request Feb 24, 2020
@sleepdeprecation sleepdeprecation closed this by deleting the head repository Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants