Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bbb380114190
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 19fd24d6f232
Choose a head ref
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on May 16, 2019

  1. audit: Fix build with pkgsMusl.

    The previous patches no longer applied to the current code.
    
    Also declare necessary autoconf, automake, libtool dependencies.
    
    Without them, the musl build gets:
    
    		/build/audit-2.8.5/missing: line 81: aclocal-1.16: command not found
    		configure.ac:16: warning: macro 'AM_PROG_LIBTOOL' not found in library
    		sh: autom4te: not found
    nh2 committed May 16, 2019
    Copy the full SHA
    bb04ef5 View commit details

Commits on Jun 9, 2019

  1. audit: reduce non-musl dependencies after parent commit

    Reduction of build-time closures, and avoiding a mass rebuild now.
    And I believe these belong into native inputs.
    vcunat committed Jun 9, 2019
    Copy the full SHA
    b73f382 View commit details
  2. Copy the full SHA
    19fd24d View commit details
Showing with 22 additions and 11 deletions.
  1. +22 −11 pkgs/os-specific/linux/audit/default.nix
33 changes: 22 additions & 11 deletions pkgs/os-specific/linux/audit/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
stdenv, buildPackages, fetchurl, fetchpatch,
runCommand,
autoconf, automake, libtool,
enablePython ? false, python ? null,
}:

assert enablePython -> python != null;

stdenv.mkDerivation rec {
name = "audit-2.8.5";
name = "audit-2.8.5"; # at the next release, remove the patches below!

src = fetchurl {
url = "https://people.redhat.com/sgrubb/audit/${name}.tar.gz";
@@ -16,6 +18,8 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" "man" ];

depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = stdenv.lib.optionals stdenv.hostPlatform.isMusl
[ autoconf automake libtool ];
buildInputs = stdenv.lib.optional enablePython python;

configureFlags = [
@@ -29,17 +33,24 @@ stdenv.mkDerivation rec {

enableParallelBuilding = true;

# TODO: Remove the musl patches when
# https://github.com/linux-audit/audit-userspace/pull/25
# is available with the next release.
patches = stdenv.lib.optional stdenv.hostPlatform.isMusl [
(fetchpatch {
url = "https://git.alpinelinux.org/cgit/aports/plain/main/audit/0002-auparse-remove-use-of-rawmemchr.patch?id=3e57180fdf3f90c30a25aea44f57846efc93a696";
name = "0002-auparse-remove-use-of-rawmemchr.patch";
sha256 = "1caaqbfgb2rq3ria5bz4n8x30ihgihln6w9w9a46k62ba0wh9rkz";
})
(fetchpatch {
url = "https://git.alpinelinux.org/cgit/aports/plain/main/audit/0003-all-get-rid-of-strndupa.patch?id=3e57180fdf3f90c30a25aea44f57846efc93a696";
name = "0003-all-get-rid-of-strndupa.patch";
sha256 = "1ddrm6a0ijrf7caw1wpw2kkbjp2lkxkmc16v51j5j7dvdalc6591";
})
(
let patch = fetchpatch {
url = "https://github.com/linux-audit/audit-userspace/commit/d579a08bb1cde71f939c13ac6b2261052ae9f77e.patch";
name = "Add-substitue-functions-for-strndupa-rawmemchr.patch";
sha256 = "015bvzflg1s1k5viap30nznlpjj44a66khyc8yq0waa68qwvdlsd";
};
in
runCommand "Add-substitue-functions-for-strndupa-rawmemchr.patch-fix-copyright-merge-conflict" {} ''
cp ${patch} $out
substituteInPlace $out --replace \
'-* Copyright (c) 2007-09,2011-16,2018 Red Hat Inc., Durham, North Carolina.' \
'-* Copyright (c) 2007-09,2011-16 Red Hat Inc., Durham, North Carolina.'
''
)
];

prePatch = ''