<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/linusw/include/package-pack.mk, branch master</title>
<subtitle>Staging tree of Linus Walleij</subtitle>
<id>https://git-03.infra.openwrt.org/openwrt/staging/linusw/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/'/>
<updated>2026-01-24T10:03:40Z</updated>
<entry>
<title>build: purge DESCRIPTION</title>
<updated>2026-01-24T10:03:40Z</updated>
<author>
<name>George Sapkin</name>
</author>
<published>2026-01-24T02:30:48Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/commit/?id=87b72fefcb373da99463a7b9eaf881b968d1b71f'/>
<id>urn:sha1:87b72fefcb373da99463a7b9eaf881b968d1b71f</id>
<content type='text'>
DESCRIPTION field has been deprecated since 2007, yet internal exporting
causes intermittent package build failures due to the deprecation check,
even with packages that don't have that fields set. Replace all
DESCRIPTION exports with alternative variables defined through shexport
and shvar helpers and remove the check.

Fixes: 547b127d ("make kernel module packaging code reusable and use it in madwifi")
Fixes: 7558f028 ("DESCRIPTION:= is obselete, so complain if it is used and use TITLE if no description is set")
Fixes: cc435322 ("build: optimize target metadata dump")
Fixes: d081edf7 ("build: clean up and optimize ipkg control generator code")
Signed-off-by: George Sapkin &lt;george@sapk.in&gt;
Link: https://github.com/openwrt/openwrt/pull/21668
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: add default priority to ABI-versioned packages</title>
<updated>2026-01-12T13:28:52Z</updated>
<author>
<name>George Sapkin</name>
</author>
<published>2026-01-06T01:50:37Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/commit/?id=470e030a5eae77e94192e0dd933d7b1b657f7b2c'/>
<id>urn:sha1:470e030a5eae77e94192e0dd933d7b1b657f7b2c</id>
<content type='text'>
If a package has an ABI version defined, set priority to 10. The enables
packages with an ABI version to be installed by their base name instead
of a name and an ABI version, e.g.:

libfoo3, where 3 is the ABI version can be installed by just libfoo.

This affects manual installation only, as the dependency resolution
takes care of ABI versions.

Refactor apk priority logic into a helper define.

Signed-off-by: George Sapkin &lt;george@sapk.in&gt;
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: remove redundant shebang from apk lifecycle scripts</title>
<updated>2026-01-12T13:28:52Z</updated>
<author>
<name>George Sapkin</name>
</author>
<published>2026-01-05T22:56:06Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/commit/?id=1dec4683f6a91cb0734e97186738b0ea413bb356'/>
<id>urn:sha1:1dec4683f6a91cb0734e97186738b0ea413bb356</id>
<content type='text'>
Due to the way apk lifecycle scripts are defined, they might end up with
multiple shebangs. Remove them.

Before:

  post-upgrade: |
    #!/bin/sh
    export PKG_UPGRADE=1
    #!/bin/sh
    [ "${IPKG_NO_SCRIPT}" = "1" ] &amp;&amp; exit 0
    [ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
    . ${IPKG_INSTROOT}/lib/functions.sh
    export root="${IPKG_INSTROOT}"
    export pkgname="adblock-fast"
    add_group_and_user
    default_postinst
    #!/bin/sh
    # check if we are on real system
    if [ -z "${IPKG_INSTROOT}" ]; then
    	/etc/init.d/adblock-fast enable
    fi
    exit 0

After:

  post-upgrade: |
    #!/bin/sh
    export PKG_UPGRADE=1
    [ "${IPKG_NO_SCRIPT}" = "1" ] &amp;&amp; exit 0
    [ -s ${IPKG_INSTROOT}/lib/functions.sh ] || exit 0
    . ${IPKG_INSTROOT}/lib/functions.sh
    export root="${IPKG_INSTROOT}"
    export pkgname="adblock-fast"
    add_group_and_user
    default_postinst
    # check if we are on real system
    if [ -z "${IPKG_INSTROOT}" ]; then
    	/etc/init.d/adblock-fast enable
    fi
    exit 0

Fixes: b52e897 ("include/package-pack: remove leading whitespace from install scripts")
Fixes: 03880e2 ("include/package-pack: add missing apk package lifecycle events")
Signed-off-by: George Sapkin &lt;george@sapk.in&gt;
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: fix implicit self-provides</title>
<updated>2026-01-12T13:28:52Z</updated>
<author>
<name>George Sapkin</name>
</author>
<published>2026-01-05T02:03:00Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/commit/?id=2d844a077089575ab67fcbd15e021a981387e668'/>
<id>urn:sha1:2d844a077089575ab67fcbd15e021a981387e668</id>
<content type='text'>
Fix setting implicit self-provides for packages when they don't have any
PROVIDES specified.

Remove redundant self-provide for kmods, since kmods are packages and
will have a self-provide added already.

Fixes: 5ed650a ("build: add support for virtual provides")
Fixes: 9b37b71 ("build: provide virtual self in kmods")
Signed-off-by: George Sapkin &lt;george@sapk.in&gt;
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: fix provides logic when ABI version is set</title>
<updated>2026-01-12T13:28:52Z</updated>
<author>
<name>George Sapkin</name>
</author>
<published>2026-01-04T17:50:52Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/commit/?id=952c918028b4811e5cf0f3fa8607ce50630a5060'/>
<id>urn:sha1:952c918028b4811e5cf0f3fa8607ce50630a5060</id>
<content type='text'>
Same as for the base package name, when a package has an ABI version,
provide both unversioned provider in addition to one with ABI version
and version.

So for each provide instead of providing only:

$provide$ABI_version=$package_version

now provide:

$provide $provide$ABI_version=$package_version

When a provide ends in a number, the ABI version will be prefixed with
a - sign, e.g.: provide1-0

Fixes: 18029977 ("build: fix apk packaging and ABI-versioning")
Signed-off-by: George Sapkin &lt;george@sapk.in&gt;
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: refactor dependency formatting</title>
<updated>2026-01-12T13:28:52Z</updated>
<author>
<name>George Sapkin</name>
</author>
<published>2026-01-04T01:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/commit/?id=779fa7ff6caa509d5df3827342162fdb07093cee'/>
<id>urn:sha1:779fa7ff6caa509d5df3827342162fdb07093cee</id>
<content type='text'>
Refactor dependencies and extra dependencies logic into a helper define
and document it.

Signed-off-by: George Sapkin &lt;george@sapk.in&gt;
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: don't auto mark all provides as virtual</title>
<updated>2026-01-12T13:28:52Z</updated>
<author>
<name>George Sapkin</name>
</author>
<published>2026-01-02T15:10:00Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/commit/?id=2a1977a4b83c8b5c61a2e74deeac00e2b58e026f'/>
<id>urn:sha1:2a1977a4b83c8b5c61a2e74deeac00e2b58e026f</id>
<content type='text'>
Don't mark all provides as virtual when ALTERNATIVES is set.
Automatically marking all provides as virtual prevents variants from
conflicting between each other. Alternatives have nothing to do with
packaging and packages are expected to manage their own provides.

Updated internal provides explanation.

Remove unnecessary back slashes from FormatProvides.

Fixes: 18029977 ("build: fix apk packaging and ABI-versioning")
Signed-off-by: George Sapkin &lt;george@sapk.in&gt;
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: remove default provider priority</title>
<updated>2026-01-12T13:28:52Z</updated>
<author>
<name>George Sapkin</name>
</author>
<published>2026-01-02T15:07:52Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/commit/?id=49fc31903306c346fcda862800f40d5e94cff5b0'/>
<id>urn:sha1:49fc31903306c346fcda862800f40d5e94cff5b0</id>
<content type='text'>
Remove default provider priority since packages are expected to
explicitly declare virtual provides and set default variants. With
default priority some package variants without PROVIDES and not marked
as default end up with priority 0 and are not picked for installation.

Before the change dnsmasq-dhcpv6 is selected for dnsmasq, because the
former has higher priority:

name &lt;dnsmasq&gt; selected from selectable list
select_package: dnsmasq (requirers=1, autosel=1, iif=0, order_id=0x4000005f)
  consider dnsmasq-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
   prefer existing package
    choose as new provider
  consider dnsmasq-dhcpv6-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=1, installed=0
    prefer highest declared provider priority
    choose as new provider
  consider dnsmasq-full-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=1, installed=0
    prefer lowest available repository
selecting: dnsmasq-dhcpv6-2.91-r2, available: 1
assign dnsmasq-dhcpv6 to dnsmasq-dhcpv6-2.91-r2
assign dnsmasq to dnsmasq-dhcpv6-2.91-r2
disqualify_package: dnsmasq-2.91-r2 (conflicting provides)
disqualify_package: dnsmasq-full-2.91-r2 (conflicting provides)
    apply_constraint: libc
    apply_constraint: provider: libc-1.2.5-r5: 1

After the change dnsmasq is selected for dnsmasq based on
lexicographical order:

name &lt;dnsmasq&gt; selected from selectable list
select_package: dnsmasq (requirers=1, autosel=1, iif=0, order_id=0x4000005f)
  consider dnsmasq-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
   prefer existing package
    choose as new provider
  consider dnsmasq-dhcpv6-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
    prefer lowest available repository
  consider dnsmasq-full-2.91-r2 iif_triggered=0, tag_ok=1, selectable=1, available=1, flags=0x0, provider_priority=0, installed=0
    prefer lowest available repository
selecting: dnsmasq-2.91-r2, available: 1
assign dnsmasq to dnsmasq-2.91-r2
disqualify_package: dnsmasq-dhcpv6-2.91-r2 (conflicting provides)
disqualify_package: dnsmasq-full-2.91-r2 (conflicting provides)
    apply_constraint: libc
    apply_constraint: provider: libc-1.2.5-r5: 1

Fixes: dea8397 ("include/package-pack: add default 'provider_priority' for APK packages")
Signed-off-by: George Sapkin &lt;george@sapk.in&gt;
Link: https://github.com/openwrt/openwrt/pull/21369
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: restore opkg-related provides logic</title>
<updated>2026-01-05T22:27:40Z</updated>
<author>
<name>George Sapkin</name>
</author>
<published>2026-01-05T14:26:47Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/commit/?id=838a9ff1ca3ab3a269592b5f899280169e76bde4'/>
<id>urn:sha1:838a9ff1ca3ab3a269592b5f899280169e76bde4</id>
<content type='text'>
Re-add opkg provides logic to CONTROL when USE_APK is not set and remove
virtual provider prefix.

Fixes: cefbf11 ("build: refactor provides logic")
Fixes: https://github.com/openwrt/openwrt/issues/21372
Fixes: https://github.com/openwrt/openwrt/issues/21382
Fixes: https://github.com/openwrt/openwrt/issues/21402
Signed-off-by: George Sapkin &lt;george@sapk.in&gt;
Link: https://github.com/openwrt/openwrt/pull/21409
Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>build: provide virtual self in kmods</title>
<updated>2025-12-31T17:16:48Z</updated>
<author>
<name>George Sapkin</name>
</author>
<published>2025-12-28T15:22:41Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/linusw/commit/?id=9b37b7185c18855f4e017ac573701cdcd92fbcd1'/>
<id>urn:sha1:9b37b7185c18855f4e017ac573701cdcd92fbcd1</id>
<content type='text'>
Add an implicit self-provide to kmods. apk can't handle self provides,
be it versioned or virtual, so opt for a prefix and a suffix instead.
Package name without a prefix/suffix is too generic and might conflict
with other packages, e.g. wireguard. This allows several variants to
provide the same virtual package without adding extra provides to the
default one, e.g. r8169 implicitly provides kmod-r8169-any and is marked
as default, so r8125 can explicitly provide @kmod-r8169-any as well.

Signed-off-by: George Sapkin &lt;george@sapk.in&gt;
Link: https://github.com/openwrt/openwrt/pull/21288
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
</feed>
