diff options
author | Paul Spooren <mail@aparcar.org> | 2020-08-07 11:13:00 -1000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2020-08-31 11:13:12 +0100 |
commit | 353ce2e521f57318c502c862457dc859d8d181a6 (patch) | |
tree | 4e84a80f6b7183b677567d5f3ae03fb1529c6954 /scripts/flashing | |
parent | 2bd55d0a2b22e5923a433edd9f90be8ea2997bde (diff) | |
download | upstream-353ce2e521f57318c502c862457dc859d8d181a6.tar.gz upstream-353ce2e521f57318c502c862457dc859d8d181a6.tar.bz2 upstream-353ce2e521f57318c502c862457dc859d8d181a6.zip |
build: ipkg-build use fakeroot with PKG_FILE_MODES
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 <mail@aparcar.org>
Diffstat (limited to 'scripts/flashing')
0 files changed, 0 insertions, 0 deletions