build: let make check warn about use of legacy PKG_MD5SUM variable in feeds The variable rename change has been merged in OpenWrt now, so it's possible to convert the feeds as well. Signed-off-by: Felix Fietkau <nbd@nbd.name>
build: use mkhash to replace various quirky md5sum/openssl calls Signed-off-by: Felix Fietkau <nbd@nbd.name>
build: add defaults for PKG_SOURCE, PKG_SOURCE_SUBDIR, PKG_VERSION This makes it easier to unify versioning of git based package downloads. PKG_SOURCE_DATE along with an 8-character abbreviation of the git hash is used as PKG_VERSION, PKG_RELEASE should be used like normal packages. Signed-off-by: Felix Fietkau <nbd@nbd.name>
build: add FIXUP option for make check This will attempt to automatically fix common mistakes like using MD5 instead of SHA256, using the MD5SUM variable instead of HASH, or even a missing mirror file hash. Signed-off-by: Felix Fietkau <nbd@nbd.name>
build: implement make check and make package/X/check 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>
include/package.mk: sync default value for hash fallback with mirror hash Simplifies dealing with PKG_HASH vs PKG_MD5SUM Signed-off-by: Felix Fietkau <nbd@nbd.name>
build: remove duplicate Download/default definition from include/host-build.mk Signed-off-by: Felix Fietkau <nbd@nbd.name>
build: replace MD5SUM variables with HASH Since we've switched to preferring SHA256 over MD5, the old variable name is misleading. Packages using the old name remain compatible. Signed-off-by: Felix Fietkau <nbd@nbd.name>
download.mk: improve download tarball reproducibility Store only numeric user/group id. Group 0 is 'root' on linux and 'wheel' on BSD and Mac OS X. Signed-off-by: Felix Fietkau <nbd@nbd.name>
download.mk: remove code duplication in $(TAR) call Signed-off-by: Felix Fietkau <nbd@nbd.name>
download.mk: use $(error) instead of a regular shell error Useful for further rework Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/download.mk: Allow specify DownloadMethod specific options This is going to be used to migrate the hand rolled git clone for the kernel into using the git download method. The kernel uses custom options that we may have to pass down. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
include/download.mk: Use -7e compression instead of -6 by default Adds a slightly higher compression level to xz by default which roughly raises memory usage from 100MiB to about 200MiB during compression, about 10MiB for decompression. (Source: xz manpage) Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
include/download.mk: generate reproducable SCM tarballs Apply a number of changes to the tarball generation in order to produce identical files on different systems: 1) Use an explicit `gzip -cn` to avoid storing file mtime in the gzip header 2) Instruct `tar` to unconditionally use uid and gid 0 for archive members 3) Instruct `tar` to sort archive members by file name 4) For SCMs that do not preserve file modification times like Git or Mercurial, use the date of the last commit to the repository and pass it as `--mtime` value to `tar` After these changes, locally produced tarballs generated from SCM checkouts should be identical on any system, simplifying the mirroring of cache archives. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
download.mk: use HTTPS for git.lede-project.org Some Git versions have issues following the HTTP->HTTPS redirect and since the keyring package is fetched from this host, switching to HTTPS is a sensible choice anyway. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
include: add lede git server url Signed-off-by: John Crispin <john@phrozen.org>
download: add @GITHUB download facility Define a new alias (@GITHUB) for downloading raw files from github repos. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
download: add @GITHUB download facility Define a new alias (@GITHUB) for downloading raw github repository files Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> SVN-Revision: 49138
buildroot: improve git submodule handling for packages Move the `--recursive` switch from `git clone` to `git submodule` so that submodules are cloned for upstream branches where the PKG_SOURCE_VERSION commit-ish has a different .gitmodules configuration than the repository default. This is, for example, required when the master branch for a source package does not use submodules, but its topic branch for OpenWRT does. This changes the buildroot dependency from git-1.6.2 to git 1.7.12.2, which was released September 2012. Signed-off-by: Darik Horn <dajhorn@vanadac.com> Signed-off-by: Karl Palsson <karlp@tweak.net.au> SVN-Revision: 48830
download.mk: fix packed checkout mirroring support Changeset r48416 broke the downloading of mirrored, packed scm checkouts. Fix this by removing the "@" sign in front of the download command which is now executed as part of a larger shell command under flock. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 48733