Checkout a tagged release's source code (like v18.06.1)

I see. The commits were tagged on the same dates
https://git.openwrt.org/?p=openwrt/openwrt.git;a=shortlog;h=4ffed014a36b3d3ed9d71227adb8158ac8fd7564
as the release history shows
https://openwrt.org/releases/18.06/start

History

How is the date defined when a commit is getting tagged with e.g. 18.06.1? Is there a voting of the major contributors or something like that?

How do I get the 18.06.1 of the openwrt branch?
Do I get it if I
git clone https://github.com/openwrt/openwrt.git
cd openwrt/
(git fetch --tags)
git checkout v18.06.1
?
Or
git clone -b openwrt-18.06
git checkout v18.06.1

Yes.
Just like the three examples above (about various 17.01 tags) show.

Below is example about v18.06.1 for you.
(just for fun, as there is no new information compared to the previous examples except the current tag).

perus@ub1804:/Openwrt$ cd /tmp

perus@ub1804:/tmp$ git clone https://github.com/openwrt/openwrt.git
Cloning into 'openwrt'...
remote: Counting objects: 437912, done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 437912 (delta 36), reused 19 (delta 9), pack-reused 437815
Receiving objects: 100% (437912/437912), 151.66 MiB | 8.19 MiB/s, done.
Resolving deltas: 100% (296538/296538), done.

perus@ub1804:/tmp$ cd openwrt/

perus@ub1804:/tmp/openwrt$ git fetch --tags

perus@ub1804:/tmp/openwrt$ git tag -l
reboot
v17.01.0
v17.01.0-rc1
v17.01.0-rc2
v17.01.1
v17.01.2
v17.01.3
v17.01.4
v17.01.5
v17.01.6
v18.06.0
v18.06.0-rc1
v18.06.0-rc2
v18.06.1

perus@ub1804:/tmp/openwrt$ git checkout v18.06.1
Note: checking out 'v18.06.1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 70255e3d62 OpenWrt v18.06.1: adjust config defaults

perus@ub1804:/tmp/openwrt$ git log --oneline | head -n 3
70255e3d62 OpenWrt v18.06.1: adjust config defaults
5eb055306f rpcd: update to latest git HEAD
e11df1eac6 openssl: update to version 1.0.2p

Easy enough?

I am not very sure if we are on the same track. isn't it that your are constantly driving on the master branch?
My question - to be more precisely- was in regard to the openwrt-18.06 branch.

You do neither clone the openwrt-18.06 branch nor checkout this one.
My question was:
How do I get the version 18.06.1 of the openwrt-18.06 branch? If this is possible at all.
You mentioned:

frood@kalimero:~/Documents/git/openwrttest2$ git clone https://github.com/openwrt/openwrt.git
Cloning into 'openwrt'...
...
frood@kalimero:~/Documents/git/openwrttest2$ cd openwrt/
frood@kalimero:~/Documents/git/openwrttest2/openwrt$ git fetch --tags
...
frood@kalimero:~/Documents/git/openwrttest2/openwrt$ git tag -l
reboot
v17.01.0
v17.01.0-rc1
v17.01.0-rc2
v17.01.1
v17.01.2
v17.01.3
v17.01.4
v17.01.5
v17.01.6
v18.06.0
v18.06.0-rc1
v18.06.0-rc2
v18.06.1
frood@kalimero:~/Documents/git/openwrttest2/openwrt$ git show-branch 
[master] kernel: bump 4.14 to 4.14.70
frood@kalimero:~/Documents/git/openwrttest2/openwrt$ git checkout v18.06.1
Note: checking out 'v18.06.1'.
...
frood@kalimero:~/Documents/git/openwrttest2/openwrt$ git show-branch 
[master] kernel: bump 4.14 to 4.14.70

I there a difference if I do

git clone -b openwrt-18.06 --single-branch https://git.openwrt.org/openwrt/openwrt.git
Cloning into 'openwrt'...
...
frood@kalimero:~/Documents/git/openwrttest$ cd openwrt/
frood@kalimero:~/Documents/git/openwrttest/openwrt$ git fetch --tags
...
frood@kalimero:~/Documents/git/openwrttest/openwrt$ git tag -l
reboot
v17.01.0
v17.01.0-rc1
v17.01.0-rc2
v17.01.1
v17.01.2
v17.01.3
v17.01.4
v17.01.5
v17.01.6
v18.06.0
v18.06.0-rc1
v18.06.0-rc2
v18.06.1
frood@kalimero:~/Documents/git/openwrttest/openwrt$ git show-branch
[openwrt-18.06] uqmi: pass-through ipXtable to child interfaces
frood@kalimero:~/Documents/git/openwrttest2/openwrt$ git checkout v18.06.1
Note: checking out 'v18.06.1'.
frood@kalimero:~/Documents/git/openwrttest/openwrt$ git show-branch
[openwrt-18.06]

My understanding is that this is a build of the openwrt-18.06 branch
https://downloads.openwrt.org/releases/18.06.1/targets/

The structure of git is too complex for me to try to explain, but suffice to say you don't need to check out a particular branch to get the 18.06.1 tag. All you need to do is check out the master and select the tag using git checkout <tag>.

Which is good for me, since I want to build the latest greatest master version with ath79 support.
And I was just wondering what I could do wrong to checkout the "other" branch or what someone could do if someone wanted to build a specific version of the openwrt-18.06 branch - if this is possible at all.
Just theoretically and expandable. But still interesting since I do usually have less touch points with git.

ath79 does not exist in the openwrt-18.06 branch, nor any of the tagged 18.06.x releases - you can only use master for this (and most of the rather important developments happen long after 18.06 was branched off, so you really wouldn't want to use it in 18.06 anyways, even if it would exist).

yes... and expandable
i was just wondering, since in the download and release section there is " Current Stable Release - OpenWrt 18.06.1"
Is this all the master branch being compiled for download? Never the "openwrt-18.06" branch?

OpenWrt 18.06.1 is compiled off the openwrt-18.06 branch.

Current stable release is always compiled from the stable branch(es), currently 18.06 (and 17.01)
Current stable release is never compiled from master.

Openwrt follows this kind of branch strategy:

  • all development happens in master. It progresses on, but no releases are made of it.

  • before major releases, a release branch is branched off from master. This branch will get separate fix commits and releases are made of that. No new features (like ath79) are normally added to the release branches after the branching.
    In the picture below, you can see 17.01 branch and 18.06 branch with the releases made from them.

  • releases are made from individual commits in release branch. 18.06.0 would be the first balloon on that branch, 18.06.1 the next one etc. (intermediate commits between releases are omitted from picture)

So there can be no "18.06.1 of the openwrt (master) branch".

image

1 Like

I think you are being confused by using the wrong way to check which branch a tag belongs to. Try

git branch -a --contains v18.06.1

1 Like

Thank you very much! For developers using git it might be basic knowhow.
For me it explains a lot.

But it also means that I cannot pick (checkout) and build a "stable" specific version with ath79 support (for the archer C7 v2).

Correct, neither 18.06.1 nor the openwrt-18.06 branch contain the ath79 target at all (and even if they did, you really wouldn't want to use it, as crucial bugfixes only happened long after branching off 18.06).

When I tried to checkout the latest version using:

git checkout v18.06.1

I got this error:

error: Your local changes to the following files would be overwritten by checkout:
	package/base-files/files/bin/config_generate
	package/base-files/files/etc/init.d/led
	package/base-files/files/etc/rc.common
	package/base-files/files/lib/functions.sh
	package/base-files/files/lib/functions/uci-defaults.sh
	package/base-files/files/lib/upgrade/stage2
	package/base-files/files/sbin/sysupgrade
	package/base-files/files/sbin/urandom_seed
	package/base-files/files/sbin/wifi
	package/base-files/files/usr/libexec/login.sh
	package/kernel/lantiq/ltq-vdsl-fw/src/vdsl_fw_install.sh
	package/network/config/gre/files/gre.sh
	package/network/config/netifd/files/etc/init.d/network
	package/network/config/netifd/files/lib/network/config.sh
	package/network/config/qos-scripts/files/usr/bin/qos-start
	package/network/config/qos-scripts/files/usr/bin/qos-stop
	package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
	package/network/ipv6/map/files/map.sh
	package/network/ipv6/odhcp6c/files/dhcpv6.script
	package/network/ipv6/odhcp6c/files/dhcpv6.sh
	package/network/services/dropbear/files/dropbear.init
	package/network/services/ppp/files/ppp.sh
	package/network/services/samba36/files/samba.init
	package/network/services/uhttpd/files/uhttpd.init
	package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
	package/system/rpcd/files/rpcd.init
	package/system/zram-swap/files/zram.init
	scripts/bundle-libraries.sh
	scripts/config.guess
	scripts/config.sub
	scripts/dl_github_archive.py
	scripts/fixup-makefile.pl
	scripts/ipkg-build
	scripts/om-fwupgradecfg-gen.sh
	scripts/qemustart
	scripts/rstrip.sh
	scripts/slugimage.pl
	scripts/target-metadata.pl
	scripts/time.pl
	target/linux/adm5120/base-files/etc/board.d/01_leds
	target/linux/adm5120/base-files/lib/adm5120.sh
	target/linux/adm5120/rb1xx/base-files/sbin/wget2nand
	target/linux/adm8668/image/my-mkimage
	target/linux/apm821xx/base-files/etc/board.d/01_leds
	target/linux/apm821xx/base-files/etc/board.d/02_network
	target/linux/apm821xx/base-files/etc/rc.button/BTN_1
	target/linux/apm821xx/base-files/lib/upgrade/platform.sh
	target/linux/apm821xx/image/mbl_gen_hdd_img.sh
	target/linux/ar71xx/base-files/etc/board.d/01_leds
	target/linux/ar71xx/base-files/etc/board.d/02_network
	target/linux/ar71xx/base-files/lib/ar71xx.sh
	target/linux/ar71xx/base-files/lib/upgrade/platform.sh
	target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar750s.c
	target/linux/ath79/base-files/etc/board.d/01_leds
	target/linux/ath79/base-files/etc/board.d/02_network
	target/linux/ath79/base-files/etc/board.d/03_gpio_switches
	target/linux/ath79/base-files/lib/functions/k2t.sh
	target/linux/brcm63xx/base-files/etc/board.d/02_network
	target/linux/brcm63xx/base-files/lib/brcm63xx.sh
	target/linux/imx6/base-files/etc/board.d/02_network
	target/linux/imx6/base-files/lib/imx6.sh
	target/linux/ipq40xx/base-files/etc/board.d/01_leds
	target/linux/ipq40xx/base-files/etc/board.d/02_network
	target/linux/ipq806x/base-files/etc/board.d/01_leds
	target/linux/ipq806x/base-files/etc/board.d/02_network
	target/linux/kirkwood/base-files/etc/board.d/01_leds
	target/linux/kirkwood/base-files/etc/board.d/02_network
	target/linux/kirkwood/base-files/etc/diag.sh
	target/linux/kirkwood/base-files/etc/init.d/hwmon_fancontrol
	target/linux/lantiq/base-files/etc/board.d/01_leds
	target/linux/lantiq/base-files/etc/board.d/02_network
	target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
	target/linux/lantiq/base-files/lib/upgrade/platform.sh
	target/linux/layerscape/armv7/config-4.14
	target/linux/layerscape/base-files/etc/board.d/01_led
	target/linux/layerscape/base-files/etc/board.d/02_network
	target/linux/layerscape/base-files/etc/board.d/03_gpio_switches
	target/linux/layerscape/image/gen_sdcard_head_img.sh
	target/linux/layerscape/image/mkits-multiple-config.sh
	target/linux/mcs814x/base-files/etc/board.d/01_leds
	target/linux/mcs814x/base-files/etc/board.d/02_network
	target/linux/mcs814x/base-files/lib/preinit/01_preinit_do_mcs814x.sh
	target/linux/mediatek/base-files/etc/board.d/02_network
	target/linux/mediatek/base-files/lib/upgr
Aborting

What could be the reason?

normal git stuff.

You do not have a clean local repo, but instead there are local edits to some files. You need to stash them first, or otherwise cleanup the repo first.

How to clean the local repo given than I just cloned it .. didn't touch anything after cloning .. then I directly did the checkout step!

You may be doing something wrong.
I tested cloning & checkout of v18.06.1 earlier today, as shown here, and it worked quite ok:

The commands needed for a clean clone a really simple:

git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git checkout v18.06.1
1 Like

OpenWrt 18.06.2, r7676-cddd7b4c77

  • cddd7b4c77 is a git commit hash though it does not correspond to the v18.06.2 tag
  • what is r7676, where does it come from?

Could you please explain how that release string is generated and what it means? Thank you.

cddd7b4c77 is the parent of v18.06.2, see git log v18.06.2

https://openwrt.org/docs/guide-developer/source-code/source-revision-calculation

2 Likes

cddd7b4c77 is the previous commit before the tag, like mpa said.
Log of commits leading to the tag can be seen at:
https://github.com/openwrt/openwrt/commits/v18.06.2

As the version r7676-cddd7b4c77 is included by the "release commit" to the source code, the hash always shows the previous commit, the last real source code change.
Release commit: OpenWrt v18.06.2: adjust config defaults

2 Likes