Commit Graph

63 Commits

Author SHA1 Message Date
Paul Spooren 751791d545 packages: store URL in Manifest
The manifest should provide as much information as possible about the
package, including the project URL. With this commit the URL is stored
as it's own attribute instead of at the end of the description.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-01-08 14:06:38 +01:00
Petr Štetiar d604a07225
build: add CycloneDX SBOM JSON support
CycloneDX is an open source standard developed by the OWASP foundation.
It supports a wide range of development ecosystems, a comprehensive set
of use cases, and focuses on automation, ease of adoption, and
progressive enhancement of SBOMs (Software Bill Of Materials) throughout
build pipelines.

So lets add support for CycloneDX SBOM for packages and images
manifests.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-11-01 11:14:41 +00:00
Petr Štetiar 649655f427
package-dumpinfo,metadata: add ABI version information to package index
There is no standard for ABI versioning, so its not possible to find out
from `libext2fs2`, `libiwinfo20230701` or `libss2` package names if
thats just package name or package name with ABI version included. To
help with the decision, lets make ABI version aviable in package index.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-11-01 11:14:40 +00:00
Petr Štetiar 8562c65ff8
package-metadata: add CPE information to JSON package manifests
Common Platform Enumeration (CPE) is a structured naming scheme for
information technology systems, software, and packages.

In order for the information to be processed further, it should also be
available in JSON package manifests.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-11-01 11:14:39 +00:00
Daniel Golle b2aca61360
base-files, metadata: support additional group membership
Some packages may require additional group membership for the system
user added by that package. Allow defining additional groups as third
member of the ':'-separated tuple, allowing to specify multiple
','-separated groups with optional GID.

Example:
USERID:=foouser=1000:foogroup=1000:addg1=1001,addg2=1002,addg3

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-10-28 16:27:21 +01:00
Paul Spooren 108901fffb scripts: store maintainer in package metadata
The maintainer could be usable for downstream tooling, so start storing
it in the metadata.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-09-23 21:38:59 -10:00
Felix Fietkau c921650382 build: drop ABI version from metadata
Preparation for supporting dynamic ABI versions that depend on the runtime
configuration. Read the suffix from the staging dir pkginfo version files.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-14 19:41:52 +01:00
Adrian Schmutzler 1d5260cf72 build: add option to mark devices as BROKEN
By specifying "BROKEN := 1" or "BROKEN := y" for a device, it will be
hidden (and deselected) by default. By that, it provides a stronger
option to "disable" a device beyond just using DEFAULT := n.

To make these devices visible, just enable the BROKEN option in
developer settings as already implemented for targets and packages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-30 21:49:07 +02:00
Jonas Gorski 7546be6007 build: allow overriding default selection state for devices
Allow overriding the default selection state for Devices, similar to
setting a default for packages.

E.g. by setting DEFAULT to n, they won't be selected by default anymore
when enabling all device in the multi device profile.

This allows preventing images being built by the default config for
known broken devices, devices without enough RAM/flash, or devices not
working with a certain kernel versions.

This does not prevent the devices from being manually selected or images
being built by the ImageBuilder. These devices often still have worth
with a reduced package-set, or as a device for regression testing, when
no better device is available.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2019-08-13 22:13:18 +02:00
Felix Fietkau 85017c40f4 build: add a config option for enabling a testing version of the target kernel
If the target supports a newer kernel version that is not used by default
yet, it can be enabled with this option

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2019-05-11 11:37:10 +02:00
Daniel Golle d6fa04a437 IB: include SUPPORTED_DEVICES in 'make info' output
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2019-03-11 05:32:29 +01:00
Daniel Golle 13c379e5c6 ib: display whether profile comes with image metadata
Having image metadata (and signature) appended is a condition for
semi-automated sysupgrade, hence IB needs to be able to tell which
images will end up with metadata.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2019-03-06 14:50:42 +01:00
Jo-Philipp Wich e3d5b384aa build: expose ABI version in .packageauxvars
Subdequent commits need this information to resolve the ABI version when
computing binary ipk dependencies.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-01-19 14:32:01 +01:00
Yousong Zhou 204081670b scripts/metadata.pm: avoid adding dup names in provides list
The need arises from building Open vSwitch kernel datapath modules, e.g.

 - kmod-openvswitch from Linux upstream
 - kmod-openvswitch-intree from openvswitch source code

where both provides virtual package "kmod-openvswitch" for userspace
packages to select and depend on

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-09-09 01:21:01 +00:00
Matthias Schiffer 884c9575e1
scripts/metadata.pm: allow group-only Require-User specs
/lib/functions.sh can deal with Require-User specifications that only
contain a group, but no user. Adjust metadata.pm to allow such
specifications as well.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-02-26 07:19:46 +01:00
Matthias Schiffer 4bb54ed15e
build: remove obsolete "package feature" feature
Package "features" seem to be unused for some time. In any case, custom
Config.in snippets and package PROVIDES are a much more flexible way to
express similar options.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-13 19:54:45 +01:00
Matthias Schiffer 52719c2b67
metadata: scripts/feeds: distinguish between source and binary packages, resolve virtual dependencies
Properly resolve build depends to source packages and runtime depends to
binary packages. Dependencies on virtual packages are resolved to the first
provider now.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-13 19:54:45 +01:00
Matthias Schiffer 47d6b05ad3
metadata: always resolve dependencies through provides list
Instead of adding virtual packages to the normal package list, keep a
separate list for provides, make each package provide itself, and resolve
all dependencies through this list. This allows to use PROVIDES to replace
existing packages.

Fixes FS#837.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-13 19:54:44 +01:00
Matthias Schiffer 3abf663c22
build: remove package preconfig feature
This feature has been unused for years, and its scope is too limited to be
actually useful.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-13 19:54:44 +01:00
Matthias Schiffer 423ec18116
metadata: remove redundant fields from package hash
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-13 19:54:44 +01:00
Matthias Schiffer f0c702f124
metadata: replace %subdir hash with a path field in source packages
Every single reference to subdir was concatenated with the source package
name, so it makes sense to store the concatenated value instead.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-13 19:54:44 +01:00
Matthias Schiffer 504cb913eb
metadata: change pkg->{src} field to hold a reference
We often want to access fields of a source packages through pkg->{src}.
Allow accessing them directly instead of resolving the source hash through
srcpackages.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-13 19:54:44 +01:00
Matthias Schiffer 47f292ff78
metadata: interate over source packages when generating Makefile
All build dependencies are between source packages. Interating over source
rather than binary packages simplifies parts of the code and prepares
further improvement.

As a side effect, this changes the implicit default variant of a few
packages (the first defined is used now instead of the lexicographically
first).

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-13 19:54:44 +01:00
Matthias Schiffer b2ab9c9d33
metadata: move 'builddepends' from binary to source packages
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-13 19:54:43 +01:00
Matthias Schiffer 39be6e7f19
metadata: move 'buildtypes' from binary to source packages
Build types are a property of source rather than binary packages. This is a
preparation for followup cleanup.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-13 19:54:43 +01:00
Matthias Schiffer 19577582e4
metadata: make srcpackage extensible
Turn the srcpackage values into hashes to allow storing more information
than just binary package names.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2018-01-13 19:54:43 +01:00
Yousong Zhou 80d9ec5d3d scripts/package-metadata.pl: parse and validate field Require-User
The script will now detect uid/gid collision and can generate a table of
current allocation

    ./scripts/package-metadata.pl usergroup tmp/.packageinfo \
	| sort -k 1,1r -k 3,3n \
	| column -t

This should ensure that no collision will happen for each single build

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-06-18 10:39:35 +08:00
Felix Fietkau d8dbd33eba scripts/package-metadata.pl: fix kmod pakage dependencies within the SDK
Instead of ignoring all metadata for package/kernel/linux, process it
and only suppress emitting config data to tmp/.config-package.in

This ensures that packages that select kmod-* packages can inherit their
depdendencies.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-07 12:47:04 +02:00
Felix Fietkau f8ebbbc568 build: implement support for selecting multiple device profiles
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-06-07 08:58:40 +02:00
Felix Fietkau f4c4d501e4 build: remove profile kernel/build system config override support
It has been unused for years

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-15 20:55:40 +02:00
Felix Fietkau 0d10ada19c scripts/metadata.pl: add support for generating profile make code for the image builder
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-13 16:32:36 +02:00
Felix Fietkau 91799d5198 metadata.pl: fix target profile sorting check
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-11 19:18:16 +02:00
Felix Fietkau 1189af85fd metadata.pl: add support for forcing sorting of profiles
Used to mix device profiles (specified in the image makefile) with
regular target profiles.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-11 19:03:35 +02:00
Felix Fietkau 6ddca3a361 target.mk: remove the unused Target-Path field
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-05-11 19:03:35 +02:00
Jo-Philipp Wich bf4bfd8ccc scripts: remove "Package-Subdir" metadata handling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-13 15:38:17 +02:00
Jo-Philipp Wich 9a04a80677 scripts: metadata: use the new "Repository" field
Switch to the new "Repository" metadata field to populate tmp/.packagesubdirs

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-04-13 15:33:53 +02:00
Jo-Philipp Wich 0333da8943 include: group kmod ipk files into a "kernel" subdirectory
This is useful to just use the kmods from an official build while supplying
base packages from a custom feed or the other way around; for just overriding
the kmods with a local repo while using official repos for the rest.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48475
2016-01-24 15:36:05 +00:00
Felix Fietkau 3d8c8cf3bb scripts/metadata.pl: add support for ignoring source packages when generating metadata
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48170
2016-01-10 16:35:16 +00:00
Felix Fietkau 797b0459c4 scripts/metadata.pm: save target makefile names
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44780
2015-03-15 11:08:01 +00:00
Felix Fietkau acb43b3df7 scripts/metadata.pl: move parse_target_metadata() to metadata.pm
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44776
2015-03-15 11:07:40 +00:00
John Crispin e2684c218d build: propagate override information to .config file
With this change, override information is now parsed from the metadata
and put in the %packages hash. A new hash - %overrides - is created and
exported, to be used during the .config-package.in generation.

If an override is detected, a new option CONFIG_OVERRIDE_PKGS will be
created in the .config, and will contain a space-separated list of all
the overridden packages.

Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>

SVN-Revision: 44336
2015-02-09 12:09:43 +00:00
John Crispin eb738f5275 generate list of license information for packages
Many packages define already metadata about their license (PKG_LICENSE),
but this is only included in the ipk files.

This change allows to create the information also on the build-host,
to get an overview on the used licenses.
In the full list, also all packages without this info are shown

Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>

SVN-Revision: 43070
2014-10-26 16:57:33 +00:00
Felix Fietkau 5e4789671a build: add support for declaring package CONFLICTS which only affect selecting built-in packages
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42770
2014-10-05 16:41:33 +00:00
Felix Fietkau a62f0d02ec build: allow packages with build variants to explicitly select a default variant
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42654
2014-09-23 10:41:15 +00:00
Jo-Philipp Wich a720dd209f build: introduce per feed repository support
This changeset implements a new menuconfig option to generate separate
repositories for each enabled package feed instead of one monolithic one.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 42002
2014-08-05 11:24:24 +00:00
Jo-Philipp Wich b2f2233306 scripts: change metadata.pm and metadata.pl to not emit "default m if ALL" Kconfig instructions for hidden packages
SVN-Revision: 37397
2013-07-18 13:11:46 +00:00
Felix Fietkau bcf4757508 add support for hidden packages that get selected/built but do not show up in menuconfig
SVN-Revision: 27344
2011-07-02 06:49:09 +00:00
Felix Fietkau 459762ace2 add a new package metadata variable MDEPENDS for specifying local menuconfig dependencies that do not propagate to other packages
SVN-Revision: 26491
2011-04-05 19:03:51 +00:00
Felix Fietkau ccb604a573 metadata: allow build variants to contain "-"
SVN-Revision: 19284
2010-01-23 08:28:15 +00:00
Felix Fietkau 579d54038b build system: introduce a new feature called build variants. it allows building a package multiple times in one pass with different build dirs, based on the same build settings. replaces templating hacks like the one used in the hostapd package
SVN-Revision: 18357
2009-11-10 22:00:54 +00:00