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

ci: add multi branch build; add initial support for apk #1139

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

a-gave
Copy link
Contributor

@a-gave a-gave commented Nov 17, 2024

These changes are made:

Details:
chore: add include libremesh.mk in more packages
modify various packages to use libremesh.mk
related to the issue #766
drop the package lua-argparse since it is available in openwrt feeds.

modify PKG_VERSION to follow apk semantics:
use by default $(GIT_COMMIT_DATE)$(GIT_COMMIT_TSTAMP)
like 2024.11.16
1731788517
if a specific PKG_VERSION is not defined
From openwrt/packages:
Preparations to switch to APK package manager openwrt/packages#23706

ci: update feeds scheme to build C++ packages for 3 latest openwrt branches
the new scheme make these packages available at
https://github.com/libremesh/lime-feed/
referenced by apk in /etc/apk/repositories as
@libremesh_arch_packages https://feed.libremesh.org/arch_packages/master/openwrt_main/x86_64/packages.adb

ci: disable sign packages in main openwrt branch
not yet supported, there is an active pull
Support sign apk feed openwrt/gh-action-sdk#46

to install packages use "apk add --allow-untrusted lime-docs"

lime-system: add apk option in 92_add-lime-repos
chore: update README.md with instruction for apk

@a-gave a-gave changed the title Ci: multi branch build ci: add multi branch build; add initial support for apk Nov 17, 2024
@a-gave a-gave force-pushed the ci/multi_branch_build branch from 1ec656c to 4c60693 Compare November 17, 2024 16:31
@a-gave
Copy link
Contributor Author

a-gave commented Nov 17, 2024

push un-pushed fixes: external_repositories was set to fork.

update apk repositories file to reflect latest changes in openwrt,
creating a /etc/apk/repositories.d/limefeeds.list for lime-packages:
apk: add a customfeeds.list configuration file
base-files: move apk distfeeds into directory

@ilario
Copy link
Member

ilario commented Nov 17, 2024

Wow this is a huge amount of work!
Do you think we should include this in the upcoming 2024.1 release or is it ok to leave it for a next release?
Is this also related to #1135 ?

@a-gave
Copy link
Contributor Author

a-gave commented Nov 17, 2024

I'm doing some fixes [done]

the new workflow build.yml should be added soon because next push will use openwrt-main with apk, thus not building almost every lime-packages because of incorrect PKG_VERSION

Yes it is related 1135 to because to use shared-state-async on new builds based on 24.10.x or 23.05.x you should use the feed libremesh_arch_packages if you look for a precompiled one, es:
https://feed.libremesh.org/arch_packages/master/openwrt_23.05/mips_24kc/

@a-gave a-gave force-pushed the ci/multi_branch_build branch from 4c60693 to 5061394 Compare November 17, 2024 18:59
@a-gave
Copy link
Contributor Author

a-gave commented Nov 17, 2024

it should be now ready
the workflow multi-arch-build was failing on publishing packages but it should be ok now, i'm testing with all archs

@a-gave
Copy link
Contributor Author

a-gave commented Nov 17, 2024

I confirm that the fail on publishing is fixed since packages are now produced in this fork
https://github.com/a-gave/lime-feed/tree/gh-pages/arch_packages/master/

I updated the description adding more notes on this.

@a-gave
Copy link
Contributor Author

a-gave commented Nov 17, 2024

Just noticed the fail of job build packages with Merge pull request #1133 from henmohr/issue/1077
https://github.com/libremesh/lime-packages/actions/runs/11881297358
and add another note on the description mentioning the update of openwrt-sdk-action

modify various packages to use libremesh.mk.
drop the package lua-argparse since it is available in openwrt feeds.
adapt packages to apk version schema.
lime-system: add apk option in 92_add-lime-repos

ci: update feeds scheme to build C++ packages for 3 lastest openwrt branches
      the new scheme make these packages available at
      https://github.com/libremesh/lime-feed
      referenced by apk in /etc/apk/repositories as
      @libremesh_arch_packages https://feed.libremesh.org/arch_packages/master/openwrt_main/x86_64/packages.adb

ci: disable sign packages in main openwrt branch
      not yet supported, there is an active pull
      Support sign apk feed openwrt/gh-action-sdk#46
      to install packages use "apk add --allow-untrusted lime-docs"
replace openwrt_branch_path from 'openwrt_main' to 'openwrt-main'
@a-gave a-gave force-pushed the ci/multi_branch_build branch from 01c15f0 to a78341b Compare December 7, 2024 19:28
@a-gave a-gave marked this pull request as draft December 7, 2024 19:32
@javierbrk
Copy link
Collaborator

Amazing job !!
I did a similar task a couple of weeks ago, while building images for librerouter sadly I run out of space after switching to the new openWrt version. The good news is that the kernel can be reduced in size and i managed to get some usable images.

There are some options that may be useful to make the kernel lose some weight. All of them related to the SMALL_FLASH flag.
Here is a list of relevant flags to take into account. I 'll mention them just in case you need them.

config KERNEL_MPTCP
bool "Multi-Path TCP support"
default y if !SMALL_FLASH
help
Select this option to enable support for Multi-Path TCP.
Increases the compressed kernel size by ~214kB (as of Linux 6.6).

config KERNEL_KALLSYMS
bool "Compile the kernel with symbol table information"
default y if !SMALL_FLASH
help
This will give you more information in stack traces from kernel oopses.

config KERNEL_DEBUG_INFO
bool "Compile the kernel with debug information"
default y if !SMALL_FLASH
select KERNEL_DEBUG_KERNEL
help
This will compile your kernel and modules with debug information.

config KERNEL_ELF_CORE
bool "Enable process core dump support"
select KERNEL_COREDUMP
default y if !SMALL_FLASH

config KERNEL_KEYS
bool "Enable kernel access key retention support"
default !SMALL_FLASH

config KERNEL_CGROUPS
bool "Enable kernel cgroups"
default y if !SMALL_FLASH

config KERNEL_NAMESPACES
bool "Enable kernel namespaces"
default y if !SMALL_FLASH

config KERNEL_DEVPTS_MULTIPLE_INSTANCES
bool "Support multiple instances of devpts"
default y if !SMALL_FLASH
help
Enable support for multiple instances of devpts filesystem.
If you want to have isolated PTY namespaces (eg: in containers),
say Y here. Otherwise, say N. If enabled, each mount of devpts
filesystem with the '-o newinstance' option will create an
independent PTY namespace.

config KERNEL_SECCOMP_FILTER
bool
default y if !SMALL_FLASH

config KERNEL_SECCOMP
bool "Enable seccomp support"
depends on !(TARGET_uml)
select KERNEL_SECCOMP_FILTER
default y if !SMALL_FLASH
help
Build kernel with support for seccomp.

config KERNEL_NET_L3_MASTER_DEV
bool "L3 Master device support"
default y if !SMALL_FLASH
help
This module provides glue between core networking code and device
drivers to support L3 master devices like VRF.
Increases the compressed kernel size by ~4kB (as of Linux 6.6).

menu "Filesystem ACL and attr support options"
config USE_FS_ACL_ATTR
bool "Use filesystem ACL and attr support by default"
default y if !SMALL_FLASH
help
Make using ACLs (e.g. POSIX ACL, NFSv4 ACL) the default
for kernel and packages, except old NFS.
Also enable userspace extended attribute support
by default. (OpenWrt already has an expection it will be
present in the kernel).

config KERNEL_EXT4_FS_SECURITY
bool "Ext4 Security Labels"
default y if !SMALL_FLASH

config KERNEL_F2FS_FS_SECURITY
bool "F2FS Security Labels"
default y if !SMALL_FLASH

config KERNEL_UBIFS_FS_SECURITY
bool "UBIFS Security Labels"
default y if !SMALL_FLASH

config KERNEL_JFFS2_FS_SECURITY
bool "JFFS2 Security Labels"
default y if !SMALL_FLASH

config KERNEL_FHANDLE
bool "Compile the kernel with support for fhandle syscalls"
default y if !SMALL_FLASH

config KERNEL_FANOTIFY
bool "Compile the kernel with modern file notification support"
default y if !SMALL_FLASH

config KERNEL_IPV6_SEG6_LWTUNNEL
bool "Enable support for lightweight tunnels"
default y if !SMALL_FLASH
help
Using lwtunnel (needed for IPv6 segment routing) requires ip-full package.

@a-gave
Copy link
Contributor Author

a-gave commented Jan 3, 2025

There are some options that may be useful to make the kernel lose some weight. All of them related to the SMALL_FLASH flag. Here is a list of relevant flags to take into account. I 'll mention them just in case you need them.

Thank you a lot for this information, I will try it for sure
Apparently there is since 2016: https://git.openwrt.org/?p=openwrt%2Fopenwrt.git&a=search&h=HEAD&st=commit&s=SMALL_FLASH
Maybe the wiki lacks a page explicitly mentioning it (other than changelogs), I had never noticed it anyway: https://openwrt.org/toh/start?do=search&id=toh%3Astart&sf=1&q=%22small_flash%22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants