Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Prior to this change, we’d attempted to handle shell escaping of
arguments by passing arrays of arguments rather than a single full
command string. While this worked as intended, it meant that we needed
to stream data between processes through Ruby. As it happens, larger
tarballs would cause the write pipeline to become backed up, and since
we would attempt to write all the data before reading any, we would
effectively deadlock.
Rather than attempting to stream by chunks, we’ve reverted back to using
the full string commands, and managing shell escapes (where needed) in
Ruby.
|
|
The Gnu tar implementation executes `tar cf - #{sourcedir}`, which can be a
relative path. So it is not necessary to expand it, and doing so causes the
test to fail on windows.
|
|
Prior to this commit, the specs made assertions about absolute file
paths, which works perfectly until you try running the tests under
Windows. This change patches the tests so that they will continue to
run properly under both Windows and Linux.
|
|
In the previous commit, the default behavior of `execpipe` was changed
to ensure that the pipe was always opened in read/write mode. While we
aren't aware of any regressions this change would cause, the cautious
route is to maintain the same default behavior for now; to that end,
this commit adds a `mode` parameter to `execpipe`, allowing callers to
choose the mode the pipe is opened in.
|
|
Prior to this commit, if the module_working_dir or the path to a module
being built contained whitespace, our simple string-interpolation
would fail to create a valid call to `tar` or `gzip`. This change fixes
the bugs resulting from that behavior.
|
|
I'm not entirely sure if I'm using #yields() correctly but this allows
me to expect that Dir.chdir is called, and still expect all the calls to
Puppet::Util::Execution.execute to be made.
|
|
|
|
Previously, modules installed by the root user would retain the
original group membership information. This change ensures that the
group will match the module directory being installed to.
|
|
Prior to this change, tarballs unpacked by the root user would be unpacked
with the permissions and the ownership information present in the tarball.
In the best case, this made some modules fail to function after installation
since the newly installed module was owned by a different user. In the worst
case, this could be seen as a fairly serious security vulnerability.
This change ensures that the module's permissions are always owner-writable,
world-readable, and that the owner is always the same as the module's parent
directory.
|
|
Without this patch `puppet module build` produces an empty tar file when
run on Solaris. This is obviously a problem. The root cause is that
tar defaults to writing the archive to the tape device instead of STDOUT
as was expected.
This patch fixes the problem by explicitly using `tar cf - ...` to write
the archive to STDOUT.
Paired-with: Andrew Parker <andy@puppetlabs.com>
|
|
Previously, the module tool relied on GNU versions of tar and gzip/gunzip
to build and install modules, which isn't portable on Windows in
particular.
This commit adds Gnu, Solaris, and Mini tar implementations for packing
and unpacking tar.gz format.
It modifies the module tool to select the appropriate implementation for
the platform it's currently running on.
Paired-with: Andy Parker <andy@puppetlabs.com>
|