aboutsummaryrefslogtreecommitdiffstats
path: root/package/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* build: generate index.jsonPaul Spooren2023-05-091-0/+4
| | | | | | | | | | | The index.json file lies next to Packages index files and contains a json dict with the package architecture and a dict of package names and versions. This can be used for downstream project to know what packages in which versions are available. Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: fix opkg install step for large package selectionAlexander Egorenkov2021-05-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the list of packages to be installed in a built image exceeds a certain number, then 'opkg install' executed for target '$(curdir)/install' in package/Makefile fails with: /usr/bin/env: Argument list too long. On Linux, the length of a command-line parameter is limited by MAX_ARG_STRLEN to max 128 kB. * https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/binfmts.h#L15 * https://www.in-ulm.de/~mascheck/various/argmax/ To solve the problem, store the package list being passed to 'opkg install' in a temporary file and use the shell command substitution to pass the content of the file to 'opkg install'. This guarantees that the length of the command-line parameters passed to the bash shell is short. The following bash script demonstrates the problem: ---------------------------------------------------------------------------- count=${1:-1000} FILES="" a_file="/home/egorenar/Repositories/openwrt-rel/bin/targets/alpine/generic/packages/base-files_1414-r16464+19-e887049fbb_arm_cortex-a15_neon-vfpv4.ipk" for i in $(seq 1 $count); do FILES="$FILES $a_file" done env bash -c "echo $FILES >/dev/null" echo "$FILES" | wc -c ---------------------------------------------------------------------------- Test run: ---------------------------------------------------------------------------- $ ./test.sh 916 130989 $ ./test.sh 917 ./test.sh: line 14: /bin/env: Argument list too long 131132 ---------------------------------------------------------------------------- Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net> [reword commit subject] Signed-off-by: Paul Spooren <mail@aparcar.org>
* build: always build package/kernel/linuxFelix Fietkau2020-10-151-0/+1
| | | | | | | | | | build: always build package/kernel/linux If no in-tree module packages are selected, the build system does not process package/kernel/linux. This package is required for building the virtual 'kernel' package, which is specified as a dependency for all kernel packages. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: store SourceDateEpoch in manifestPaul Spooren2020-08-311-1/+1
| | | | | | | | The usage of granular `SOURCE_DATE_EPOCH` for packages is an incrementing integer which could be useful for downstream tooling, therefore add it to the packages manifest. Signed-off-by: Paul Spooren <mail@aparcar.org>
* packages: apply usign padding workarounds to package indexes if neededJo-Philipp Wich2019-08-071-2/+6
| | | | | | | | | | | | | | Since usign miscalculates SHA-512 digests for input sizes of exactly 64 + N * 128 + 110 or 64 + N * 128 + 111 bytes, we need to apply some white space padding to avoid triggering the hashing edge case. While usign itself has been fixed already, there is still many firmwares in the wild which use broken usign versions to verify current package indexes so we'll need to carry this workaround in the forseeable future. Ref: https://forum.openwrt.org/t/signature-check-failed/41945 Ref: https://git.openwrt.org/5a52b379902471cef495687547c7b568142f66d2 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: add ABI_VERSION to binary package namesJo-Philipp Wich2019-01-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | Add the ABI_VERSION source makefile variable to the binary package basename and resolve source dependencies on packages with ABI_VERSION set to such expanded names. If for example a package specifies DEPENDS:=libopenssl while the OpenSSL Makefile specifies ABI_VERSION:=1.0.0, the resulting ipk control data dependency will be "Depends: libopenssl1.0.0" and the libopenssl ipk file will be called "libopenssl1.0.0_<version>_<arch>.ipk". The next time a library such as OpenSSL is updated to an incompatible version, the ABI_VERSION shall be changed accordingly to prevent opkg from simply upgrading to an incompatible library without considering the dependencies of already installed packages. Also introduce another "SourceName" control field which is required by the newly introduced "scritps/ipkg-remove" to determine the proper related .ipk files to delete upon buildroot package clean operations. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* imagebuilder: reuse rootfs preparation from rootfs.mkMatthias Schiffer2018-03-071-0/+1
| | | | | | | | | | | | In addition to removing redundant code, this fixes various issues in IB-generated images that have been fixed in prepare_rootfs before, including better handling of CONFIG_CLEAN_IPKG and enabling of initscripts from FILES. We also reuse the opkg macro and remove --force-... flags that have been removed from rootfs.mk as well. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* include/rootfs.mk: pass additional files dir to prepare_rootfs as an argumentMatthias Schiffer2018-03-071-1/+1
| | | | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* build: remove package preconfig featureMatthias Schiffer2018-01-131-3/+0
| | | | | | | 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>
* build: cleanup tmp/ dir of target rootfsYousong Zhou2017-05-021-1/+1
| | | | Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* build: skip opkg host dependency within the SDKFelix Fietkau2017-02-211-1/+3
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: move opkg host dependency from package/install to package/compileFelix Fietkau2017-02-211-1/+3
| | | | | | | Improves parallel build behavior, since it allows opkg to be built at the same time as other packages Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: make <subdir>/install opt-in, use it for target/ onlyFelix Fietkau2017-02-091-1/+0
| | | | | | | Fixes buildbot errors on running make target/install or toolchain/install Signed-off-by: Felix Fietkau <nbd@nbd.name>
* Revert "build: always run package/cleanup before package/compile"Felix Fietkau2017-01-221-2/+1
| | | | | | | This reverts commit 2990a21058243b067bb56fed36ee69205595993e. This introduces a race condition, let's fix this in buildbot instead. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: always run package/cleanup before package/compileFelix Fietkau2017-01-221-1/+2
| | | | | | | Remove unnecessary stampfile indirection Fixes an issue with the command sequence used by buildbot Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: fix triggering opkg/host compilationJo-Philipp Wich2017-01-191-1/+1
| | | | | | | | | | | Commit 131db36 "build: remove separate /install step for host builds" dropped the package/*/host/install targets in favor to performing the install steps within the compile target instead. Adjust package/Makefile accordingly in order to prevent a missing staging_dir/host/bin/opkg when staging package archives into the rootfs. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: add support for automatically removing build dir contents during buildFelix Fietkau2017-01-181-0/+1
| | | | | | | | | This is used to save space on buildbot instances. If any part of a package needs to be rebuild, the whole package is rebuilt from scratch. Stamp files are preserved to allow dependency checks to work Signed-off-by: Felix Fietkau <nbd@nbd.name>
* opkg: drop S/MIME supportFelix Fietkau2017-01-101-28/+0
| | | | | | | | | | It has never been used by default (due to being too bloated), and it is properly replaced by usign (which has been the default for a long time now). Remove this feature to simplify the build system Signed-off-by: Felix Fietkau <nbd@nbd.name>
* package/Makefile & ipkg-make-index.sh: add full package data listAlberto Bursi2016-12-261-1/+2
| | | | | | | | | | | | | | | | | | | The external script used to generate the package lists for the LEDE wiki's table of packages [1] and package indexes [2] requires a "Source:" field in the package lists to find package makefiles. The package makefiles are used to read the package's Category and Submenu. The "Source:" field was removed in commit b4aa3c899cbf1f81cd8a1ea197481ac84a9d646e to reduce package list sizes and lessen opkg issues in low ram devices. Add a separate package list file with full data to be used by the wiki's script. It's called Packages.manifest and isn't compressed as it's not necessary. 1. https://lede-project.org/packages/start 2. https://lede-project.org/packages/index/start Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
* build: add CHECK_ALL variable to allow make download/check to include not ↵Felix Fietkau2016-12-171-0/+4
| | | | | | selected packages Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: implement make check and make package/X/checkFelix Fietkau2016-12-171-0/+1
| | | | | | | | | | | | | | | | This is intended to be used for a wide array of package sanity checks. The first check that is implemented is for the hash of downloaded files. It checks: - Missing hash - Use of SHA256 instead of MD5 - dl/<file> hash not matching hash in makefile - deprecated MD5SUM variable The deprecated MD5SUM variable check is skipped for feeds/ until OpenWrt is updated as well Signed-off-by: Felix Fietkau <nbd@nbd.name>
* image: fix CONFIG_CLEAN_IPKG with CONFIG_TARGET_PER_DEVICE_ROOTFSMatthias Schiffer2016-09-251-1/+4
| | | | | | | | | | | Running prepare_rootfs on TARGET_DIR deletes the opkg state when CONFIG_CLEAN_IPKG is enabled, making the per-device rootfs package install fail. To avoid this, create a copy of the TARGET_DIR before prepare_rootfs is run and use this as basis for per-device rootfs generation. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* build: create a package feed directory containing all packagesFelix Fietkau2016-08-011-1/+9
| | | | | | Needed for proper dependency handling for per-device rootfs Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add template for getting opkg package files from package namesFelix Fietkau2016-07-291-5/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: rework opkg command invocationFelix Fietkau2016-07-291-2/+7
| | | | | | Drop included $(XARGS), add support for passing target dir via parameter Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: rework prepare_rootfs to pass target dir via parameterFelix Fietkau2016-07-291-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: move rootfs processing code to include/rootfs.mk so it can be reused ↵Felix Fietkau2016-07-291-74/+2
| | | | | | later Signed-off-by: Felix Fietkau <nbd@nbd.name>
* include: choose package output directory based on repository infoJo-Philipp Wich2016-04-061-16/+7
| | | | | | | | | | | Use the new repository metadata field to choose the output directory of the final package archives. Non-sharable packages will be placed in the per-target package directory while the rest will be placed in a per-repository sub directory within the $OUTPUT_DIR/packages/$CPU_TYPE/ prefix. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* package: remove .git files from imagesHauke Mehrtens2016-04-171-0/+1
| | | | | | | | | | | If you have your ./files/ directory stored in a git repository, the .git will be included into images using precious space. This patch removes .git directories before packing images. Signed-off-by: Joerg Jungermann <jj@borkum.net> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 49180
* buildroot: apply IGNORE_ERRORS to host buildsJo-Philipp Wich2016-03-041-2/+5
| | | | | | | | | Apply the error ignore mechanism to host builds as well in order to skip over broken feed packages. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48918
* package/Makefile: override opkg installation time when SOURCE_DATE_EPOCH setFelix Fietkau2016-01-311-0/+1
| | | | | | | Signed-off-by: Alexander Couzens <lynxis@fe80.eu> Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48585
* include: group kmod ipk files into a "kernel" subdirectoryJo-Philipp Wich2016-01-241-2/+2
| | | | | | | | | | 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
* build: add opkg host dependencyFelix Fietkau2015-12-131-1/+1
| | | | | | | | | fixes a missing host opkg found by: unselect base-files, opkg Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de> SVN-Revision: 47885
* build: Prevent more gzip timestampsJohn Crispin2015-07-141-1/+1
| | | | | | | | | To improve reproducibility, prevent the inclusion of timestamps in the gzip header. Signed-off-by: Reiner Herrmann <reiner@reiner-h.de> SVN-Revision: 46361
* fix mklibs with muslMatteo Croce2015-06-251-1/+1
| | | | | | | crate a relative symlink to libc.so because make wildcard function ignores broken symlinks SVN-Revision: 46123
* build: do another init script enabling run, fixes init scripts added via ↵Felix Fietkau2015-06-141-0/+4
| | | | | | | | files/ (#19857) Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45964
* build: trigger pacakge index creation for all feeds if requiredJo-Philipp Wich2015-05-261-1/+5
| | | | | | | | | When CONFIG_PER_FEED_REPO_ADD_DISABLED is set, trigger index creation for any available feed, regardless of whether there where binaries built or not. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 45765
* build: allow creating empty package feedsFelix Fietkau2015-05-261-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45757
* build: add integration for managing opkg package feed keysFelix Fietkau2015-04-061-0/+9
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 45286
* postinst trigger: the new postinst trigger broke IBJohn Crispin2014-09-161-3/+3
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42571
* ipkg: add a default postinst/prerm scriptJohn Crispin2014-09-111-1/+2
| | | | | | | | | | | the postinst script enables/starts the init.d scripts upon package installation and installs the users required by the package. the prerm script stops and disables the init.d scripts. Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 42470
* build: consider sub-directories when deploying packages to image with ↵Jo-Philipp Wich2014-08-071-1/+1
| | | | | | | | CONFIG_PER_FEED_REPO (#17430) Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 42041
* build: introduce per feed repository supportJo-Philipp Wich2014-08-051-4/+17
| | | | | | | | | 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
* package/Makefile: Substituted deprecated -perm +mode with -perm /modeJohn Crispin2014-06-021-1/+1
| | | | | | | | | | | The find(1) -perm +mode is no longer supported and has been deprecated since 2005. This could resolve #13855 ticket. Signed-off-by: Rocco Folino <lordzen87@gmail.com> SVN-Revision: 40927
* package: ignore failed downloads with IGNORE_ERRORSJo-Philipp Wich2014-05-141-0/+1
| | | | | | | | | | When IGNORE_ERROR is set, also skip broken downloads, this is required to make a full "make download" run even if some upstream sources are unreachable. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 40768
* target/sdk: use .config instead of unconditionally enabling all build dirsFelix Fietkau2014-03-131-5/+2
| | | | | | | | Call make defconfig on every build to catch newly added packages Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39913
* build: fix installation of default-variant packages when the source package ↵Felix Fietkau2014-03-121-1/+1
| | | | | | | | has multiple variants (#15237) Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39899
* package/index: fix index creating when building without signingSteven Barth2013-10-021-4/+4
| | | | | | Signed-off-by: Alexander Couzens <lynxis@fe80.eu> SVN-Revision: 38287
* Add package signing infrastructureSteven Barth2013-10-021-3/+28
| | | | | | | | | | | | | Add package signing key and certificate configuration options to the "Image configuration" submenu. If enabled, the Packages.gz list will be signed as file Packages.sig. The passphrase for the signing key can be sourced from a file or entered by the user. The signing certificate is automatically added to the firmware image if opkg-smime is selected. Signed-off-by: Evan Hunt <each@isc.org> Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 38284
* mklibs: Fix mklibs usage when *.so files reside in subdirsFelix Fietkau2013-08-261-5/+3
| | | | | | | | | | | Currently package/Makefile only passes /lib /usr/lib and /usr/lib/ebtables to mklibs. However, other libs can also reside in different subdirectories (in my case /usr/lib/ipsec). Hence, create the list of library directories dynamically. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> SVN-Revision: 37841