Commit Graph
733794 Commits
Author SHA1 Message Date
Fabian Affolter 84b8f93de3 python312Packages.aiomisc: 17.5.29 -> 17.5.31
Changelog: https://github.com/aiokitchen/aiomisc/blob/master/CHANGELOG.md
2025-01-01 10:13:16 +01:00
Fabian Affolter e2543131df python312Packages.pyvlx: 0.2.25 -> 0.2.26
Diff: https://github.com/Julius2342/pyvlx/compare/refs/tags/0.2.25...0.2.26

Changelog: https://github.com/Julius2342/pyvlx/releases/tag/0.2.26
2025-01-01 10:11:14 +01:00
R. Ryantm 7e5f439281 yarn-berry: 4.5.3 -> 4.6.0 2025-01-01 09:11:00 +00:00
Sefa EyeogluandGitHub 586989451c turnon: 1.6.2 -> 2.0.0 (#367822) 2025-01-01 10:09:49 +01:00
Bobby RongandGitHub 84662e74b9 Pantheon updates 2024-12-31 (#369702) 2025-01-01 17:04:31 +08:00
Fabian Affolter 760f794ef6 python312Packages.pylamarzocco: 1.4.5 -> 1.4.6
Diff: https://github.com/zweckj/pylamarzocco/compare/refs/tags/v1.4.5...v1.4.6

Changelog: https://github.com/zweckj/pylamarzocco/releases/tag/v1.4.6
2025-01-01 10:04:02 +01:00
Fabian Affolter 010d40f68b python312Packages.pylamarzocco: 1.4.3 -> 1.4.5
Diff: https://github.com/zweckj/pylamarzocco/compare/refs/tags/v1.4.3...v1.4.5

Changelog: https://github.com/zweckj/pylamarzocco/releases/tag/v1.4.5
2025-01-01 10:03:53 +01:00
Fabian Affolter 1a77b3b360 python312Packages.aiorussound: 4.3.0 -> 4.4.0
Diff: https://github.com/noahhusby/aiorussound/compare/refs/tags/4.3.0...4.4.0

Changelog: https://github.com/noahhusby/aiorussound/releases/tag/4.4.0
2025-01-01 10:03:12 +01:00
Fabian Affolter 459a017af3 python312Packages.aiorussound: 4.2.0 -> 4.3.0
Diff: https://github.com/noahhusby/aiorussound/compare/refs/tags/4.2.0...4.3.0

Changelog: https://github.com/noahhusby/aiorussound/releases/tag/4.3.0
2025-01-01 10:03:06 +01:00
Fabian Affolter 4f75a1919c sqlfluff: 3.2.5 -> 3.3.0
Changelog: https://github.com/sqlfluff/sqlfluff/blob/3.3.0/CHANGELOG.md
2025-01-01 10:01:43 +01:00
Fabian Affolter 5ebfa75b5f wafw00f: 2.2.0 -> 2.3.1
Diff: https://github.com/EnableSecurity/wafw00f/compare/refs/tags/v2.2.0...v2.3.1

Changelog: https://github.com/EnableSecurity/wafw00f/releases/tag/v2.3.1
2025-01-01 09:46:43 +01:00
Fabian Affolter acd43b89da python312Packages.tencentcloud-sdk-python: 3.0.1292 -> 3.0.1293
Diff: https://github.com/TencentCloud/tencentcloud-sdk-python/compare/refs/tags/3.0.1292...3.0.1293

Changelog: https://github.com/TencentCloud/tencentcloud-sdk-python/blob/3.0.1293/CHANGELOG.md
2025-01-01 09:42:47 +01:00
R. Ryantm 21d6bafca6 starpls: 0.1.20 -> 0.1.21 2025-01-01 08:41:23 +00:00
Fabian AffolterandGitHub e37946f2f7 python312Packages.tencentcloud-sdk-python: 3.0.1291 -> 3.0.1292 (#369707) 2025-01-01 09:40:31 +01:00
Fabian AffolterandGitHub 4f585bc4fe python312Packages.ohmepy: init at 1.2.3 (#369709) 2025-01-01 09:40:07 +01:00
Fabian AffolterandGitHub 06833876be ldeep: 1.0.77 -> 1.0.78 (#369619) 2025-01-01 09:39:23 +01:00
Fabian AffolterandGitHub c3d3895c4c python312Packages.cyclopts: 3.1.2 -> 3.1.3 (#369635) 2025-01-01 09:36:30 +01:00
R. RyanTMandGitHub 9b79905b2e keypunch: 5.0 -> 5.1 (#369797) 2025-01-01 03:34:58 -05:00
R. RyanTMandGitHub 9547942d09 gnome-secrets: 10.3 -> 10.4 (#369598) 2025-01-01 03:34:11 -05:00
Fabian AffolterandGitHub 3012a3a6d0 python312Packages.aiomealie: 0.9.4 -> 0.9.5 (#369499) 2025-01-01 09:31:50 +01:00
Pol DellaieraandGitHub cebdf83ec6 pack: 0.36.1 -> 0.36.2 (#369888) 2025-01-01 09:31:33 +01:00
R. RyanTMandGitHub 0670ce28e7 television: 0.8.1 -> 0.8.5 (#369881) 2025-01-01 03:30:56 -05:00
R. Ryantm 346f146fbc codeberg-pages: 6.1 -> 6.2 2025-01-01 08:00:44 +00:00
R. Ryantm 55901e028e pack: 0.36.1 -> 0.36.2 2025-01-01 07:59:31 +00:00
K900 f711bf972b kdePackages: Plasma 6.2.4 -> 6.2.5 2025-01-01 10:57:26 +03:00
Vlad M.andGitHub bdab9f7815 skim: 0.15.5 -> 0.15.7 (#369842) 2025-01-01 09:34:04 +02:00
R. Ryantm b3c34f5144 rqlite: 8.36.1 -> 8.36.3 2025-01-01 07:21:08 +00:00
Masum RezaandGitHub 374743509c hyprlandPlugins.hyprsplit: 0.46.1 -> 0.46.2 (#369876) 2025-01-01 12:42:55 +05:30
R. Ryantm df8bb550f5 ast-grep: 0.32.2 -> 0.32.3 2025-01-01 06:39:22 +00:00
OTABI TomoyaandGitHub 995f1890a7 python312Packages.zc-buildout: 3.0.1 -> 3.3 (#369447) 2025-01-01 15:35:12 +09:00
Sergei Trofimovich b5e6e02b7c utf8proc: 2.9.0 -> 2.10.0 2025-01-01 06:23:56 +00:00
natsukium c465daf0fa python312Packages.keyring_24: remove
keyring_24 has been removed, use keyring instead
2025-01-01 15:19:42 +09:00
R. Ryantm 2fbed58cc3 hyprlandPlugins.hyprsplit: 0.46.1 -> 0.46.2 2025-01-01 06:19:07 +00:00
Mitchell Skaggs 10ef89de45 nixos/services.tor: remove with lib; 2025-01-01 00:18:07 -06:00
natsukium c2924cef01 python312Packages.craft-store: 3.0.2 -> 3.1.0
Diff: https://github.com/canonical/craft-store/compare/refs/tags/3.0.2...3.1.0

Changelog: https://github.com/canonical/craft-store/releases/tag/3.1.0
2025-01-01 15:16:56 +09:00
natsukium 217bf120c0 python312Packages.macaroonbakery: refactor 2025-01-01 15:16:55 +09:00
natsukium 169ee736fc python312Packages.macaroonbakery: fix version string 2025-01-01 15:16:55 +09:00
fumnanya 1c4557ce2d xoscope: fix build for gcc14 2025-01-01 07:10:46 +01:00
Tristan Ross a5877ab314 flutter327: 3.27.0-0.1.pre -> 3.27.1 2024-12-31 22:00:27 -08:00
Silvan MosbergerandGitHub 82d084b914 release: forbid use of lib.fileset in Nixpkgs (#369694) 2025-01-01 06:51:48 +01:00
Samuel Dionne-Riel 40fb9e7c5a switch-to-configuration-ng: Fix exit status on bootloader install error
The problem
-----------

When rebuilding a system, if `switch-to-configuration-ng` fails to install
bootloader files, it will (most likely) `exit(0)`.

```
/etc/nixos $ sudo nixos-rebuild --fast boot && reboot
[sudo] password for samuel:
building the system configuration...
updating GRUB 2 menu...
cannot copy /nix/store/.../initrd to /boot/kernels/...-initrd.tmp: No space left on device
Failed to install bootloader

Broadcast message from samuel@... on pts/1 (Tue 2024-12-31 16:48:26 EST):

The system will reboot now!
```

This is a quite awkward breaking change with the expected behaviour.

* * *

The investigation
-----------------

Compare:

 - https://github.com/NixOS/nixpkgs/blob/85b5f3e959327a3fa46f843848ebb8799069bb95/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs#L171-L179
 - https://github.com/NixOS/nixpkgs/blob/85b5f3e959327a3fa46f843848ebb8799069bb95/nixos/modules/system/activation/switch-to-configuration.pl#L115-L117

Let's see what `die()` is all about:

 - https://github.com/NixOS/nixpkgs/blob/85b5f3e959327a3fa46f843848ebb8799069bb95/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs#L121-L125

***sus.***

There are multiple issues converging here.

**Incorrect port**

The original implementation did not use `die`, but `exit 1`.

So porting from `perl` following the script's idiosyncrasies was not
done appropriately.

**Incorrect `die` fac-simile**

The `die` method is incomplete with regard to the semantics of perl.

 - https://perldoc.perl.org/5.40.0/functions/die

Of importance to us:

> If [die is called],  the exit code is determined from the values of
> `$!` and `$?` with this pseudocode:
>
> ```
> exit $! if $!;              # errno
> exit $? >> 8 if $? >> 8;    # child exit status
> exit 255;                   # last resort
> ```

The `die()` method in `switch-to-configuration-ng` *only* checks
`errno`, using its value directly to `exit()`.

It does not handle some form of implicit child process exit status.

And, due to incorrect assumptions, it will not fall back to anything.

**Incorrect implementation**

(Note that from this point on, I'm not a Rust expert, so bear with me if
some nuances are lost or incorrectly represented.)

The `die()` function implementation, as a port, might not even work
correctly.

Already, the `spawn` method does not mention it would be setting
`errno`, so any `die()` following a `status.success()` is *sus* and
should be investigated. Since it's not attempting to do anything "smart"
with child processes.

 - https://doc.rust-lang.org/1.83.0/std/process/struct.Command.html#method.spawn

And I'd argue that using *errno* in this manner in Rust is probably a
mistake, and should not be done.

> This should be called immediately after a call to a platform function,
> otherwise the state of the error value is indeterminate.

 - https://doc.rust-lang.org/1.83.0/std/io/struct.Error.html#method.last_os_error

Considering *platform function* is largely left undefined, I would
(probably wrongly) intuit that it should be considered undefined
behaviour to rely on it.

Note that `raw_os_error` might have a surprising interface.

> If this `Error` was constructed via `last_os_error` [...],
> then this function will return `Some`, otherwise it will return `None`.

 - https://doc.rust-lang.org/1.83.0/std/io/struct.Error.html#method.raw_os_error

Since it's used as `std::io::Error::last_os_error().raw_os_error()`,
AFAIUI it will always return `Some`.

Since this is exposing `errno`, the libc concept, it will behave the
same, and may be set to `0` by default, just like here:

```
$ printf '#include <stdlib.h>\n#include <errno.h>\nint main() { exit(errno); }' \
    | cc -x c - && ./a.out; echo $?
0
```

Which means that, since no *platform function*[sic] changed its value,
it will be zero, the `die()` function will be equivalent to `exit(errno)`,
and the program will have failed “successfully” wrongly.

* * *

The fix
-------

I've fixed the `do_pre_switch_check` and `do_install_bootloader` methods,
both of which share the same defects (the original script uses `exit 1`
for both).

They were the only `status.success()` checks using `die()`.

* * *

Reproducing the issue
---------------------

Remember how I said:

> Considering *platform function* is largely left undefined, I would
> (probably wrongly) intuit that it should be considered undefined
> behaviour to rely on it.

Here's why it's not some vague FUD.

First, make sure a `nixos-rebuild boot` would need to write new files to
the boot partition. Removing an older (but still alive) generation's
initrd can do that.

Fill the `/boot` partition to force an error.

```
 $ sudo dd if=/dev/zero of=/boot/BOGUS.FILLINGS
```

Then, and here's the fun part, observe:

```
~ $ sudo rm -r /run/nixos

~ $ sudo nixos-rebuild --fast boot ; echo $?
building the system configuration...
updating GRUB 2 menu...
cannot copy /nix/store/x91w4p91l7iclkdp38chvdxcw6nr5113-mobile-nixos-initrd-generic/initrd to /boot/kernels/x91w4p91l7iclkdp38chvdxcw6nr5113-mobile-nixos-initrd-generic-initrd.tmp: No space left on device
Failed to install bootloader
0

~ $ sudo nixos-rebuild --fast boot ; echo $?
building the system configuration...
updating GRUB 2 menu...
cannot copy /nix/store/x91w4p91l7iclkdp38chvdxcw6nr5113-mobile-nixos-initrd-generic/initrd to /boot/kernels/x91w4p91l7iclkdp38chvdxcw6nr5113-mobile-nixos-initrd-generic-initrd.tmp: No space left on device
Failed to install bootloader
warning: error(s) occurred while switching to the new configuration
1
```

So... What's the deal with /run/nixos? It's where the lock file will
reside. (And other transient files.)

 - https://github.com/NixOS/nixpkgs/blob/85b5f3e959327a3fa46f843848ebb8799069bb95/pkgs/by-name/sw/switch-to-configuration-ng/src/src/main.rs#L1018-L1027

But why does that matter here?

```
~ $ errno 17
EEXIST 17 File exists
```

This error is produced by some *platform functions*[sic] that create
either the directory, or the lockfile. The file already exists.

So the script would end-up failing this way *only for the first
invocation*. Which is why it's possible any of you all reviewing this
~~novel~~ PR haven't faced that issue.

* * *

Future work
-----------

I believe `die()` *probably* should be switched to check the value, and
`exit 255` if it's 0.

Though I also believe `die()` shouldn't try to port perl semantics into
Rust. I don't think it's working out.

Additionally, a NixOS test should be authored to ensure that errors in
these phases actually are handled appropriately.

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
2025-01-01 00:32:55 -05:00
natsukium eb8171e4d1 python312Packages.pyviz-comms: 2.2.1 -> 3.0.3
Diff: https://github.com/holoviz/pyviz_comms/compare/v2.2.1...v3.0.3
2025-01-01 14:30:24 +09:00
Gliczy df8c70a043 alpaca: 3.1.0 -> 3.2.0 2025-01-01 06:26:50 +01:00
natsukium 17f61f9201 python312Packages.plone-testing: 9.0.1 -> 9.0.3
Diff: https://github.com/plone/plone.testing/compare/9.0.1...9.0.3
2025-01-01 14:09:08 +09:00
Austin HorstmanandGitHub b1162df0ae ardour: use librdf_raptor2 (#369048) 2024-12-31 23:06:06 -06:00
Weijia WangandGitHub 58e9f7beaa python312Packages.pydata-sphinx-theme: 0.16.0 -> 0.16.1 (#365962) 2025-01-01 05:41:23 +01:00
Weijia WangandGitHub a4a8e8e413 python312Packages.google-cloud-dlp: 3.25.1 -> 3.26.0 (#365906) 2025-01-01 05:38:51 +01:00
natsukium ef133575fe python312Packages.flask-sockets: remove
flask-sockets has been removed as the upstream repository was archived in 2022
2025-01-01 13:37:10 +09:00
Weijia WangandGitHub 20020fca9a python312Packages.django-pglock: 1.7.0 -> 1.7.1 (#366446) 2025-01-01 05:35:52 +01:00
Weijia WangandGitHub 21a6ba5a56 python312Packages.django-pgactivity: 1.7.0 -> 1.7.1 (#366447) 2025-01-01 05:35:05 +01:00