<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/svanheule/scripts/ipkg-build, branch main</title>
<subtitle>Staging tree of Sander Vanheule</subtitle>
<id>https://git.openwrt.org/openwrt/staging/svanheule/atom?h=main</id>
<link rel='self' href='https://git.openwrt.org/openwrt/staging/svanheule/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/svanheule/'/>
<updated>2026-06-02T09:51:00Z</updated>
<entry>
<title>build: derive PKG_SOURCE_DATE_EPOCH from the unpacked source tree</title>
<updated>2026-06-02T09:51:00Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2026-05-30T09:16:08Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/svanheule/commit/?id=e36c2946b7b574504335ff517b19b7c1eedf1bd8'/>
<id>urn:sha1:e36c2946b7b574504335ff517b19b7c1eedf1bd8</id>
<content type='text'>
Previously PKG_SOURCE_DATE_EPOCH came from a git log on the OpenWrt
package directory. That fails in shallow feed clones and in the SDK
(no .git), collapsing to the script's mtime and breaking .apk
reproducibility across SDK rebuilds and between buildbot and SDK.

With this comment, PKG_UNPACK generates a version.date file, later used to
determine a reproducible SOURCE_DATE_EPOCH. Since unpack happens after
download, the evaluation of SOURCE_DATE_EPOCH is now lazy, invoking the
`get_source_date_epoch.sh` script on every use.

While at it, drop export of PKG_SOURCE_DATE_EPOCH and clean it from the
ipkg-build script.

Link: https://github.com/openwrt/openwrt/issues/21579
Link: https://github.com/openwrt/openwrt/pull/21587

Co-Authored-By: Claude Opus 4.7 (1M context) &lt;noreply@anthropic.com&gt;
Link: https://github.com/openwrt/openwrt/pull/23576
Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>scripts,ipkg-build: Fix error message for invalid package name</title>
<updated>2025-12-16T00:39:54Z</updated>
<author>
<name>Karsten Sperling</name>
</author>
<published>2025-09-12T03:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/svanheule/commit/?id=63bf77b801d59e7cf97b6bcd90aa040f8464d99c'/>
<id>urn:sha1:63bf77b801d59e7cf97b6bcd90aa040f8464d99c</id>
<content type='text'>
Use the correct variable ($pkg instead of $name) in the error message.

Signed-off-by: Karsten Sperling &lt;ksperling@apple.com&gt;
Link: https://github.com/openwrt/openwrt/pull/20077
Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>scripts: fix installed-size calculation</title>
<updated>2024-01-08T13:08:06Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2024-01-06T17:10:29Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/svanheule/commit/?id=49e8f532989c342fff44c1c558f8182585673833'/>
<id>urn:sha1:49e8f532989c342fff44c1c558f8182585673833</id>
<content type='text'>
Previously the script would calculate the size of the compressed archive
which isn't the size installed in the overlayfs.

This commit uses zcat in combination with wc to calculate the
umcompressed size.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>build: use numeric-owner in ipkg-build</title>
<updated>2022-04-19T20:59:50Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2022-04-19T18:02:59Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/svanheule/commit/?id=7a732213322d9aa6d8743beffb185ca6f53a5bea'/>
<id>urn:sha1:7a732213322d9aa6d8743beffb185ca6f53a5bea</id>
<content type='text'>
To create packages the `ipkg-build` script is used which double packs
`control.tar.gz` and `data.tar.gz` to a single package. By default it's
using a verbose username instead of a numeric value for files.

Official OpenWrt images (artifacts) are created within docker containers
which do not seem to contain those verbose usernames and instead
defaults to numeric values.

This becomes a problem when rebuilding public artifacts because other
build environments may offer verbose usernames and there the created
packages is different from the official ones.

With this commit `ipkg-build` always uses numeric values for user/group
and thereby making it easier to reproduce official artifacts.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>scripts: make sure sort-order is independent from locale</title>
<updated>2022-04-06T16:33:31Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2022-04-06T16:25:16Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/svanheule/commit/?id=1d77dca3b32dd883bcc2213675cf21111ac1beca'/>
<id>urn:sha1:1d77dca3b32dd883bcc2213675cf21111ac1beca</id>
<content type='text'>
Set LC_ALL=C environment variable when calling 'sort' as the sort
order otherwise depends on the locale set.

Fixes: 56ce110b73 ("scripts: make sure conffiles are sorted")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>scripts: make sure conffiles are sorted</title>
<updated>2022-04-01T12:08:58Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2022-03-31T21:51:29Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/svanheule/commit/?id=56ce110b73970bcd65d309440baada84c8e1504b'/>
<id>urn:sha1:56ce110b73970bcd65d309440baada84c8e1504b</id>
<content type='text'>
It may happen that conffiles are in different order on different builds.
Make sure they have the same order by sorting them.

FIX: #9612

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>scripts,ipkg-build: use realpath for pkg_dir</title>
<updated>2021-03-15T05:32:30Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2021-02-04T23:49:02Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/svanheule/commit/?id=bb95be9265a9e3eb71c4f50b5f289a75683405d4'/>
<id>urn:sha1:bb95be9265a9e3eb71c4f50b5f289a75683405d4</id>
<content type='text'>
This allows manual execution of the ipkg-build script even with
releative path.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>scripts,ipkg-build: apply shellcheck</title>
<updated>2021-03-15T05:31:43Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2021-02-04T23:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/svanheule/commit/?id=72f481b1579e844d25ca71ec72b2fa377d961f04'/>
<id>urn:sha1:72f481b1579e844d25ca71ec72b2fa377d961f04</id>
<content type='text'>
This commit cleans the `ipkg-build` script via changes suggested by
shellcheck. These are mostly word splitting issues.

Remove the definition of GZIP, this adds three "lookups" of the `gzip`
binary but the rest of the build system doesn't seem to use such
improvements neither.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>scripts: ipkg-build: simplify uid/gid resolving</title>
<updated>2020-09-14T15:11:04Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2020-09-14T14:57:46Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/svanheule/commit/?id=4038c031cbc156d361e80f73dbd88f83b13a4057'/>
<id>urn:sha1:4038c031cbc156d361e80f73dbd88f83b13a4057</id>
<content type='text'>
Use the prepared .packageusergroup file to lookup user and group names
when processing the passed file mode.

Also replace the various subshell/cut invocations with a sequence of
standard variable interpolations which fixes paths with embedded colons
as a side-effect.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>build: add user/group ID resolve function</title>
<updated>2020-09-14T09:54:52Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-09-14T02:02:02Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/svanheule/commit/?id=51ec51871fd57b80096baf76d6b21a2ae46e4748'/>
<id>urn:sha1:51ec51871fd57b80096baf76d6b21a2ae46e4748</id>
<content type='text'>
With the introduction of `./tmp/userids` the `ipkg-build` script can now
resolve values of "PKG_FILE_MODES", allowing users to set names rather
than numeric values.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
</feed>
