<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/hauke/scripts/ipkg-build, branch v22.03.1</title>
<subtitle>Hauke Mehrtens staging tree</subtitle>
<id>https://git.openwrt.org/openwrt/staging/hauke/atom?h=v22.03.1</id>
<link rel='self' href='https://git.openwrt.org/openwrt/staging/hauke/atom?h=v22.03.1'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/hauke/'/>
<updated>2022-04-06T16:35:49Z</updated>
<entry>
<title>scripts: make sure sort-order is independent from locale</title>
<updated>2022-04-06T16:35:49Z</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/hauke/commit/?id=087795323576ab8f4478f5aa3568adaec717d26f'/>
<id>urn:sha1:087795323576ab8f4478f5aa3568adaec717d26f</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;
(cherry picked from commit 1d77dca3b32dd883bcc2213675cf21111ac1beca)
</content>
</entry>
<entry>
<title>scripts: make sure conffiles are sorted</title>
<updated>2022-04-06T12:59:44Z</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/hauke/commit/?id=ec2bc81c78585755491f9a1a3f30edb6312025f0'/>
<id>urn:sha1:ec2bc81c78585755491f9a1a3f30edb6312025f0</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;
(cherry picked from commit 56ce110b73970bcd65d309440baada84c8e1504b)
</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/hauke/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/hauke/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/hauke/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/hauke/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>
<entry>
<title>build: store granular timestamps in packages</title>
<updated>2020-08-31T10:18:06Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-08-15T20:57:02Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/hauke/commit/?id=fd29f2bcd97f7af7de22ac95b1490a54f45d6c88'/>
<id>urn:sha1:fd29f2bcd97f7af7de22ac95b1490a54f45d6c88</id>
<content type='text'>
With the new `SOURCE` argument of `get_source_date_epoch` it is possible
to set package timestamps based on actual package changes rather thane
$TOPDIR changes.

This commit adds a new variable PKG_SOURCE_DATE_EPOCH which is used by
the `ipkg` build script. As a fallback the existing SOURCE_DATE_EPOCH is
used or as last resort the current time.

The redundant checks for `.git/` and `.svn/` are removed.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>build: ipkg-build use fakeroot with PKG_FILE_MODES</title>
<updated>2020-08-31T10:13:12Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-08-07T21:13:00Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/hauke/commit/?id=353ce2e521f57318c502c862457dc859d8d181a6'/>
<id>urn:sha1:353ce2e521f57318c502c862457dc859d8d181a6</id>
<content type='text'>
The `ipkg-build` script converts a folder into a `opkg` installable
package. Until now it would use root:root for all packages and try to
preserve file modes.

This has the two drawbacks of packages want to add non-root files or add
SUID files, like the `sudo` package does.

To give more flexibility regarding file modes and avoid init script
hacks, a new variable called `PKG_FILE_MODES`. The variable contains a
list of files modes in the format `path:owner:group:mode`.

An example for the `sudo` package below:

```
PKG_FILE_MODES:=\
        /usr/bin/sudo:root:root:4755 \
        /etc/sudoers:root:root:0440
```

The `ipkg-build` now runs within a fakeroot environment to set any mode
and directly store it in the resulting `ipk` package archive.

Both options `-o` and `-g` are no longer required due to the introduction
of the more flexible `-m` options, which takes the `PKG_FILE_MODES` as
input.

Lastly the option `-c` is removed as it's unused within the script.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>treewide: replace `which` with `command -v`</title>
<updated>2020-08-12T09:08:05Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2020-08-10T01:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/hauke/commit/?id=1fdf6b745cc3d85be3743837817a360121554134'/>
<id>urn:sha1:1fdf6b745cc3d85be3743837817a360121554134</id>
<content type='text'>
Fix shellcheck SC2230
&gt; which is non-standard. Use builtin 'command -v' instead.

Using `command -v` is POSIX compliant while `which` is not.  Also to
mention, `command -v` is a shell builtin whereas `which` is a separate
busybox applet.

Once applied to everything concerning OpenWrt we can disable the busybox
feature `which` and save 3.8kB.

Acked-by: Stijn Tintel &lt;stijn@linux-ipv6.be&gt;
Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
[also replace cases in zram-swap]
Signed-off-by: Adrian Schmutzler &lt;freifunk@adrianschmutzler.de&gt;
</content>
</entry>
<entry>
<title>script: ipkg-build: honour $SOURCE_DATE_EPOCH</title>
<updated>2018-11-08T10:52:33Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2018-11-08T10:52:33Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/hauke/commit/?id=d157a76c67bcb821d3ec8dcd4312390ef129a95a'/>
<id>urn:sha1:d157a76c67bcb821d3ec8dcd4312390ef129a95a</id>
<content type='text'>
When the SOURCE_DATE_EPOCH environment variable is set, use it to
override the timestamps of .ipk archive contents.

This ensures that .ipk archives built in environments without SCM
metadata (mainly the SDK) are reproducible between different runs.

Ref: https://github.com/openwrt/packages/issues/6954
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
</feed>
