<feed xmlns='http://www.w3.org/2005/Atom'>
<title>packages/utils/uvol/files, branch master</title>
<subtitle>Mirror of packages feed</subtitle>
<id>https://git.openwrt.org/feed/packages/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/feed/packages/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/'/>
<updated>2026-08-24T16:54:41Z</updated>
<entry>
<title>uvol: update to 1.2, expose volume operations over ubus</title>
<updated>2026-08-24T16:54:41Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-08-24T02:06:28Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=267a9c889256724ab8f9de81df5a306970e2555c'/>
<id>urn:sha1:267a9c889256724ab8f9de81df5a306970e2555c</id>
<content type='text'>
Move the storage backend probe, the ctx construction, the locking
helpers and the volume-name check out of the CLI script into
/usr/lib/uvol/common.uc, so a second entry point can reuse them
without duplicating the logic.

Publish ubus object 'uvol' with the volume operations and a readiness
query. Consumers such as uxc are pure ubus frontends and must not exec
the command line tool. Ship an rpcd exec plugin, installed by the uvol
package itself, taking the same locks as the CLI so both entry points
stay serialised. As stdout is the plugin's reply channel, point file
descriptor 1 at stderr for the duration of a call.

Send a 'uvol.ready' ubus event at the end of 'uvol boot', carrying the
active backend name and whether the .meta volume is ready. Consumers
such as uxc can wait for this event instead of polling volume state.
Sending is best-effort: boot keeps its exit code even when ubusd is
not reachable.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>uvol: update to 1.1.1, harden backend invocation and volume-name handling</title>
<updated>2026-08-24T16:54:41Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-08-24T02:06:10Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=f427fac2c4f4310d065445468e5d35da3a2ebc07'/>
<id>urn:sha1:f427fac2c4f4310d065445468e5d35da3a2ebc07</id>
<content type='text'>
Volume names were interpolated into shell command lines at every
backend call site, so a name containing shell metacharacters ran
arbitrary commands as root. ucode's system() takes an array and execs
it directly, so every call site that interpolates a name, a device or
a path now passes an argument vector instead. Three sites genuinely
want a shell and keep it, with their arguments quoted: the lvm()
helper reads its JSON report via popen(), the content-addressed digest
pipeline quotes the volume path, and taking a volume down attempts a
umount whether or not anything mounted it, so that one keeps its
redirection and is now shared by both backends instead of spelt out
per call site. Suppressed errors that were only hiding a useless
diagnostic are dropped, and the filesystem grow tool is now located by
searching PATH instead of asking a shell.

lvm matches lvname with its own regular expression, and a volume name
was placed in that expression raw, so a dot in a name matched any
character instead of itself: a volume called a.b resolved to an
unrelated axb. Dotted names are the norm, since uxc composes a data
volume as &lt;container&gt;.&lt;volname&gt;; the name is now escaped where the
selection expression is built.

Every lvs, vgs and pvs caller dereferenced straight into the JSON
report, so an lvm invocation that failed to produce one, or failed to
run at all, crashed with a reference error instead of an error code.
Both now report through the .retval every caller already checks.

Volume names reaching the command line are now restricted to
^[A-Za-z0-9_][A-Za-z0-9._-]*$: a leading dot is reserved for uvol's
own volumes such as .meta, and a leading dash would be read as an
option by the backend tools. Only the read-only verbs may name an
internal volume, closing remove, down and resize being able to target
the metadata volume, which the backends never rejected the way mount
registration does; uvol's own boot path calls the backend directly
and is unaffected. The check runs before the per-volume lock, which is
keyed on the volume name too, which is why the -j flag is now consumed
before both. A rejected name exits 22 rather than falling off the end
of the script, which reports success.

Reachable only by root today, through the command line or a volume
name composed by uxc from an author-controlled registration; fixed as
defence in depth.

Fixes: 6350c7bc6 ("uvol: replace with re-write in ucode")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>uvol: bump version to 1.1</title>
<updated>2026-07-25T22:53:57Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-07-25T17:46:50Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=cb60600aec1b46b781c3bf72bdef2f4ce95fe9e1'/>
<id>urn:sha1:cb60600aec1b46b781c3bf72bdef2f4ce95fe9e1</id>
<content type='text'>
manage volume state over ubus instead of the rootfs

Rework the volume lifecycle around blockd's ubus API, so volume state
lives entirely on the self-describing LVM/UBI backing store and never
leaks into the firmware rootfs.

- register active volumes with blockd over ubus (mount.uc) instead of
  spooling mounts into /etc/config/fstab (uci.uc)

- bootstrap .meta from 'uvol boot' and drop the broken 90-uvol-init
  uci-default

- run 'uvol boot' straight from the mount.ready trigger, and query
  'ubus call block status' at service start to cover storage already
  being ready

- defer removal of a volume whose backing device is still held, and
  reap it from the mount.umount trigger once it is free

- enforce content-addressed "&lt;algo&gt;-&lt;hexdigest&gt;" volumes in the
  dispatcher: reuse an existing volume of the same digest, verify
  every write

- verify a content-addressed write in place while the volume is still
  incomplete, reporting EBADMSG on mismatch instead of flipping
  volume state

- purge incomplete wo/wp leftovers on boot and reclaim an exactly
  matching one on create

- serialise mutating commands with a device-wide lock, plus a
  per-volume lock ordered after it so a slow write cannot stall other
  volumes

- add a grow-only 'resize' verb to both backends: lvextend plus the
  matching fs-grow tool for lvm, ubirsvol for ubi

- create ext4 volumes with a journal (was ext2) and request check_fs
  when registering a read-write volume

- declare read-only mounts to blockd rather than letting block guess
  from the filesystem

- reject non-numeric and non-positive sizes in create and resize

- report its own version

- simplify command line parsing (drop compatibility with ancient ucode)

Requires the matching fstools changes from
openwrt/openwrt@9b11fa4088c6a.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>uvol: fix autopart on devices using fitblk</title>
<updated>2025-06-08T21:15:39Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2025-05-16T00:52:53Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=317598bed2a179e0c0e77f49cadc6a275db597a1'/>
<id>urn:sha1:317598bed2a179e0c0e77f49cadc6a275db597a1</id>
<content type='text'>
Correctly detect the block device used for booting also on devices
using the new fitblk driver.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>uvol: add support for detecting fitblk boot device</title>
<updated>2024-02-26T05:14:10Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2024-02-26T05:08:04Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=0bdf2fcbe902a4e3a6023788c7c8227b9ce9f423'/>
<id>urn:sha1:0bdf2fcbe902a4e3a6023788c7c8227b9ce9f423</id>
<content type='text'>
Auto-detect LVM2 volume on boot device used with fitblk uImage.FIT
sub-image driver.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>uvol: switch to /sys/class/ubi</title>
<updated>2023-02-15T04:06:36Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2023-02-15T04:04:12Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=3d86716b4f83aa827e0b28ba6d27a9c71855eb96'/>
<id>urn:sha1:3d86716b4f83aa827e0b28ba6d27a9c71855eb96</id>
<content type='text'>
Instead of /sys/devices/virtual/ubi which will no longer be available
in future kernels, switch to /sys/class/ubi.
While at it fix unrelated arithmetic syntax error by guarding the
affected expression to not run on an empty string.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>uvol: add missing quote</title>
<updated>2023-01-25T03:34:31Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2023-01-25T03:33:43Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=adce04d840ea0dee718455a51a576122c7a460a7'/>
<id>urn:sha1:adce04d840ea0dee718455a51a576122c7a460a7</id>
<content type='text'>
Add missing quote which broke the autopart script.

Fixes: b1edbe349 ("uvol: fix regression in handling fractional megabytes free")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>uvol: fix regression in handling fractional megabytes free</title>
<updated>2023-01-23T01:31:52Z</updated>
<author>
<name>Philip Prindeville</name>
</author>
<published>2023-01-18T22:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=b1edbe349f9e70c72c4a48565a4fd37c94f20a0a'/>
<id>urn:sha1:b1edbe349f9e70c72c4a48565a4fd37c94f20a0a</id>
<content type='text'>
Also, fix off-by-one issue when computing free size.

Signed-off-by: Philip Prindeville &lt;philipp@redfish-solutions.com&gt;
</content>
</entry>
<entry>
<title>uvol: fix autopart handling double/float number</title>
<updated>2022-08-14T18:51:37Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2022-08-14T18:51:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=f50a289e515fcdc49da5c19d58ed3af54c640cd4'/>
<id>urn:sha1:f50a289e515fcdc49da5c19d58ed3af54c640cd4</id>
<content type='text'>
Consider only integer part of free space in megabytes when
deciding the boundaries of the to be created partition.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>uvol: unbreak if LVM is installed but unused</title>
<updated>2022-04-13T17:01:49Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2022-04-07T10:54:50Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/feed/packages/commit/?id=3959a9b22c52e3328e462af419c72a3a0f0814cd'/>
<id>urn:sha1:3959a9b22c52e3328e462af419c72a3a0f0814cd</id>
<content type='text'>
Fix and simplify console output, make sure uvol doesn't break in case
of LVM being installed but not used.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
</feed>
