The folder /tmp is typically 50% of installed RAM size.
This may not be enough for large packages. Use /var/tmp
instead. The performance impact is not significant.
- Address an issue with `abireport version` output being out-of-sync
with the released version.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Avoid updating the program version in two different places by
initializing the ABIReportVersion string in the sources via `go build`
linker option.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
The tarball must only contain the one directory tree containing the
source code, not including the current directory.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
- Fixes an occasional hang with rpm extraction.
- Fixes a race condition in the file-tree walker code, which
occasionally resulted in hangs when processing an rpm containing no
files.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
Simplify the code. There is no need to use io.Pipe
and to wait asynchronuosly for rpm2cpio to finish.
This also fixes an occasional hang observed with
the previous implementation.
Signed-off-by: Juro Bystricky <jurobystricky@hotmail.com>
There were occasional hangs detected when processing
empty packages. These were the result of a race condition:
a.JobProcessor and the go function with filepath.Walk were executed
concurrently. For empty packages the go function could terminate
before a.JobProcessor loop dispatched all a.nJobs.
When filepath.Walk terminated, it closed a.JobChan.
If the channel was closed during the jobProcessor dispatch loop,
less than a.nJobs were dispatched. However, jobDone expects
to be called exactly a.nJobs times before closing a.storeChan.
The remedy is to ensure that we close a.JobChan after
jobProcessor finished.
Signed-off-by: Juro Bystricky <jurobystricky@hotmail.com>
Creating man pages results in the following error:
/bin/sh: ronn: command not found
As "ronn" seems to be no longer supported, generate the pages
using "pandoc"
This change necessitated a minor edit in the markdown file.
Signed-off-by: Juro Bystricky <jurobystricky@hotmail.com>
Add buildmode=pie flag to the build.
By making binaries position independent and address randomization,
it makes it harder for those using exploits that rely on known offsets,
for example.
This also aligns with what Clear Linux has been doing since the upgrade
to gcc 9, which enables PIE by default.
This function is much like the RPM explosion helper, by using a simple
pipe to get directly to the contents of the package. Here we simply
pipe unzip to tar xf, explicitly passing the `install.tar.xz` payload
to tar. Internally an eopkg is simply a ZIP file with a tarball payload
and some XML data, so this is always going to work.
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This prevents errors/warnings relating to timestamp or minor file/inode
differences that cpio would otherwise bail on.
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
cpio likes to emit warnings to stderr, even with --quiet, about timestamp
changes in piped RPMs. This change silences it completely.
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
These errors only arise from reading EOF because the file is too small
and we read past the header. They shouldn't be emitted to the console.
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
This removes unnecessary/distracting text when used in other tools.
This change also fixes a minor copy/paste typo in the dpkg implementation.
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
Thanks to Alex's testing within flatpak, we encountered situations whereby
a nil info was passed due to not being able to open proc FD files. In this
instance, we simply continue and ignore the files.
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
Before we examine an ELF file, we first check for the presence of a
valid ELF header, which is 4 bytes. To avoid unnecessarily checking files
that are empty/tiny, and spamming the console with unnecessary text, we
mandate that an interesting ELF file must be at minimum, 5 bytes in size.
While the reality is that an ELF is always going to be bigger than this,
it enforces a sane constant that doesn't break ELF detection, but does
avoid checking useless files that couldn't header match and contain
interesting content at the same time.
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
Credit to the swupd developers is due for demonstrating how to easily
integrate the documentation into the build system. While this was
previously hooked up in the makefile target, this change and pending
release now adds the completed documentation to complete the install
target, making abireport now suitable for packaging.
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
This change enhances the landing README to immediately indicate the
project license and current status per goreportcard for code hygiene.
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>