3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

546962 commits

Author SHA1 Message Date
Raito Bezarius 73198870cd nixos/tests/pgbouncer: do not use ensureDBOwnership
pgbouncer test is special in the sense where it actually tries
to connect via SCRAM SHA, let's avoid `ensureDBOwnership` here
otherwise for some reason pgbouncer will try to look in pg_shadow
for the authuser…
2023-11-17 15:52:51 +01:00
Raito Bezarius d57926c0b6 nixos/postgresql: improve the assertions for equality of DB user and DB name
It is hard to figure out which one is offending without the database name.
2023-11-13 17:16:25 +01:00
Raito Bezarius 12797a6a39 nixos/postgresql: restore ensurePermissions and strong-deprecate it
As it is technically a breaking change, we should at least make a strong deprecation
of `ensurePermissions` and leave it in the broken state it is, for out of tree users.

We give them a 6 months notice to migrate away by doing so, which is honest.
In the meantime, we forbid usage of `ensurePermissions` inside of nixpkgs.
2023-11-13 17:16:25 +01:00
Maximilian Bosch 48459567ae nixos/postgresql: drop ensurePermissions, fix ensureUsers for postgresql15
Closes #216989

First of all, a bit of context: in PostgreSQL, newly created users don't
have the CREATE privilege on the public schema of a database even with
`ALL PRIVILEGES` granted via `ensurePermissions` which is how most of
the DB users are currently set up "declaratively"[1]. This means e.g. a
freshly deployed Nextcloud service will break early because Nextcloud
itself cannot CREATE any tables in the public schema anymore.

The other issue here is that `ensurePermissions` is a mere hack. It's
effectively a mixture of SQL code (e.g. `DATABASE foo` is relying on how
a value is substituted in a query. You'd have to parse a subset of SQL
to actually know which object are permissions granted to for a user).

After analyzing the existing modules I realized that in every case with
a single exception[2] the UNIX system user is equal to the db user is
equal to the db name and I don't see a compelling reason why people
would change that in 99% of the cases. In fact, some modules would even
break if you'd change that because the declarations of the system user &
the db user are mixed up[3].

So I decided to go with something new which restricts the ways to use
`ensure*` options rather than expanding those[4]. Effectively this means
that

* The DB user _must_ be equal to the DB name.
* Permissions are granted via `ensureDBOwnerhip` for an attribute-set in
  `ensureUsers`. That way, the user is actually the owner and can
  perform `CREATE`.
* For such a postgres user, a database must be declared in
  `ensureDatabases`.

For anything else, a custom state management should be implemented. This
can either be `initialScript`, doing it manual, outside of the module or
by implementing proper state management for postgresql[5], but the
current state of `ensure*` isn't even declarative, but a convergent tool
which is what Nix actually claims to _not_ do.

Regarding existing setups: there are effectively two options:

* Leave everything as-is (assuming that system user == db user == db
  name): then the DB user will automatically become the DB owner and
  everything else stays the same.

* Drop the `createDatabase = true;` declarations: nothing will change
  because a removal of `ensure*` statements is ignored, so it doesn't
  matter at all whether this option is kept after the first deploy (and
  later on you'd usually restore from backups anyways).

  The DB user isn't the owner of the DB then, but for an existing setup
  this is irrelevant because CREATE on the public schema isn't revoked
  from existing users (only not granted for new users).

[1] not really declarative though because removals of these statements
    are simply ignored for instance: https://github.com/NixOS/nixpkgs/issues/206467
[2] `services.invidious`: I removed the `ensure*` part temporarily
    because it IMHO falls into the category "manage the state on your
    own" (see the commit message). See also
    https://github.com/NixOS/nixpkgs/pull/265857
[3] e.g. roundcube had `"DATABASE ${cfg.database.username}" = "ALL PRIVILEGES";`
[4] As opposed to other changes that are considered a potential fix, but
    also add more things like collation for DBs or passwords that are
    _never_ touched again when changing those.
[5] As suggested in e.g. https://github.com/NixOS/nixpkgs/issues/206467
2023-11-13 17:16:25 +01:00
Nick Cao c42941c549
Merge pull request #267148 from r-ryantm/auto-update/moonlight-qt
moonlight-qt: 5.0.0 -> 5.0.1
2023-11-13 08:41:31 -05:00
Nick Cao f14a0a7724
Merge pull request #267139 from mfrw/mfrw/pyenv-2.3.32
pyenv: 2.3.31 -> 2.3.32
2023-11-13 08:39:40 -05:00
Nick Cao 25116fd3e2
Merge pull request #267183 from r-ryantm/auto-update/cargo-binstall
cargo-binstall: 1.4.4 -> 1.4.5
2023-11-13 08:37:09 -05:00
Nick Cao a18e4aaff8
Merge pull request #267184 from aaronjheng/svtplay-dl
svtplay-dl: use nose3 for Python 3.11
2023-11-13 08:36:35 -05:00
Nick Cao 8f7a6554c0
Merge pull request #267187 from urish/magic_vlsi_8.3.447
magic-vlsi: 8.3.446 -> 8.3.447
2023-11-13 08:35:40 -05:00
Nick Cao 1d0af2a585
Merge pull request #267190 from oluceps/update-fscan
fscan: 1.8.2 -> 1.8.3
2023-11-13 08:34:51 -05:00
Nick Cao 8e8b397526
Merge pull request #267192 from wrbbz/pulumi-bin-3.93.0
pulumi-bin: 3.92.0 -> 3.93.0
2023-11-13 08:33:58 -05:00
Nick Cao 67296a9cac
Merge pull request #267193 from fabaff/pytenable-fix
python311Packages.pytenable: disable tests which requires network access
2023-11-13 08:33:39 -05:00
Nick Cao 565d973451
Merge pull request #267194 from fabaff/python-twitch-client-fix
python311Packages.python-twitch-client: fix build
2023-11-13 08:33:17 -05:00
Nick Cao b54d7ccebe
Merge pull request #267205 from fabaff/weconnect-bump
python311Packages.weconnect: 0.59.1 -> 0.59.4, python311Packages.weconnect-mqtt: 0.47.0 -> 0.48.2
2023-11-13 08:30:59 -05:00
Nick Cao 29057d4ce8
Merge pull request #266466 from GaetanLepage/exputils
python311Packages.experiment-utilities: 0.3.5 -> 0.3.6
2023-11-13 08:27:46 -05:00
Silvan Mosberger fdee770336
Merge pull request #263575 from pbsds/contributing-link-naming-conventino
CONTRIBUTING: Add hotlinks to package and module reviewing guides, minor touchups
2023-11-13 14:01:33 +01:00
VuiMuich aefffb674c bk: init at 0.6.0
add `mainProgram`

move package to `pkgs/by-name`
2023-11-13 13:53:57 +01:00
dependabot[bot] afaf639666 build(deps): bump korthout/backport-action from 2.1.0 to 2.1.1
Bumps [korthout/backport-action](https://github.com/korthout/backport-action) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](https://github.com/korthout/backport-action/compare/v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 13:49:56 +01:00
teutat3s f5619ed436 signal-desktop: 6.37.0 -> 6.38.0, signal-desktop-beta: 6.38.0-beta1 ->
6.39.0-beta2

https://github.com/signalapp/Signal-Desktop/releases/tag/v6.38.0

https://github.com/signalapp/Signal-Desktop/compare/v6.38.0-beta.1...v6.39.0-beta.2
2023-11-13 13:49:07 +01:00
Peder Bergebakken Sundt 8feb68f965 {pkgs,nixos}/README.md: Hotlink package and module reviewing guidelines, fix references 2023-11-13 13:46:14 +01:00
Fabian Möller cd631134df AusweisApp2: 1.26.7 -> 2.0.1 2023-11-13 13:43:39 +01:00
Fabian Affolter b4a90bcdc2 python311Packages.weconnect-mqtt: 0.47.0 -> 0.48.2
Diff: https://github.com/tillsteinbach/WeConnect-mqtt/compare/refs/tags/v0.47.0...v0.48.2

Changelog: https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/v0.48.2
2023-11-13 13:41:30 +01:00
Fabian Affolter 8906b66ad2 python311Packages.weconnect: 0.59.1 -> 0.59.4
Diff: https://github.com/tillsteinbach/WeConnect-python/compare/refs/tags/v0.59.1...v0.59.4

Changelog: https://github.com/tillsteinbach/WeConnect-python/releases/tag/v0.59.4
2023-11-13 13:41:16 +01:00
Orivej Desh 6ed37e8e04
jack_capture: 0.9.73 -> 0.9.73.2023-01-04 (#264941)
Fixes #263505 (broken build)

Upstream has fixed this in 2021 (https://github.com/kmatheussen/jack_capture/pull/45)
but has made no releases since (https://github.com/kmatheussen/jack_capture/issues/32)
2023-11-13 12:04:59 +00:00
Mario Rodas c241965533
Merge pull request #267191 from fabaff/pytest-json-report-fix
python311Packages.pytest-json-report: disable failing test
2023-11-13 06:43:42 -05:00
Fabian Affolter 4944d3f313
Merge pull request #267147 from r-ryantm/auto-update/kube-bench
kube-bench: 0.6.18 -> 0.6.19
2023-11-13 12:29:03 +01:00
Fabian Affolter 19943f9cfd
Merge pull request #267157 from r-ryantm/auto-update/python311Packages.genanki
python311Packages.genanki: 0.13.0 -> 0.13.1
2023-11-13 12:24:58 +01:00
Fabian Affolter 81e65b93db
Merge pull request #267165 from r-ryantm/auto-update/python311Packages.sqlmap
python311Packages.sqlmap: 1.7.10 -> 1.7.11
2023-11-13 12:22:48 +01:00
Fabian Affolter e663e25172
Merge pull request #267170 from fabaff/pyenphase-bump
python311Packages.pyenphase: 1.14.2 -> 1.14.3
2023-11-13 12:21:52 +01:00
Fabian Affolter e6480813e1
Merge pull request #266983 from natsukium/py-stringmatching
python311Packages.py-stringmatching: rename from py_stringmatching
2023-11-13 12:21:24 +01:00
Fabian Affolter 95b40d0ffd python311Packages.python-twitch-client: fix build 2023-11-13 12:02:09 +01:00
Fabian Affolter 91de96e098 python311Packages.pytenable: disable tests which requires network access 2023-11-13 11:56:28 +01:00
Arseniy Zorin d7e9509df7 pulumi-bin: 3.92.0 -> 3.93.0 2023-11-13 11:48:46 +01:00
Fabian Affolter 08ef1603a5 python311Packages.pytest-json-report: disable failing test 2023-11-13 11:45:09 +01:00
Fabian Affolter 115ddb0662
Merge pull request #267159 from r-ryantm/auto-update/python311Packages.prayer-times-calculator
python311Packages.prayer-times-calculator: 0.0.9 -> 0.0.10
2023-11-13 11:36:14 +01:00
oluceps 113a2aca06
fscan: 1.8.2 -> 1.8.3
Diff: https://github.com/shadow1ng/fscan/compare/1.8.2...1.8.3
2023-11-13 18:32:45 +08:00
Jonas Heinrich 4f38dbab82
Merge pull request #266025 from onny/cups-firewall2
nixos/printing: Fix openFirewall option
2023-11-13 11:15:18 +01:00
Robert Hensing 93cb2c2a92
Merge pull request #266347 from hercules-ci/nix-check-fallback-paths
`nix`: check fallback paths
2023-11-13 10:47:23 +01:00
Aaron Jheng 73a65850e0
svtplay-dl: use nose3 for Python 3.11 2023-11-13 09:43:56 +00:00
markuskowa 605b466982
Merge pull request #267172 from hmenke/spglib
spglib: enable Fortran support
2023-11-13 10:39:10 +01:00
Uri Shaked 4335400d78 magic-vlsi: 8.3.446 -> 8.3.447 2023-11-13 11:30:40 +02:00
R. Ryantm b95bcba22a cargo-binstall: 1.4.4 -> 1.4.5 2023-11-13 09:28:47 +00:00
Emily Trau 6c86876295
Merge pull request #266096 from emilytrau/pioasm
pioasm: init at 1.5.1
2023-11-13 19:40:18 +11:00
Jonas Heinrich 2a3d60cfa3
Merge pull request #266026 from onny/wc4nix-update
nc4nix: unstable-2023-06-06 -> unstable-2023-11-06
2023-11-13 09:36:39 +01:00
Henri Menke a83d9dc773
spglib: enable Fortran support 2023-11-13 09:15:01 +01:00
Fabian Affolter f0e0d4a58c python311Packages.pyenphase: 1.14.2 -> 1.14.3
Diff: https://github.com/pyenphase/pyenphase/compare/refs/tags/v1.14.2...v1.14.3

Changelog: https://github.com/pyenphase/pyenphase/blob/1.14.3/CHANGELOG.md
2023-11-13 09:05:11 +01:00
Fabian Affolter 49c89858e9
python311Packages.genanki: update disabled 2023-11-13 08:55:36 +01:00
Fabian Affolter 593869a360
Merge pull request #267161 from r-ryantm/auto-update/python311Packages.rokuecp
python311Packages.rokuecp: 0.18.1 -> 0.18.2
2023-11-13 08:52:53 +01:00
Fabian Affolter 7e9ea51d71
Merge pull request #267144 from r-ryantm/auto-update/python311Packages.unstructured
python311Packages.unstructured: 0.10.24 -> 0.10.30
2023-11-13 08:52:03 +01:00
R. Ryantm 4dc51ec210 python311Packages.sqlmap: 1.7.10 -> 1.7.11 2023-11-13 07:45:29 +00:00