From snapshot to stable release (22.03)

Hi,

I've been building my own image for the past year so I can have the proper support for my Pi3 B and set my storage to 30gigs instead of the default storage allocation.

I currently have my branch set to 22-03 and everything appears to be running smoothly :slight_smile:

git branch
master
* openwrt-22.03

My question is: once 22-03 is released, can I setup myself to only build off the stable release and not always be in a "snapshot"? I'd use the official sysupgrade files, however then I'd lose my setting for the added storage space by default and any other customizations I've made that I'd like installed/configured.

Another reason I'd like to stay with the official build is it makes it easier to update software and not be told my base-files are outdated and not being able to update them easily enough without breaking anything. :wink:

Thanks

You could checkout a specific tag. Something like git checkout tags/v22.03.0-rc6 might work for you :slight_smile:

2 Likes

To build a stable branch snapshot or tagged release really doesn’t matter.
It is the same build with different dates and the tagged releases is only a locked status of the snapshot that specific day.

So the least job for you is to have your commits on top of the stable branch snapshot and just choose when to build your build.
That setup will work the entire branch lifetime without you redoing the commits every release.

2 Likes

So I should just keep on doing what I’m doing right now? Just stay checked-out on the release tree or would you recommend something else?

I guess no matter what I’ll always end up with the build-files being outdated when trying to do software updates?

Thanks

Well this is a completely new question if you should upgrade or make a new build.

If you want to use opkg you are better off using tagged releases. But then you will have to do some work with your own commits if they are included in git status command.
Some local folders like files isn’t included in git status so they will be in the build root no matter what you build.

I don't make any code changes other than changing the default storage allocation using "make menuconfig", selecting some default software/packages I'd like installed and adding a custom theme (Argon Theme).

I just want to stay on a released branch (22.03) once it's out and not a snapshot. I guess using a tagged release would make more sense moving forward.

None of these are directly connected to the release checkout or is in a commit.
The .config for make menuconfig can be exported and saved as a text file since it will be lost in a make distclean command.
The only thing that maybe could be a small problem over time is the custom theme based on how you actually have linked the theme package to the build root packages?

I did a checkout tag v22.03.0 and these are the only files I added to the source:

`~/openwrt$ git status
HEAD detached at v22.03.0

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	package/base-files/files/etc/uci-defaults/17_modify_lan_ip
	package/luci-theme-argon/

nothing added to commit but untracked files present (use "git add" to track)`

I guess by doing that I can't update the source/etc using "git pull" when I'm in this "mode".

~/openwrt$ git pull && ./scripts/feeds update -a && ./scripts/feeds install -a

You are not currently on a branch.
Please specify which branch you want to merge with.

See git-pull(1) for details.
    git pull <remote> <branch>

Still learning how all of this works :wink:

Thanks

These will be locked to your checkout branch, so if you change the branch these will not be included.

But if you set up this on the 22.03-snapshot branch these files you have will be included as long as you have the build root on the computer.
But then the opkg will have some issues.

Is this script supposed to change something in the network config?

So, I'd have to re-add those files whenever I switch to a new branch?
Will the current branch I'm on stay current with a "pull origin v22.03.0" and not cause any issues with opkg? (like those base-files being outdated)

yeah, that was only to setup my default LAN to the private network ip range I'm using. It was only really needed if I did a fresh installation. I don't need to keep that file :wink:

custom files

Thanks! I never knew I could do that! :wink:

Would this work to include a custom theme I downloaded?
I used the instructions from https://github.com/jerrykuku/luci-theme-argon

Openwrt official SnapShots

cd openwrt/package
git clone https://github.com/jerrykuku/luci-theme-argon.git  
make menuconfig #choose LUCI->Theme->Luci-theme-argon  

Thanks!

That is probably a good script but that is not the problem here.
The files folder are supposed to be in the buildroot folder to get the compiler to care about it, just as the link @anomeome referred to.

Probably, the thing is that once you checked out a specific branch tag the evolution for that branch tag stops so there isn't really anything to pull for that brach tag.
It will never get updated because a branch tag is only the 22.03-snapshot freezed and named at a specific time.

The only thing that gets updated is master and the living branch snapshots.

But the only real functional difference if you build from 22.03-snapshot or 22.03.x is the text in luci saying what version you have installed.

The problem is if you try to install kmod packages with opkg on a snapshot build.
I guess most users that are so advanced that they build the software them self simply build a new image if they miss packages or set the interesting packages as ‘M’ when making the image.

I used this guide to create a build with a matching "vermagic" so hopefully I can continue to use OPKG to install kmod packages using the official repositories.

Also did this, had some minor changes as compared to the reference you shared:

git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git fetch -t
git checkout v22.03.0
wget https://downloads.openwrt.org/releases/22.03.0/targets/ath79/generic/config.buildinfo -O .config
./scripts/feeds update -a && ./scripts/feeds install -a
make defconfig
make target/linux/{clean,compile}
find build_dir/ -name .vermagic -exec cat {} \;
1 Like