<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/jow/include/package-pack.mk, branch main</title>
<subtitle>Staging tree of Jo-Philipp Wich</subtitle>
<id>https://git-03.infra.openwrt.org/openwrt/staging/jow/atom?h=main</id>
<link rel='self' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/'/>
<updated>2025-01-10T09:50:34Z</updated>
<entry>
<title>include/package-pack: remove leading whitespace from install scripts</title>
<updated>2025-01-10T09:50:34Z</updated>
<author>
<name>Eric Fahlgren</name>
</author>
<published>2024-12-30T23:54:55Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/commit/?id=b52e8972968ce25026447fea3de320fb395a2f3a'/>
<id>urn:sha1:b52e8972968ce25026447fea3de320fb395a2f3a</id>
<content type='text'>
Strip off initial leading blanks and tabs from scripts and script
fragments that are supplied by the package's Makefile.  Specifically,
the script included in the postrm must be left justified so that
the shebang is in the first column.

Fixes: https://github.com/openwrt/openwrt/issues/17439
Signed-off-by: Eric Fahlgren &lt;ericfahlgren@gmail.com&gt;
Link: https://github.com/openwrt/openwrt/pull/17440
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>include/package-pack: add support for postrm with APK</title>
<updated>2024-11-21T16:20:43Z</updated>
<author>
<name>Robert Marko</name>
</author>
<published>2024-11-21T13:34:03Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/commit/?id=fc2ba101089117d72903f9464269da73763ded42'/>
<id>urn:sha1:fc2ba101089117d72903f9464269da73763ded42</id>
<content type='text'>
Currently, postrm scripts are not being executed when package is removed
with APK since they are not being included at all.

So, lets use APK-s support for post-deinstall scripts and ship our postrm
scripts if packages define them.

Fixes: d788ab376f85 ("build: add APK package build capabilities")
Link: https://github.com/openwrt/openwrt/pull/17023
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>include/package-pack: actually call default_postinist/prerm when using APK</title>
<updated>2024-11-21T16:20:43Z</updated>
<author>
<name>Robert Marko</name>
</author>
<published>2024-11-20T12:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/commit/?id=5b6f8353fe2af6c270a30dc8c38791cf03fd265d'/>
<id>urn:sha1:5b6f8353fe2af6c270a30dc8c38791cf03fd265d</id>
<content type='text'>
Currently, when you install a package that ships uci-defaults scripts they
are not getting executed during package installation.

For example, if you install a new LuCI theme it ships a uci-defaults script
to add it to the UCI LuCI config so the theme is actually selectable but
that does not happen until the device is rebooted so that uci-defaults
script is actually executed.

It turns out that the recipe for post-install is the issue since it will
include contents of postinst-pkg before the call to default_postinist.
This is an issue since postinst-pkg will exit with code 0 before we ever
reach the call to default_postinist.

So, lets simply make the call to default_postinist before postinst-pkg
inclusion which is what OPKG based installation does.

The same issue affects pre-deinstall script but its not actually being hit
since we dont seem to be actually even generating prerm-pkg scripts but
lets fix this theoretical issue as well.

Fixes: #16987
Fixes: d788ab376f85 ("build: add APK package build capabilities")
Link: https://github.com/openwrt/openwrt/pull/17023
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>include/package-pack: translate PKGARCH for APK</title>
<updated>2024-11-19T18:52:03Z</updated>
<author>
<name>Robert Marko</name>
</author>
<published>2024-11-19T12:12:28Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/commit/?id=0d0a5eb4b590f6f1f50040a56a35179886b40e62'/>
<id>urn:sha1:0d0a5eb4b590f6f1f50040a56a35179886b40e62</id>
<content type='text'>
We have a lot of script-only packages that are universal for all arch-s
and those set PKGARCH:=all to indicate it.

Unfortunately, APK expects architecture to be set to "noarch" instead to
indicate that its universal so instead of having to update all packages
that set PKGARCH:=all and thus break OPKG lets simply translate "all" to
"noarch" when generating the APK package.

This will be required as soon we update APK to include [1] as it will start
enforcing package architecture checks.

[1] https://gitlab.alpinelinux.org/alpine/apk-tools/-/commit/c1a3e69f24e235fc78f4dddb1f85fdf281464446

Suggested-by: Jonas Gorski &lt;jonas.gorski@gmail.com&gt;
Link: https://github.com/openwrt/openwrt/pull/17015
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>include/package-pack: add default 'provider_priority' for APK packages</title>
<updated>2024-11-19T10:24:07Z</updated>
<author>
<name>Robert Marko</name>
</author>
<published>2024-11-18T18:55:57Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/commit/?id=dea839773c27430031c2a59c3d37ebdfef3937b9'/>
<id>urn:sha1:dea839773c27430031c2a59c3d37ebdfef3937b9</id>
<content type='text'>
Currently, trying to use APK to install a package that has a dependency on
a virtual package that needs to be resolved via 'provides' it will fail if
package does not have 'DEFAULT_VARIANT:=1' like:
apk add usbutils
ERROR: unable to select packages:
  libudev (virtual):
    note: please select one of the 'provided by' packages explicitly
    provided by: libudev-zero
    required by: usbutils-017-r1[libudev]

Issue is that we dont set 'provider_priority' that APK uses to break ties
when choosing a virtual package to satisfy a dependency and thus despite
only one package providing the dependency it will still end up with a tie
and just error out.

So, lets simply fix this by providing a default value for
'provider_priority' when 'DEFAULT_VARIANT' is not set and then APK will
be able to resolve dependencies.

Fixes: #16976
Link: https://github.com/openwrt/openwrt/pull/17008
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>include/package-pack: escape package description for APK mkpkg</title>
<updated>2024-11-17T18:09:31Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2024-11-17T18:09:31Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/commit/?id=43455f1075855d9ed2760f70b2d8acbe8e8bb16c'/>
<id>urn:sha1:43455f1075855d9ed2760f70b2d8acbe8e8bb16c</id>
<content type='text'>
Escape special char for package description for APK mkpkg as the
description is passed as an args to mkpkg with --info option and can
easily escape from the "".

Currently escaped char `, $, ", \.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: Honor DEFAULT_VARIANT for APK packages</title>
<updated>2024-10-30T13:17:33Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2024-10-30T08:28:30Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/commit/?id=559df6cb99c38be124ebe1b2211aaf368451a8b3'/>
<id>urn:sha1:559df6cb99c38be124ebe1b2211aaf368451a8b3</id>
<content type='text'>
Previously APK would complain as it wasn't sure which package to
install by default when multiple packages would provide the same name.

Now, give the package a higher provider priority to make APK
automatically select the "default" package.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>include/package-pack: drop version from provides</title>
<updated>2024-10-28T23:07:55Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2024-10-27T15:36:33Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/commit/?id=03e05253259cbdf5696d81f458dbfddb4530c758'/>
<id>urn:sha1:03e05253259cbdf5696d81f458dbfddb4530c758</id>
<content type='text'>
Adding a version to the provides causes it to conflict with other
packages that provides the same package, further details are available
here: https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/master/doc/apk-package.5.scd#L199

This was intitally done, if I remember correctly, to support depending
on the specific kernel modules. Due to patches to APK, versions
containing hashes work now, too, so this is no longer required.

Only add the version to packages that define an ABI version since other
packages depend against the package name plus ABI version.

While at it, format the now rather complex call.

Fixes: https://github.com/openwrt/openwrt/issues/16795

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>include/package-pack: Set missing Maintainer and URL for APK</title>
<updated>2024-10-24T10:46:47Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2024-10-24T10:46:47Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/commit/?id=6835ff8cbcc826ce64b073872e740a7399cb0b47'/>
<id>urn:sha1:6835ff8cbcc826ce64b073872e740a7399cb0b47</id>
<content type='text'>
Set missing Maintainer and URL info for .apk creation.

Fixes: d788ab376f85 ("build: add APK package build capabilities")
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>include/package-pack: remove whitespace for Description info for APK</title>
<updated>2024-10-24T10:46:26Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2024-10-24T10:45:36Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/jow/commit/?id=abeaf8df5c8ad486d2beb110d87cb511fb5cd831'/>
<id>urn:sha1:abeaf8df5c8ad486d2beb110d87cb511fb5cd831</id>
<content type='text'>
Remove whitespace for Description info for .apk creation

Fixes: b6bbc76c0b2a ("include/package-pack: set missing Description on .apk creation")
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
</feed>
