Commit Graph

48 Commits

Author SHA1 Message Date
Felix Buehler
540499bf10 os-specific/linux: replace name with pname&version 2021-08-29 11:28:34 +02:00
Ben Siraphob
16d91ee628 pkgs/os-specific: stdenv.lib -> lib 2021-01-17 23:26:08 +07:00
Profpatsch
4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Graham Christensen
bc49a0815a
utillinux: rename to util-linux 2020-11-24 12:42:06 -05:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Bjørn Forsman
6b3832a519 mdadm: fix path to sendmail
Without this, mdadm won't be able to send email notifications:

  $ sudo mdadm --monitor --scan --test
  sh: /nix/store/2v8jn0lxza72grcm6hciak9fpgm7xb3a-system-sendmail-1.0: Is a directory

Fixes: b074a40f74 ("mdadm: use shared system-sendmail")
2019-09-18 20:56:40 +02:00
Nikolay Amiantov
b9b27912ce mdadm: install systemd units 2019-08-01 00:55:35 +03:00
Nikolay Amiantov
88d5b40d40 mdadm: use absolute paths
We also correct paths in udev rules. This is cleaner and allows for less
unexpected behaviour. We still check for self-references, however we do
it manually now and only for binaries as udev rules can have them.
Rather, we patch them out during initrd generation now.
2019-08-01 00:55:35 +03:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Léo Gaspard
b074a40f74 mdadm: use shared system-sendmail 2018-12-01 14:48:25 +09:00
Léo Gaspard
e9309a83c1
mdadm: 4.0 -> 4.1 2018-10-28 19:39:13 +09:00
John Ericson
0828e2d8c3 treewide: Remove usage of remaining redundant platform compatability stuff
Want to get this out of here for 18.09, so it can be deprecated
thereafter.
2018-08-30 17:20:32 -04:00
Markus Kowalewski
bd73e26cda
mdadm: add license 2018-08-17 22:40:20 +02:00
Matthew Bauer
143978a477 treewide: remove platform assertions
linux: readd assertion
2018-05-03 13:09:20 -05:00
Léo Gaspard
ec9a51d0cc mdadm: allow sending mail when using opensmtpd
OpenSMTPD does not require the setuid bit for its `sendmail`. This works
around it by wrapping the called `sendmail` so that the wrapper falls
back on either the setuid `sendmail` or the non-setuid `sendmail`
depending on what's available.

The solution of relying on `$PATH` to be set is unfortunately
unreliable, as `mdadm --monitor` will likely be executed from a
`systemd` unit, that runs with a clean `$PATH`.
2018-03-30 16:16:31 +02:00
Tuomas Tynkkynen
2f39b19535 mdadm: Make 4.0 the default
4.0 has been out for a year without another upstream release, so
presumably 4.x's quite stable enough (and already in Arch & Debian
Buster for instance).
2018-01-28 13:31:50 +02:00
Ben Gamari
7ed923f9d8 mdadm: Fix cross-compilation 2018-01-09 11:25:19 -05:00
John Ericson
e755a8a27d treewide: Use targetPrefix instead of prefix for platform name prefixes
Certain tools, e.g. compilers, are customarily prefixed with the name of
their target platform so that multiple builds can be used at once
without clobbering each other on the PATH. I was using identifiers named
`prefix` for this purpose, but that conflicts with the standard use of
`prefix` to mean the directory where something is installed. To avoid
conflict and confusion, I renamed those to `targetPrefix`.
2017-11-27 03:15:50 -05:00
Tuomas Tynkkynen
19387e3123 mdadm4: Fix build by including change from 7d010ab5f4
And drop `-std=gnu89` while at it.
2017-09-04 18:55:57 +03:00
Thomas Tuegel
7d010ab5f4
mdadm: unset STRIP
Commit 093cc00cdd, sets the STRIP environment
variable by default, but this confuses the mdadm Makefile, which uses STRIP as a
flag to `install'.
2017-07-21 15:43:25 -05:00
hsloan
5d83d36389 mdadm: Don't use stdenv.cross 2017-06-28 21:24:24 -04:00
Parnell Springmeyer
4aa0923009
Getting rid of the var indirection and using a bin path instead 2017-01-29 04:11:01 -06:00
Parnell Springmeyer
e92b8402b0
Addressing PR feedback 2017-01-28 20:48:03 -08:00
Parnell Springmeyer
025555d7f1
More fixes and improvements 2017-01-26 00:05:40 -08:00
Parnell Springmeyer
bae00e8aa8
setcap-wrapper: Merging with upstream master and resolving conflicts 2017-01-25 11:08:05 -08:00
Michael Raskin
5b9d80646b mdadm4: init at 4.0
Would be just mdadm: 3.3.4 -> 4.0, but it doesn't look like there are
urgent bugfixes, and it is a major release, and wrong RAID handling
kills data, so let's let the early adopters test it a bit.
2017-01-10 14:09:20 +01:00
Parnell Springmeyer
98c058a1ee Adapting everything for the merged permissions wrappers work. 2016-09-01 19:21:06 -05:00
Tuomas Tynkkynen
21f17d69f6 treewide: Add lots of meta.platforms
Build-tested on x86_64 Linux & Mac.
2016-08-02 21:42:43 +03:00
Bas van Dijk
a941c7e27b mdadm: call /var/setuid-wrappers/sendmail instead of /usr/sbin/sendmail 2016-05-04 15:27:53 +02:00
Vladimír Čunát
ae74c356d9 Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
2016-02-03 16:57:19 +01:00
Vladimír Čunát
f90e5ae3ba mdadm: fixup build with multiple-outputs
Needed after 011c149ed5.
2016-01-20 10:24:52 +01:00
Vladimír Čunát
72e6e6a483 tarball: fix evaluation of mdadm on darwin
It probably doesn't make any sense to have mdadm on darwin,
but we have to "fail in a right way".
2016-01-18 15:05:38 +01:00
aszlig
011c149ed5
mdadm: Set allowedReferences to only include libc.
The updates we had in the past (7719f7f and 1faf610) broke the mdadm
installer test and systems in the wild using mdraid because newer mdadm
versions contained a self-referenc to its own store path.

Instead of putting a big warning about updating in the package
expression, let's just add allowedReferences so the build immediately
fails if there is a self-reference.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-01-18 04:21:16 +01:00
aszlig
5e227e6f1d
mdadm: Clean up package expression.
Let's use makeFlags directly instead of stitching together a
makeFlagsArray in preBuild.

This should make the expression much more readable and clean.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-01-18 04:21:16 +01:00
aszlig
bcd31d0acb
mdadm: 3.3 -> 3.3.4
Okay, this update is a bit more tricky and the patch I've included is
not very nice to be honest.

So the patch causes "mdadm --udev-rules" to search for the right store
path using /proc/self/exec. This has the disadvantage that we could end
up having /run/current-system/bin/mdadm in the rule file.

But on the other hand, when we're on NixOS, we don't need to use that
command *at*all*, so we should be safe.

The patch also sets BINDIR to /sbin, which causes the included rule and
systemd files to not work out of the box on NixOS. But we have a
substituteInPlace where we do rewrite /sbin/mdadm to the right store
path in our udev rule generator, so that shouldn't be an issue.

I've tested this using the mdraid installer test and it succeeded.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-01-18 04:21:15 +01:00
William A. Kennington III
8f60f45eb6 mdadm: add gcc5 compat 2015-06-12 15:40:38 -07:00
aszlig
8664aea63d
Revert "mdadm: 3.3 -> 3.3.2".
This reverts commit 7719f7f23b, again!

It prevents systems from booting, for two reasons:

  * The initrd size is going to explode, but I think this is not the
    REAL issue. We had that in 666cf99 already, which reverted this
    update already.
  * Another reason I don't yet know, which is the REAL issue. We need to
    investigate and fix that before attempting another update.

Because of that I've also added a small comment before the src attribute
to prevent further updates like this.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-04-01 17:59:09 +02:00
William A. Kennington III
7719f7f23b mdadm: 3.3 -> 3.3.2 2015-03-26 17:40:11 -07:00
Eelco Dolstra
666cf992f0 Revert "mdadm: update from 3.3 to 3.3.2"
This reverts commit 1faf6106c3. It
causes the size of the initrd to explode from ~6 MB to 19 MB:

  http://hydra.nixos.org/build/15728196

The reason is that mdadm now contains a self-reference:

  $ strings ./result/sbin/mdadm  | grep /nix/store
  ...
  ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="%s", ENV{ID_PATH}=="%s", RUN+="/nix/store/y1ap6va0av6jhxf7ddnr8vdwxd7b44gd-mdadm-3.3.2/sbin/mdadm --incremental $env{DEVNAME}"
  ACTION=="add", SUBSYSTEM=="block", ENV{ID_PATH}=="%s", RUN+="/nix/store/y1ap6va0av6jhxf7ddnr8vdwxd7b44gd-mdadm-3.3.2/sbin/mdadm --incremental $env{DEVNAME}"
/nix/store/y1ap6va0av6jhxf7ddnr8vdwxd7b44gd-mdadm-3.3.2/sbin/mdmon

(Previously, it referred to /sbin/mdadm.) This causes mdadm, glibc and
linux-headers to be added to the initrd.
2014-10-09 18:34:37 +02:00
Aristid Breitkreuz
1faf6106c3 mdadm: update from 3.3 to 3.3.2 2014-10-07 21:50:40 +02:00
William A. Kennington III
47c3272b1f Update MDadm from 3.1.2 -> 3.3
Additionally, remove the old udev patch since this version has a rule
for enabling mdraid arrays
2013-11-28 00:52:12 -06:00
Eelco Dolstra
ab3eeabfed Rename buildNativeInputs -> nativeBuildInputs
Likewise for propagatedBuildNativeInputs, etc.  "buildNativeInputs"
sounds like an imperative rather than a noun phrase.
2012-12-28 19:20:09 +01:00
Peter Simons
ddd571e253 strip trailing whitespace
svn path=/nixpkgs/trunk/; revision=29695
2011-10-06 13:15:09 +00:00
Peter Simons
d95e485a86 mdadm: strip -Werror option from Makefile to fix build errors with GCC 4.6.1
svn path=/nixpkgs/trunk/; revision=29694
2011-10-06 13:15:05 +00:00
Eelco Dolstra
e367687e29 * mdadm: Enable incremental activation of swraid arrays from udev.
svn path=/nixpkgs/trunk/; revision=21805
2010-05-16 20:25:57 +00:00
Yury G. Kudryashov
64f0f42d4f Upgrade mdadm
svn path=/nixpkgs/trunk/; revision=21792
2010-05-15 18:43:24 +00:00
Lluís Batlle i Rossell
27b8b6cc66 Made mdadm cross build.
svn path=/nixpkgs/trunk/; revision=20380
2010-03-04 14:44:35 +00:00
Eelco Dolstra
067f450909 * Added mdadm (raidtools replacement).
svn path=/nixpkgs/trunk/; revision=7627
2007-01-10 21:47:03 +00:00