<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/thess/package/base-files, branch master</title>
<subtitle>Ted Hess staging tree</subtitle>
<id>https://git.openwrt.org/openwrt/staging/thess/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/openwrt/staging/thess/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/thess/'/>
<updated>2021-11-01T18:01:02Z</updated>
<entry>
<title>base-files: drop get_partition_by_name shell function</title>
<updated>2021-11-01T18:01:02Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2021-11-01T14:03:42Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/thess/commit/?id=73657dfbdd79e8cbafa218f8d04ceefad7b63404'/>
<id>urn:sha1:73657dfbdd79e8cbafa218f8d04ceefad7b63404</id>
<content type='text'>
find_mmc_part provides a better alternative and all users of
get_partition_by_name have been removed.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>base-files: allow specifiying rootdev for find_mmc_part</title>
<updated>2021-11-01T18:00:42Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2021-11-01T13:58:20Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/thess/commit/?id=9f223a20bd5f0cbec9f34427588b645ae38433ff'/>
<id>urn:sha1:9f223a20bd5f0cbec9f34427588b645ae38433ff</id>
<content type='text'>
Some devices got more than one mmc device.
Allow specifying the root device as 2nd parameter of find_mmc_part so
scripts can avoid matching irrelevant partitions on wrong mmc device.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>base-files: add minimal mmc support</title>
<updated>2021-10-31T23:56:51Z</updated>
<author>
<name>Davide Fioravanti</name>
</author>
<published>2020-09-01T23:18:16Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/thess/commit/?id=6e137943442fb0ab66c34462fa19e5a4260eddd5'/>
<id>urn:sha1:6e137943442fb0ab66c34462fa19e5a4260eddd5</id>
<content type='text'>
Added minimal mmc support for helper functions:

 - find_mmc_part: Look for a given partition name. Returns the
	coresponding partition path
 - caldata_extract_mmc: Look for a given partition name and then
	extracts the calibration data
 - mmc_get_mac_binary: Returns the mac address from a given partition
	name and offset

Signed-off-by: Davide Fioravanti &lt;pantanastyle@gmail.com&gt;
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
[replace dd with caldata_dd, moved sysupgrade mmc to orbi]
Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
</content>
</entry>
<entry>
<title>base-files, metadata: support additional group membership</title>
<updated>2021-10-28T15:27:21Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2021-10-26T12:02:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/thess/commit/?id=b2aca61360c33ad3161f8ef35a1c28ebb2507600'/>
<id>urn:sha1:b2aca61360c33ad3161f8ef35a1c28ebb2507600</id>
<content type='text'>
Some packages may require additional group membership for the system
user added by that package. Allow defining additional groups as third
member of the ':'-separated tuple, allowing to specify multiple
','-separated groups with optional GID.

Example:
USERID:=foouser=1000:foogroup=1000:addg1=1001,addg2=1002,addg3

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>base-files: chmod 1777 /var/lock</title>
<updated>2021-10-23T17:30:54Z</updated>
<author>
<name>Deomid Ryabkov</name>
</author>
<published>2021-10-23T13:22:39Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/thess/commit/?id=430f69194388ad6a7826a51e0e2b2dd478e27f0f'/>
<id>urn:sha1:430f69194388ad6a7826a51e0e2b2dd478e27f0f</id>
<content type='text'>
Per FHS 3.0, /var/lock is the location for lock files [1].
However its current permissions (755) are too restrictive
for use by unprivileged processes.
Debian and Ubuntu set them to 1777, and now so do we.

[1] &lt;https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varlockLockFiles&gt;

Signed-off-by: Deomid Ryabkov &lt;rojer@rojer.me&gt;
[fixed typo in commit message, had to remove "rojer" due to git hooks]
Signed-off-by: Christian Lamparter &lt;chunkeey@gmail.com&gt;
</content>
</entry>
<entry>
<title>base-files: reduce number of `mkdir` calls</title>
<updated>2021-09-24T07:40:52Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2021-09-12T08:46:06Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/thess/commit/?id=70543aafb29a79613ac9b49ec41e51e42fa598ac'/>
<id>urn:sha1:70543aafb29a79613ac9b49ec41e51e42fa598ac</id>
<content type='text'>
The `mkdir` commands supports passing multiple arguments to batch create
multiple folders, instead of calling the tool every single time.

If the creation of one of the folders fails, all other folder are still
created and therefore doesn't change the error handling.

Also stop creating `/etc/` explicitly after subfolders of `/etc/` were
already created.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>base-files: reduce `sed` calls</title>
<updated>2021-09-24T07:39:46Z</updated>
<author>
<name>Paul Spooren</name>
</author>
<published>2021-09-12T08:44:11Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/thess/commit/?id=9c331a6a91e870a1dc31f563333105e959f8b171'/>
<id>urn:sha1:9c331a6a91e870a1dc31f563333105e959f8b171</id>
<content type='text'>
The `sed`-script shouldn't be called multiple times, especially not with
the same files.

This commit merges all files together in a single `sed`-script call.

Signed-off-by: Paul Spooren &lt;mail@aparcar.org&gt;
</content>
</entry>
<entry>
<title>base-files: fix option to make /var persistent</title>
<updated>2021-08-23T11:09:42Z</updated>
<author>
<name>Stijn Tintel</name>
</author>
<published>2021-08-23T11:06:35Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/thess/commit/?id=669d920e278fe00895490d7c1a81774317ff358a'/>
<id>urn:sha1:669d920e278fe00895490d7c1a81774317ff358a</id>
<content type='text'>
The option was initially named TARGET_ROOTFS_LN_VAR_TMP, and the check
was correct. When renaming the option to something more suitable, the
check was changed to check for n, but when an option is not set, it's
not n but empty. This results in the check always evaluating to false.
Fix the check by checking for y with ifneq.

Fixes: 57807f50ded6 ("base-files: add option to make /var persistent")

Signed-off-by: Stijn Tintel &lt;stijn@linux-ipv6.be&gt;
</content>
</entry>
<entry>
<title>base-files: add option to make /var persistent</title>
<updated>2021-08-22T15:07:51Z</updated>
<author>
<name>Stijn Tintel</name>
</author>
<published>2019-02-25T13:05:07Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/thess/commit/?id=57807f50ded6cf0996284a850084183af13d5894'/>
<id>urn:sha1:57807f50ded6cf0996284a850084183af13d5894</id>
<content type='text'>
In OpenWrt, /var is symlinked to /tmp by default. This is done to reduce
the amount of writes to the flash chip, which often have not the
greatest durability. As a result, things like DHCP or UPnP lease files,
are not persistent across reboots.

Since OpenWrt can run on devices with more durable storage, it makes
sense to have an option for a persistent /var. Add an option to make
/var persistent. When enabled, /var will no longer be symlinked to /tmp,
but /var/run will be symlink to /tmp/run, as it should contains only
files that should not be kept during reboot. The option is off by
default, to maintain the current behaviour.

Signed-off-by: Stijn Tintel &lt;stijn@linux-ipv6.be&gt;
</content>
</entry>
<entry>
<title>base-files: rename 'sdcard' to 'legacy-sdcard'</title>
<updated>2021-08-16T11:22:17Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2021-08-07T13:30:53Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/openwrt/staging/thess/commit/?id=98bccdafd7244238d9dfbbc1a342a4bb557e4b7c'/>
<id>urn:sha1:98bccdafd7244238d9dfbbc1a342a4bb557e4b7c</id>
<content type='text'>
While an image layout based on MBR and 'bootfs' partition may be easy
to understand for users who are very used to the IBM PC and always have
the option to access the SD card outside of the device (and hence don't
really depend on other recovery methods or dual-boot), in my opinion
it's a dead end for many desirable features on embedded systems,
especially when managed remotely (and hence without an easy option to
access the SD card using another device in case things go wrong, for
example).

Let me explain:

* using a MSDOS/VFAT filesystem to store kernel(s) is problematic, as a
  single corruption of the bootfs can render the system into a state
  that it no longer boots at all. This makes dual-boot useless, or at
  least very tedious to setup with then 2 independent boot partitions
  to avoid the single point of failure on a "hot" block (the FAT index
  of the boot partition, written every time a file is changed in
  bootfs). And well: most targets even store the bootloader environment
  in a file in that very same FAT filesystem, hence it cannot be used
  to script a reliable dual-boot method (as loading the environment
  itself will already fail if the filesystem is corrupted).

* loading the kernel uImage from bootfs and using rootfs inside an
  additional partition means the bootloader can only validate the
  kernel -- if rootfs is broken or corrupted, this can lead to a reboot
  loop, which is often a quite costly thing to happen in terms of
  hardware lifetime.

* imitating MBR-boot behavior with a FAT-formatted bootfs partition
  (like IBM PC in the 80s and 90s) is just one of many choices on
  embedded targets. There are much better options with modern U-Boot
  (which is what we use and build from source for all targets booting
  off SD cards), see examples in mediatek/mt7622 and mediatek/mt7623.

Hence rename the 'sdcard' feature to 'legacy-sdcard', and prefix
functions with 'legacy_sdcard_' instead of 'sdcard_'.

Tested-by: Stijn Tintel &lt;stijn@linux-ipv6.be&gt;
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
</feed>
