Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feeds: use git-src-full to allow Git versioning #4669

Closed
wants to merge 1 commit into from

Conversation

aparcar
Copy link
Member

@aparcar aparcar commented Oct 11, 2021

Both $(AUTORELEASE) and $(PKG_SRC_VERSION) (from luci.git) use the Git
log to determine releases and package timestamps.

Feeds are shallow cloned by default, resulting in an incomplete Git log
and therefore different local package versions than offered upstream.

This commits sets the default feeds to use src-git-full to solve that.

Signed-off-by: Paul Spooren mail@aparcar.org

@hnyman
Copy link
Contributor

hnyman commented Oct 11, 2021

Please also fix the git pull --ff-only usage (in three places in src-git-full).

I only fixed the traditional src-git with #3610 / commit 2b1d92f
but the src-git-full remained unfixed at that time.

Both $(AUTORELEASE) and $(PKG_SRC_VERSION) (from luci.git) use the Git
log to determine releases and package timestamps.

Feeds are shallow cloned by default, resulting in an incomplete Git log
and therefore different local package versions than offered upstream.

This commits sets the default feeds to use `src-git-full` to solve that.

Add fixes from "2b1d92f: scripts/feeds: silence git warning by selecting
pull style" to `src-git-full`

Signed-off-by: Paul Spooren <mail@aparcar.org>
@aparcar
Copy link
Member Author

aparcar commented Oct 11, 2021

Done.

@adschm adschm added the build/scripts/tools pull request/issues for build, scripts and tools related changes label Oct 12, 2021
@hnyman
Copy link
Contributor

hnyman commented Oct 12, 2021

@aparcar
How about an alternative approach: instead of editing the feeds definition files, just rename the src-git variants in script/feeds:
src-git-full --> src-git
src-git --> src-git-shallow (or src-git-small)

That way the feeds.conf.default would not need to be changed, as just the behaviour of src-git would change for future clones.

This should likely be backported also into 21.02, where AUTORELEASE is already used.

Ps.
To mitigate the change for the (likely really small) minority who have used src-git-full in their local feed definitions, there might be an "or" in style of
'src-git' => {
changed to
('src-git' or 'src-git-full') => {

(Not sure about the correct perl syntax...)

@hnyman
Copy link
Contributor

hnyman commented Feb 12, 2022

@aparcar
Are you proceeding with this?

@aparcar
Copy link
Member Author

aparcar commented Feb 12, 2022

Thanks for the reminder, I'll do that later today!

@aparcar
Copy link
Member Author

aparcar commented Feb 13, 2022

I'm somewhat against "forcing" that behavior onto users, I'd just proceed with the change suggested and future setup start using it. Especially CI would get "fixed" by this.

@hnyman
Copy link
Contributor

hnyman commented Feb 14, 2022

Your original approach is just fine. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/scripts/tools pull request/issues for build, scripts and tools related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants