aboutsummaryrefslogtreecommitdiff
path: root/include/quilt.mk
Commit message (Collapse)AuthorAge
* quilt.mk: don't error on refresh/update if patches doesn't existChristian Marangi2023-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code fails if we have package or host tools with no patches to apply. The error printend is the following: (taking ubus as an example) make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/scripts/config' make[2]: 'conf' is up to date. make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/scripts/config' make[1]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt' make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/package/system/ubus' The source directory contains no quilt patches. make[2]: *** [Makefile:81: quilt-check] Error 1 make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/package/system/ubus' time: package/system/ubus/refresh#0.06#0.00#0.07 ERROR: package/system/ubus failed to build. make[1]: *** [package/Makefile:120: package/system/ubus/refresh] Error 1 make[1]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt' make: *** [/home/ansuel/openwrt-ansuel/openwrt/include/toplevel.mk:232: package/ubus/refresh] Error 2 We exit 1 after saying that there are no patches because later in the function quilt pop fails to execute. Having no patches for a package and calling refresh should not be a critical error and the function should just do nothing. To handle this improve quilt.mk with the following addition. - If we don't have any patch for the package, we print a warning and we create an empty series. This is useful to trick quilt and make it do nothing. We also create a status file .quilt_no_patch to detect in the other function that we don't have patches to handle. - In refresh makefile target, we check if .quilt_no_patch exist and we skip quilt cleanup if this exist. - In RefreshDir function we change the logic and now we delete the patches directory and not only the content. This is done as a cleanup to clean case with empty patches directory. - In RefreshDir we check if .quilt_no_patch exist and we skip creating the patches directory and copying the refreshed patches. - In RefreshDir we delete at the end any trace of .quilt_no_patch if present. This is needed to support run like package/refresh that will run the refresh process on any package present in the buildroot. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* quilt.mk: use CURDIR instead of ./ for PATCH_DIR and FILES_DIRChristian Marangi2023-10-06
| | | | | | | | | | To better reference them for diagnostic use, reference the PATCH_DIR and FILES_DIR with the absolute path instead of using ./ and reference by the relative location. No behaviour change intended. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* quilt.mk: fix typo in the Host sectionRosen Penev2022-03-19
| | | | | | | | HOST_PATCH_DIR is used for host patches, not PATCH_DIR. Fixes refreshing patches with a custom HOST_PATCH_DIR. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* build: introduce $(MKHASH)Leonardo Mörlein2021-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, it was assumed that mkhash is in the PATH. While this was fine for the normal build workflow, this led to some issues if make TOPDIR="$(pwd)" -C "$pkgdir" compile was called manually. In most of the cases, I just saw warnings like this: make: Entering directory '/home/.../package/gluon-status-page' bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found bash: line 1: mkhash: command not found [...] While these were only warnings and the package still compiled sucessfully, I also observed that some package even fail to build because of this. After applying this commit, the variable $(MKHASH) is introduced. This variable points to $(STAGING_DIR_HOST)/bin/mkhash, which is always the correct path. Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
* build: use SPDX license tagsPaul Spooren2021-02-05
| | | | | | | | | The license folder is a core part of OpenWrt and all GPL-2.0 licensed. Use SPDX license tags to allow machines to check licenses. Signed-off-by: Paul Spooren <mail@aparcar.org> [rebase, keep some Copyright lines, sharpen commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* build: Use LINUX_DIR for Kernel/PatchMichal Hrusecky2019-01-30
| | | | | | | | Use LINUX_DIR as a path when patching kernel. Doesn't break the current usage, but allows to create packages that will contain variation of a kernel with kernel being build in some subdirectory of PKG_BUILD_DIR. Signed-off-by: Michal Hrusecky <michal.hrusecky@nic.cz>
* kernel: split patches folder up into backport, pending and hack foldersJohn Crispin2017-08-05
| | | | | | | | | | | | | | | | | | | | * properly format/comment all patches * merge debloat patches * merge Kconfig patches * merge swconfig patches * merge hotplug patches * drop 200-fix_localversion.patch - upstream * drop 222-arm_zimage_none.patch - unused * drop 252-mv_cesa_depends.patch - no longer required * drop 410-mtd-move-forward-declaration-of-struct-mtd_info.patch - unused * drop 661-fq_codel_keep_dropped_stats.patch - outdated * drop 702-phy_add_aneg_done_function.patch - upstream * drop 840-rtc7301.patch - unused * drop 841-rtc_pt7c4338.patch - upstream * drop 921-use_preinit_as_init.patch - unused * drop spio-gpio-old and gpio-mmc - unused Signed-off-by: John Crispin <john@phrozen.org>
* build: fix kernel refresh failure on first runJonas Gorski2017-06-04
| | | | | | | | Override {HOST_}QUILT before making decisions based on it, else it will cause target/linux/refresh to fail on first run. Fixes: 36ba6237d6e3a23fbeadcc1812a892faa4b07cbe ("build: fix quilt for mixed package/host builds") Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
* build: fix quilt for mixed package/host buildsFelix Fietkau2017-05-25
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: set QUILT=1 automatically when calling package host build refreshFelix Fietkau2017-05-25
| | | | | | Makes behavor consistent with package builds and regular host builds Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: disable CONFIG_AUTOREMOVE for packages/tools where QUILT is usedFelix Fietkau2017-01-19
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: use mkhash to replace various quirky md5sum/openssl callsFelix Fietkau2017-01-05
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: make the kernel build auto-clean the build dir like package buildsFelix Fietkau2016-08-05
| | | | | | Previous behavior can be restored by using QUILT=1 on target/prepare Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: for refresh, override HOST_QUILT like QUILTFelix Fietkau2015-12-11
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 47868
* include: remove trailing whitespacesLuka Perkov2015-03-29
| | | | | | Signed-off-by: Luka Perkov <luka@openwrt.org> SVN-Revision: 45127
* quilt: add a NO_RECONFIGURE override for compiling a package without ↵Felix Fietkau2012-02-13
| | | | | | re-running Build/Configure SVN-Revision: 30500
* silence error when package has no patches (patchwork 321)Jo-Philipp Wich2011-04-12
| | | | SVN-Revision: 26627
* quilt.mk: export PATCH for patch-kernel.shJo-Philipp Wich2010-10-08
| | | | SVN-Revision: 23315
* rename PATCH to KPATCHJo-Philipp Wich2010-10-07
| | | | SVN-Revision: 23286
* fix the path to the build dir for host packagesFelix Fietkau2009-03-23
| | | | SVN-Revision: 14998
* fix HOST_QUILT overrideFelix Fietkau2009-03-23
| | | | SVN-Revision: 14996
* speed up quilt importsFelix Fietkau2009-03-23
| | | | SVN-Revision: 14987
* fix quilt variable and stampfile usage for host buildsFelix Fietkau2009-03-17
| | | | SVN-Revision: 14910
* move host build in packages into a separate namespace: ↵Felix Fietkau2009-03-17
| | | | | | package/<name>/host/<target> this allows dependencies between host and target packages, and saves unnecessary host builds for packages that contain both variants SVN-Revision: 14905
* replace a few unnecessary $(shell) callsFelix Fietkau2009-03-03
| | | | SVN-Revision: 14739
* speed up metadata scanning a lot by avoiding unnecessary shell commands and ↵Felix Fietkau2009-03-03
| | | | | | make recursions SVN-Revision: 14734
* allow a separate patch directory for host patchesFelix Fietkau2009-02-22
| | | | SVN-Revision: 14630
* eliminate redundancy by creating the quilt_used stampfile in the right placeFelix Fietkau2009-02-22
| | | | SVN-Revision: 14620
* fix missing change from r14610Felix Fietkau2009-02-22
| | | | SVN-Revision: 14617
* build system refactoring in preparation for allowing packages to do ↵Felix Fietkau2009-02-22
| | | | | | host-build steps SVN-Revision: 14610
* prevent quilt from loading any configuration file (closes: #4520)Nicolas Thill2009-02-02
| | | | SVN-Revision: 14351
* if quilt failed whilst patching, no output was shownJohn Crispin2009-01-25
| | | | SVN-Revision: 14178
* do not ignore exit codes of quilt anymore (by nbd)Mirko Vogt2009-01-22
| | | | SVN-Revision: 14149
* fix prepare error with brcm-2.4 and missing files/ (thx, thepeople)Felix Fietkau2008-10-21
| | | | SVN-Revision: 13021
* change the way ./files* and the generic kernel files are applied. ./files ↵Felix Fietkau2008-10-18
| | | | | | now applies to *ALL* kernel versions, and is copied along with ./files-* - this gets rid of quite a bit of redundancy in the extra kernel drivers. SVN-Revision: 13010
* add function names to quilt-generated patch files to make patches more readableFelix Fietkau2008-10-10
| | | | SVN-Revision: 12938
* enable quilt by default for the kernel treeFelix Fietkau2008-08-27
| | | | SVN-Revision: 12400
* upstream style quilt refreshImre Kaloz2008-06-04
| | | | SVN-Revision: 11350
* override user/system specific quilt configurationImre Kaloz2008-05-30
| | | | SVN-Revision: 11295
* add optional version suffix to kernel files/ directoriesFelix Fietkau2008-04-28
| | | | SVN-Revision: 10972
* clean up reject files after copying target/linux/*/files to the kernel treeFelix Fietkau2008-04-03
| | | | SVN-Revision: 10722
* fix quilt apply for packages that change STAMP_*Felix Fietkau2007-11-10
| | | | SVN-Revision: 9531
* fix accidental double slash in prefixed quilt patchsetsFelix Fietkau2007-10-07
| | | | SVN-Revision: 9166
* fix quilt patch checkFelix Fietkau2007-10-04
| | | | SVN-Revision: 9121
* separate series file fixup from quilt check to avoid series file breakages ↵Felix Fietkau2007-10-04
| | | | | | after fixing a broken patch stack with quilt SVN-Revision: 9120
* fix quilt integrationTim Yardley2007-10-02
| | | | SVN-Revision: 9100
* fixes for refresh/update handlingFelix Fietkau2007-09-29
| | | | SVN-Revision: 9063
* move a stampfile to make it easier to override the patch templateFelix Fietkau2007-09-29
| | | | SVN-Revision: 9062
* refactor quilt patching codeFelix Fietkau2007-09-29
| | | | SVN-Revision: 9061
* proper series file support for regular packagesFelix Fietkau2007-09-29
| | | | SVN-Revision: 9059