Commit Graph

110 Commits

Author SHA1 Message Date
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Artturin
26b7b2fe4d polkit: Apply unreleased patch to fix pkexec without a graphical agent
Merged upstream PR https://www.github.com/polkit-org/polkit/pull/423
2024-06-24 18:57:47 +03:00
Alyssa Ross
3df6bb2c85
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/applications/blockchains/polkadot/default.nix
2024-06-09 22:47:12 +01:00
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
Alyssa Ross
34a57d98c7 polkit: fix build with !useSystemd
Patch is upstream, but doesn't apply cleanly to 124.
2024-05-26 18:00:58 +02:00
Alyssa Ross
382c3ce5d0 pkgsStatic.polkit: mark unsupported 2024-05-20 10:31:33 +02:00
Thomas Mühlbacher
4b8fa41e83 polkit: move patch from archived upstream to local
since the repo at gitlab.fredesktop.org is archived, it's likely safer
to pull down this patch into nixpkgs directly. in case the archived repo
vanishes in the future.
2024-04-21 12:17:18 +02:00
Thomas Mühlbacher
5ea359c878 polkit: 123 -> 124
in the new release the meson option `systemdsystemunitdir` is broken by
the new `sysusers.d` code in `meson.build`. we fix this by setting both
of these pkg-config variables through environment variables.

Changes: https://github.com/polkit-org/polkit/compare/123...124
2024-04-13 19:40:49 +02:00
Thomas Mühlbacher
6ce6559ad8 polkit: upstream moved to github 2024-04-13 19:40:13 +02:00
Alois Wohlschlager
4ddb0b4b67
polkit: remove rsync build dependency
It the polkit post-install, the files that are supposed to live under /etc and
/run/current-system/sw/share have to be merged into the package at the correct
location. Previously, rsync was used for this job. By being a bit careful about
the ordering, it is possible to use plain mv instead. The main advantage is
that the number of transitive reverse dependencies of rsync is reduced
significantly, so rsync changes will no longer need to go through staging.
2023-11-19 19:08:43 +01:00
Anthony Roussel
e30f48be94
treewide: fix redirected and broken URLs
Using the script in maintainers/scripts/update-redirected-urls.sh
2023-11-11 10:49:01 +01:00
Adam Joseph
bc2d598878 treewide: change pythonForBuild to pythonOnBuildForHost 2023-11-05 17:42:12 -08:00
Alyssa Ross
af82a43ffc
treewide: disable gobject-introspection when unavailable
This makes gsettings-desktop-schemas, harfbuzz, json-glib, and
libsecret buildable statically, and is still the right thing to do
everywhere else even where it's not a complete fix.
2023-10-12 13:25:31 +00:00
Sergei Trofimovich
80422d2aab polkit: 122 -> 123
Changes: https://gitlab.freedesktop.org/polkit/polkit/-/compare/122...123
2023-09-12 08:19:08 +01:00
Alyssa Ross
97d4b225da
polkit: move test-only deps to nativeCheckInputs
(cherry picked from commit 1d9429faa0)
2023-03-20 16:29:56 +01:00
Alyssa Ross
52a479d024
polkit: re-disable introspection if no emulator
e.g. when cross compiling from Linux to FreeBSD.

Fixes: 1bd8727a4c ("various: enable gobject-introspection when cross-compiling")
2023-03-02 14:42:08 +00:00
Alyssa Ross
c4dc6ca635
polkit: remove obsolete gobject-introspection build input
Since b2f9cd34e7 ("gobject-introspection: use wrapper.nix for the
native package too so we can propagate the dev output"),
gobject-introspection doesn't need to be included in buildInputs when
it's in nativeBuildInputs, as it's propagated from the setup hook.

Removing the build input fixes evaluation in buildPackages when
cross-compiling to platforms that gobject-introspection is unsupported
on, like ghcjs.

Tested building natively on x86_64-linux, in
pkgsCross.aarch64-multiplatform, and in pkgsCross.ghcjs.buildPackages.
2023-02-04 18:45:28 +00:00
Adam Joseph
42815b4a0c treewide: systemdSupport: use lib.meta.availableOn
Many packages have some kind of flag indicating whether or not to build with
systemd support.  Most of these default to `stdenv.isLinux`, but systemd does
not build on (and is marked `broken` for) `isStatic`.  Only a few packages have
the needed `&& !isStatic` in the default value for their parameter.

This commit moves the logic for the default value of these flags into
`systemd.meta.{platforms,badPlatforms}` and evaluates those conditions using
`lib.meta.availableOn`.

This provides three benefits:

1. The default values are set correctly (i.e. including `&& isStatic`)

2. The default values are set consistently

3. The way is paved for any future non-Linux systemd platforms (FreeBSD is
   reported to have experimental systemd support)
2023-01-22 00:27:19 -08:00
Guillaume Girol
33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00
github-actions[bot]
9e23ec4f1c
Merge staging-next into staging 2022-12-15 00:03:02 +00:00
github-actions[bot]
58a71457f7
Merge master into staging-next 2022-12-15 00:02:26 +00:00
Ricardo M. Correia
897fa059a1 polkit: only fix mocklibc when doing tests
I got this error when setting doCheck=false:

chmod: cannot access 'subprojects/mocklibc-1.0/bin/mocklibc': No such file or directory

The chmod only happens when not building under pkgsMusl, but it doesn't
seem to be related to musl. Instead, it seems that mocklibc only gets
unpacked when -Dtests=true?

This would explain why under musl the same error would happen (since under
musl, tests are disabled).
2022-12-14 13:36:18 +00:00
Artturin
238a6053c4 stdenv: support opt-in __structuredAttrs
Co-authored-by: Robin Gloster <mail@glob.in>

stdenv: print message if structuredAttrs is enabled

stdenv: add _append

reduces the chance of a user doing it wrong

fix nix develop issue

output hooks don't work yet in nix develop though

making $outputs be the same on non-structuredAttrs and structuredAttrs
is too much trouble.

lets instead make a function that gets the output names

reading environment file '/nix/store/2x7m69a2sm2kh0r6v0q5s9z1dh41m4xf-xz-5.2.5-env-bin'
nix: src/nix/develop.cc:299: std::string Common::makeRcScript(nix::ref<nix::Store>, const BuildEnvironment&, const Path&): Assertion `outputs != buildEnvironment.vars.end()' failed.

use a function to get all output names instead of using $outputs

copy env functionality from https://github.com/NixOS/nixpkgs/pull/76732/commits
2022-12-08 06:13:19 +02:00
Jan Tojnar
7d04a75620
Merge pull request #197975 from jtojnar/polkit
polkit: 121 → 122
2022-12-03 23:44:36 +01:00
Jan Tojnar
84394f885d polkit: 121 → 122
https://gitlab.freedesktop.org/polkit/polkit/-/compare/121...122

Changelog-Reviewed-By: Jan Tojnar <jtojnar@gmail.com>
2022-10-26 23:31:24 +02:00
rnhmjoj
56aaee0ad9
polkit: mark as linux-only
While polkit is supposedly cross-platform, the test suite requires
a Linux-specific package (to test the D-Bus functionality). Since the
build fails when disabling the test, this effectively limits the
platform to just Linux.
2022-10-21 13:06:40 +02:00
Yureka
f95d9a668e pkgsMusl.polkit: fix build 2022-08-14 11:40:02 +02:00
bootstrap-prime
56d0dd7fc4
polkit: use systemdMinimal to avoid dep cycle 2022-07-23 20:37:03 -04:00
Jan Tojnar
15cdfd5e31 polkit: 0.120 → 121
Adds supports for mozjs-91 and switches the default JS engine to Duktape.

https://gitlab.freedesktop.org/polkit/polkit/-/compare/0.120...121
2022-07-13 23:50:40 +02:00
Artturin
20642e2ab0 various: readd gobject-introspection to buildInputs
see eb829035c9
2022-07-12 15:18:44 +03:00
Artturin
1bd8727a4c various: enable gobject-introspection when cross-compiling
and fix cross in some
2022-07-08 03:56:47 +03:00
Nick Cao
479329611e
polkit: fix build with meson 0.61 2022-03-13 12:16:17 +08:00
Martin Weinelt
08a80b7b00
polkit: Patch unauthenticated file descriptor leak
https://gitlab.freedesktop.org/polkit/polkit/-/issues/170
https://www.openwall.com/lists/oss-security/2022/02/18/1

Fixes: CVE-2021-4115
2022-02-18 19:49:52 +01:00
Martin Weinelt
bd3256cf4f polkit: fix local priviledge escalation in pkexec
> We discovered a Local Privilege Escalation (from any user to root) in
> polkit's pkexec, a SUID-root program that is installed by default on
> every major Linux distribution

https://www.qualys.com/2022/01/25/cve-2021-4034/pwnkit.txt

Fixes: CVE-2021-4034
2022-01-25 11:55:05 -08:00
Joerie de Gram
649a7d75b4 polkit: disable gtkdoc when cross compiling 2022-01-16 23:57:01 +01:00
Jan Tojnar
3b916a6b78 polkit: fix hash 2021-11-01 14:53:13 +01:00
Jan Tojnar
595c25f105 polkit: Fix regression in paths in pkg-config file
resulting from discrepancy between Meson and Autotools build systems.
2021-11-01 14:51:57 +01:00
Jan Tojnar
527b98a125 polkit: port to Meson
Autotools build will be removed in the next release.

Examples are no longer installed.

Musl patch does not work.
2021-10-31 05:05:16 +01:00
Jan Tojnar
54417ca863 polkit: 0.119 → 0.120
https://lists.freedesktop.org/archives/polkit-devel/2021-October/000608.html
2021-10-31 03:45:42 +01:00
Jan Tojnar
e6b0796129 polkit: format the expression
Use lib.optionals instead of lib.optional, move phases to the bottom, have one input per line.
2021-10-31 03:45:42 +01:00
Yureka
d4c85edba9 polkit: fix musl build
Update patches and make them unconditional to prevent rot.
Also do not make systemd support dependent on musl.
2021-10-20 12:57:34 +02:00
Rahul Rameshbabu
5aecb4202d polkit: 0.118 -> 0.119
The 0.119 release of polkit integrates the following changes, so the
patches implemented to incorporate these changes are no longer needed.

    * 273357a395
    * https://gitlab.freedesktop.org/polkit/polkit/-/blob/0.119/src/polkit/polkitsystembusname.c#L438-440

Fixes: CVE-2021-3560 without a patch
2021-06-28 07:46:34 -07:00
Martin Weinelt
26ac1d5db9
polkit: Fix local privilege escalation vulnerability
Fixes a local privilege escalation using polkit_system_bus_name_get_creds_sync()

Fixes: CVE-2021-3560
2021-06-03 21:31:57 +02:00
Jan Tojnar
0420282780
treewide maintainers: add teams.{freedesktop,gnome} 2021-05-07 15:36:40 +02:00
Vladimír Čunát
9f054b5e1a
treewide: remove worldofpeace from meta.maintainers
(It was requested by them.)
I left one case due to fetching from their personal repo:
pkgs/desktops/pantheon/desktop/extra-elementary-contracts/default.nix
2021-05-07 15:36:40 +02:00
Ben Siraphob
66e44425c6 pkgs/development/libraries: stdenv.lib -> lib 2021-01-21 19:11:02 -08:00
Jonathan Ringer
9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
Florian Klink
4f087a608e polkit: don't build with gobject-introspection when cross-compiling
gobject-introspection doesn't currently cross-compile (see
https://github.com/NixOS/nixpkgs/pull/88222), but polkit is somewhat
essential for many system components.

By disabling gobject-introspection when cross-compiling, we get it to
build.
2021-01-01 23:11:53 +01:00
Arnout Engelen
025af7c4f5
polkit: 0.116 -> 0.118 (#103998) 2020-11-17 11:15:30 +01:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00