Age | Commit message (Collapse) | Author |
|
* fields_filter is a CLI-only option but was never freed
* The temporary buffer used to hold the tmpdir template was never freed
when mkdtemp failed
Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The command line option can be used to enforce installation of
recommendations even when they are disabled via the
"no_install_recommends" configuration option.
Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Currently, command line arguments are parsed before the configuration
file is read, hence making it impossible to disable boolean options once
they have been enabled via a configuration file option.
To enable this functionality, this patch splits command line argument
parsing into the following stages:
1. Parse all command line arguments needed for configuration file
parsing. This includes verbosity settings, the offline root and the
path to a custom configuration file.
2. Parse all other command line arguments.
Stage 2 is only performed after the configuration file has been loaded
thus allowing all options read from the configuration to be overridden
again.
Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The special value ':' will only be returned if the option string beings
with the ':' modifier. As this isn't the case here it doesn't need to be
handled specifically.
Additionally, rephrase the error message printed when an unhandled
return value is encountered.
Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
opkg_conf_load() currently loads the configuration from a file and then
proceeds to finalize the config structure by filling in default values
or building the final config values based on other config parameters
(e.g. the offline root).
To enable overwriting of config options from the command line the
finalization phase is split out so it can be called only after the
command line arguments have been processed for the second time.
To retain API compatibility, opkg_conf_load() continues to read and
finalize the config. If the staged approach is desired opkg_conf_read()
followed by a opkg_conf_finalize() shall be used.
Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Move freeing of resources claimed by opkg_config into a dedicated helper
function. This allows reuse in the upcoming two stage argument parsing
and also reduces the numbers of labels needed to perform the actual
freeing of memory.
This change is safe as the individual cleanup methods already check
whether the resource that should be freed has actually been allocated.
Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
"r" was never changed in between this and the previous check.
Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The variable is named DEBUG_OPKG_CMDS
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The opkg internal solver is marked for deprecation in a future release,
due to it being outdated, limited, buggy, and unmaintained. Builders are
instead directed to use the previously-optional libsolv backend.
Add a warning to the configure.ac, to warn builders about this
misconfiguration.
Also fix incidental spelling errors.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The autoconf version boundary 2.70 deprecated and obsoleted many
functions from prior versions. On systems with autoconf>2.70,
configuring opkg can throw warnings and errors about these deprecations.
Run autoupdate on the autoconf scripts and make some manual adjustments
to bring the scripts up to a modern standard.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Also ensure that copy of filename is passed into archive_entry_set_pathname
so it can be operated upon by posix basename which expect non-const
character pointer as input.
This became evident with latest musl where basename declaration was
dropped from string.h [1]
[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The opkg project mailing list is now hosted on the
lists.yoctoproject.org server. The google group has been deprecated.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Add a short document directing contributors on how to report security
issues against the project.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The opkg-lede fork was affected by a bug where it would not honor
the package index MD5Sum field. As a result, malicious attackers that
have MITM vector access to an opkg system could inject code into
packages, as long as the overall package size does not change.
Add a test to validate that our opkg fork is not vulnerable to this
exploit.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Google Code/Groups is a legacy product which is not being actively
maintained by Google, and it is becoming progressively more difficult to
maintain the opkg-devel list there.
Instead, move the canonical opkg mailing list for the yocto fork to the
lists.yoctoproject.org site, where it can live with the other
contemporary yocto projects.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
A C program inherits its locale environment variables when it starts up.
This happens automatically. However, these variables do not automatically
control the locale used by the library functions, because ISO C says that
all programs start by default in the standard ‘C’ locale.
Fixes warnings:
Warning when reading ar archive header: Pathname can't be converted from UTF-8 to current locale. (errno=84)
[1] https://www.gnu.org/software/libc/manual/html_node/Setting-the-Locale.html
Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The libarchive library, which is being used by opkg supports ACLs
and xattr already.
More information can be read at this link:
https://github.com/libarchive/libarchive/pull/691
Signed-off-by: Maciej Liszewski <m.liszewski@welotec.com>
Signed-off-by: Piotr Łobacz <p.lobacz@welotec.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Automake is not very intelligent. If you add add a directory to the
EXTRA_DIST variable with a trailing slash, then automake will copy the
directory into a the dist archive under a path of itself. So the dist
archive might contain: `/scripts/scripts/...` or `/tests/tests/...`.
Remove the trailing slash to fix this behavior.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The NEWS file has been replaced by CHANGELOG.md, for update-tracking.
Update the make-dist.sh script to use the new file.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The checkpatch.pl and test-branch.py files are obsolescent and no longer
recommended for new developers to run on their patches.
Remove the scripts, so that devs don't run them by mistake.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Add a document which espouses the larger-scale initiatives which would
improve the project. This list is a combination of the tribal knowledge
that I have learned as the project maintainer, and the historic TODOs
and commentary of past maintainers.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The TODO file contains some historic musings about things to improve in
the codebase. For most entries, the discussion history has been lost and
the entries themselves aren't enough to take discrete action.
The exception is the request to improve the efficiency of the
pkg_hash_best_installation_candidate function, which has been moved to
this bugzilla.
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15006
Remove the file.
There is some space in the project to keep a roadmap document with
future initiatives that are more than individual enhancements or bugs,
and that document is in-work.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The configure.lineno file is autogenerated by ./configure and should not
be source-controlled.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Add a README.md file to the tests/ subdirectory, with helpful
information to developers about how to run and write the integrated test
framework.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The recent changes to the project's developer documentation have broken
compliance with how we have setup our dist content.
Update the dist content to reflect the project's current file structure.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
GNU Automake asserts that projects should follow GNU "conventions" and
include some standard files named AUTHORS, INSTALL, ChangeLog, et c. The
intention here is probably to encourage users to distribute this
information, but it is rather heavy-handed to require that they be
specifically named in that fashion.
As a result, automake will error if we try to rename or move these
files.
Declare `-Werror foreign` in the autoconf file, which declares that we
are not a strictly GNU-compliant project in this regard, and squashes
automake's objections.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The existing README doesn't provide very useful information to users who
find the project. They learn that opkg is a "package management system"
(whatever that means) derived from Ipkg (which they have never heard
of), and little else of value.
Instead, make the README a markdown formatted document answering basic
questions like: What is opkg? How do I get it? How do I use it? and
Where should I go for more information?
Some of the answers to those questions aren't satisfying, but those are
the subject of future initiatives.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The GettingStarted document contains a mix of sparse references to the
upstream bug tracker/mailing list - which is now provided in the
CONTRIBUTING.md - and some musing about future project initiatives,
which would be better moved to another document.
Remove it.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The Release document provides an outdated view of what the release
workflow looked like for opkg at some time.
Move this information into the MAINTAINING.md document, and update it
with better information.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The VersionPolicy doc describes an approximation of the semantic
versioning policy that this fork follows.
The policy is functionally similar to the popular SemVer spec outlined
here (https://semver.org/spec/v2.0.0.html). So we should formally adopt
that spec to align with community best-practices.
There isn't a compelling reason that the version policy needs to be in
its own file. Create a new MAINTAINING.md document for project
maintenance information and move it there.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The INSTALL file is auto-generated by the automake tooling, and should
not be a part of source control.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The NEWS file now represents as a modern-style markdown CHANGELOG, but
uses the old-style "NEWS" name.
Rename it to give the project a more *modern* appearance.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The ChangeLog file just redirects the user to the git-log, which is
unhelpful. Remove it for cleanliness.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Move the very-historic Ipkg changelog to the docs/ directory. It is
unlikely to be useful to new developers, and doesn't deserve
top-directory prominence.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The AUTHORS file lists some historic project contributors/maintainers,
but is rather out of date. Further, I think the open source community
has largely moved away from keeping independent AUTHORS files, in favor
of allowing the VCS history to track that information.
For those reasons deprecate the AUTHORS file. The maintainers list has
already been moved to the docs/CONTRIBUTING.md document, since that
information is less-well tracked by git history and has some utility for
contributors.
Hopefully, no one feels slighted by this decision. If you really desire
to have your contributions written out in source control, or if you had
some copyright agreement which makes that a requirement, feel free to
let me know and I'll reconcile your request.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The CONTRIBUTING file contents is out of date and doesn't give new
developers a helpful starting point for contributing to the project.
* Move the document to a new :docs/ directory, which will be the new
home for developer documentation.
* Rewrite sections to reflect the current standards for project
contribution.
* Remove sections about how to use git; most devs probably understand
how to use it by now.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
WG14 N2350 made very clear that it is an UB having type definitions
within "offsetof" [1]. This patch enhances the implementation of macro
alignof_slot to use builtin "_Alignof" to avoid undefined behavior on
when using std=c11 or newer
clang 16+ has started to flag this [2]
Fixes build when using -std >= gnu11 and using clang16+
Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it
may support C11, exclude those compilers too
[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm
[2] https://reviews.llvm.org/D133574
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
The opkg-key script was always passing the --no-options
flag to gpg, which uses /dev/null as the options file.
As a result, the opkg gpg.conf file was not getting
used. This change removes that flag so that gpg.conf
in the GPGHOMEDIR for opkg (currently /etc/opkg/gpg/)
will be used if present.
Signed-off-by: Charlie Johnston <charlie.johnston@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Use the `+git` suffix, instead of the `-snapshot` suffix because it
doesn't require speculation about what the next release version will be.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Fix a spelling mistake in the usage text.
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Create a dir-hash to track the number of packages installing the
same directory or a symlink to a directory. This directory or
symlink is deleted only when there is no other package using it.
This is in line with how dpkg deletes directories.
Fixes Bugzilla #10461.
Signed-off-by: Shruthi Ravichandran <shruthi.ravichandran@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Multiple packages can install the same directory, or a symlink to a
directory. Ensure that these entries are not removed from the
filelists of packages that are installed following a package that
first installs the directory or a symlink to a directory.
This is later used to ensure that out-of-order package removals do
not result in directory or symlink deletion.
Fixes Bugzilla #10461.
Signed-off-by: Shruthi Ravichandran <shruthi.ravichandran@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|