You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/include
Jo-Philipp Wich 5f3c96c285 build: adjust version number handling
Move the revision info to the VERSION_CODE variable and default VERSION_NUMBER
to CURRENT for master branch builds.

Also introduce a new menuconfig option CONFIG_VERSION_CODE which allows users
to override the revision value put into VERSION_CODE and adjust the template
files used by the base-files package to accomodate for the changed semantics.

While we're at it, also adjust the various URLs to match the current web site.

After this commit, the relevent files will look like the examples given below:

    # cat /etc/openwrt_version
    r2398+1

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='CURRENT'
    DISTRIB_REVISION='r2398+1'
    DISTRIB_CODENAME='reboot'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Reboot CURRENT r2398+1'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="CURRENT, Reboot"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Reboot CURRENT"
    VERSION_ID="current"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2398+1"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Reboot CURRENT r2398+1"

On a release branch, those files would look like:

    # cat /etc/openwrt_version
    r2399

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='16.12-CURRENT'
    DISTRIB_REVISION='r2399'
    DISTRIB_CODENAME='test_release'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Test Release 16.12-CURRENT r2399'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="16.12-CURRENT, Test Release"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Test Release 16.12-CURRENT"
    VERSION_ID="16.12-current"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2399"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Test Release 16.12-CURRENT r2399"

On a release tag, those files would look like:

    # cat /etc/openwrt_version
    r2500

    # cat /etc/openwrt_release
    DISTRIB_ID='LEDE'
    DISTRIB_RELEASE='17.02.1'
    DISTRIB_REVISION='r2500'
    DISTRIB_CODENAME='mighty_unicorn'
    DISTRIB_TARGET='x86/64'
    DISTRIB_DESCRIPTION='LEDE Mighty Unicorn 17.02.1 r2500'
    DISTRIB_TAINTS='no-all override'

    # cat /usr/lib/os-release
    NAME="LEDE"
    VERSION="17.02.1, Mighty Unicorn"
    ID="lede"
    ID_LIKE="lede openwrt"
    PRETTY_NAME="LEDE Mighty Unicorn 17.02.1"
    VERSION_ID="17.02.1"
    HOME_URL="http://lede-project.org/"
    BUG_URL="http://bugs.lede-project.org/"
    SUPPORT_URL="http://forum.lede-project.org/"
    BUILD_ID="r2500"
    LEDE_BOARD="x86/64"
    LEDE_TAINTS="no-all override"
    LEDE_DEVICE_MANUFACTURER="LEDE"
    LEDE_DEVICE_MANUFACTURER_URL="http://lede-project.org/"
    LEDE_DEVICE_PRODUCT="Generic"
    LEDE_DEVICE_REVISION="v0"
    LEDE_RELEASE="LEDE Mighty Unicorn 17.02.1 r2500"

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Acked-by: Felix Fietkau <nbd@nbd.name>
8 years ago
..
site toolchain: add support of ARC architecture 9 years ago
autotools.mk autotools: use correct version for gettext FIXUP 8 years ago
cmake.mk build: use CXXFLAGS if defined 8 years ago
debug.mk include: remove trailing whitespaces 9 years ago
depends.mk build: find_md5: ignore non-existent files or directories 8 years ago
device_table.txt image: ensure that /dev/console exist in rootfs images 11 years ago
download.mk include/download.mk: Use -7e compression instead of -6 by default 8 years ago
feeds.mk build: remove stale .ipk files if package dir changes 8 years ago
hardening.mk hardening: make override variables more intuitive 9 years ago
host-build.mk include/host-build.mk: use STAGING_DIR_HOSTPKG 8 years ago
host.mk include: remove trailing whitespaces 9 years ago
image-commands.mk build: add support code for appending metadata to images 8 years ago
image-legacy.mk image: don't modify file permissions before rootfs generation 8 years ago
image.mk build: add support code for appending metadata to images 8 years ago
kernel-build.mk build: fix regression on running make kernel_menuconfig 8 years ago
kernel-defaults.mk kernel: add STAGING_DIR_HOST/lib to host library search path 8 years ago
kernel-version.mk kernel: bump to 4.4.35 8 years ago
kernel.mk kernel: make the kernel build auto-clean the build dir like package builds 8 years ago
netfilter.mk netfilter: fix file conflicts between kmod-ipt- and kmod-nft- packages 8 years ago
nls.mk nls.mk: add -rpath-link when needed for NLS support 9 years ago
package-bin.mk include: remove trailing whitespaces 9 years ago
package-defaults.mk build: copy contents of 'src' folder to build dirs (if present) 8 years ago
package-dumpinfo.mk include: fix nonshared flag handling 8 years ago
package-ipkg.mk build: remove stale .ipk files if package dir changes 8 years ago
package-seccomp.mk include: add a seccomp filter install wrapper 9 years ago
package.mk build: fix cleaning configured stamp file 8 years ago
prereq-build.mk include: prereq-build.mk: improve gcp check 8 years ago
prereq.mk build: do not overwrite already existing host commands 9 years ago
quilt.mk kernel: make the kernel build auto-clean the build dir like package builds 8 years ago
rootfs.mk build: remove stale .ipk files if package dir changes 8 years ago
scan.awk build: propagate override information to .packageinfo 9 years ago
scan.mk build: scan.mk: remove not used variable SCAN_STAMP 8 years ago
scons.mk build: use CXXFLAGS if defined 8 years ago
shell.sh include: remove trailing whitespaces 9 years ago
subdir.mk build: add logging for package host builds 8 years ago
target.mk include: Cortex-A53 is also an AArch64 CPU 8 years ago
toolchain-build.mk include: remove trailing whitespaces 9 years ago
toplevel.mk docs: remove all refrences in Makefiles/scripts 8 years ago
uclibc++.mk toolchain: eliminate the INSTALL_LIBSTDCPP config symbol and make c++ support mandatory - fixes recursive config symbol dependency issues 11 years ago
unpack.mk include: remove trailing whitespaces 9 years ago
verbose.mk build: tell users to do non-paralle builds on errors 9 years ago
version.mk build: adjust version number handling 8 years ago