Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

staging-next 2022-07-01 #179844

Merged
merged 212 commits into from
Jul 8, 2022
Merged

staging-next 2022-07-01 #179844

merged 212 commits into from
Jul 8, 2022

Conversation

bdd and others added 30 commits June 1, 2022 00:52
Bug:
Due to the way `buildGoDir` function was repurposed to also run `go
test`, if `checkFlags` was defined, `go test` was ran only at the top
level directory. Only the first element of `checkFlags` array would get
passed to the `go test` command as arguments.

Fix:
Now the first parameter to `buildGoDir` is handled as the command.  If
the command is "test" `checkFlags` get passed as arguments along with
other build flags like ldflags, tags, etc.

Readability:
- Iteratively build a flag array in `buildGoDir` instead of single long
  variable expansion command line.
- Bash style: Single line local assignment of positional parameters.
The version of Ginkgo it relies on might be the problem.

Bug fixed by #173702 runs the previously skipped tests for this
package.
- Disable the tests requiring access to gitlab.com.
- Add coreutils to `nativeBuildInputs` for printf and echo binaries.
- Fix hard coded paths to coreutils binaries.

Bug fixed by #173702 runs the previously skipped tests for this
package.
Bug fixed by #173702 runs the previously skipped tests for this
package.
Bug fixed by #173702 runs the previously skipped tests for this
package.
These test are written in a way that they don't skip themselves if they
cannot find an Android device attached over USB to the running host.

Bug fixed by #173702 runs the previously skipped tests for this
package.
Disable the tests requiring access to gitlab.com

Bug fixed by #173702 runs the previously skipped tests for this
package.
Bug fixed by #173702 runs the previously skipped tests for this
package.
As explained in the comment, this ensures that stage4-coreutils does
not leak a reference to the bootstrap-files by way of libgmp.  This
will allow the next patch in this series to build stage4-coreutils
using a dynamically-linked (rather than statically-linked) libgmp.
The usage of `makeStaticLibraries` in stdenv/linux/default.nix is
prefaced by this comment:

  # Link GCC statically against GMP etc.  This makes sense because
  # these builds of the libraries are only used by GCC, so it
  # reduces the size of the stdenv closure.

However "these builds of the libraries are only used by GCC" is not
actually true.  As currently written, the stage4 coreutils links
against these customized, static-ified libraries.

Beside the fact that the code doesn't actually do what it says, this
causes other problems as well.  One example is #168983, which arises
because have a dynamically-linked binary (coreutils) which is built
from statically-linked libraries (libgmp.a); doing this causes mayhem
on platforms where `-fstack-protector` needs an auxiliary
`libssp.{so,a}` library; we end up with link failures because some
parts of the resulting binary want `libssp.so` and other parts want
`libssp_nonshared.a`.

Let's make the code actually do what the comment says, by moving these
definitions into the `gcc-unwrapped` override.  This will cause the
stage4-coreutils to link against libgmp dynamically, rather than
statically.  For this reason this commit depends on the previous
commit, which allows that to be done without creating a forbidden
reference from stdenv-final to the bootstrap-files.
During stdenv bootstrapping, coreutils is built twice.  This makes
troubleshooting very difficult, because both packages have
name="coreutils", so it is a hassle to figure out "which coreutils am
I using / is not building"?

The first of these builds is used only in stage4, and is not part of
the final stdenv.  Let's label that one with a different `name`
attribute to make it obvious which is which.
Co-authored-by: sternenseemann <sternenseemann@systemli.org>
Currently `buildPerlPackage` prefixes the Perl version to the package's
`pname`, which results in `nix run` not being able to work for any
packages build with it out of the box. This commit corrects that and
phases out the ability to set `name` directly, as well as refactors the
code to not require `cleanedAttrs`.
The XS modules were being built for the build platform, and the perl scripts
had build platform shebangs.

It is possible to build the XS modules by passing
PERL_EXT_CC=${stdenv.cc.targetPrefix}cc and --enable-perl-xs=yes, but they
fail to load due to a handshake key mismatch. Instead, I just decided to
disable the XS modules and use the pure Perl fallbacks when cross-compiling.

The shebangs were fixed manually using substituteInPlace.
texinfo is a nativeBuildInput, but it is overridden in all-packages.nix,
which breaks splicing. Therefore, buildPackages.texinfo needs to be used
explicitly in the override.

This wasn't actually causing any problems because texinfo's scripts were using
build platform Perl shebangs. Once texinfo was fixed, gpm started failing to
cross-compile.
Without the change parallel build fails as:

    gcc -I/build/gnu-efi-code//lib ... -c lib/runtime/rtstr.c -o runtime/rtstr.o
    Assembler messages:
    Fatal error: can't create runtime/rtstr.o: No such file or directory
Also, aborts when the list contains anything besides the acceptable options.
Because it is easier to look at them as a block, not polluting the directory
listing so much.
Following the trend of enhanced composability, and further because it is unusual
a build tool using libsForQt5 as scope.
Without the change build with `config.configurePlatformsByDefault = true`
fails as:

    Error: Unknown flag: --build=x86_64-unknown-linux-gnu
@vcunat
Copy link
Member Author

vcunat commented Jul 7, 2022

/cc PR #180336

I'm not entirely sure about this, as I couldn't spend much time, but
it seemed plausible that the patch caused a different kind of errors
in this tested case - though it's possible I messed the test up.
Either way, the tests seem to pass now, unblocking the CVE fixes ;-)
@vcunat
Copy link
Member Author

vcunat commented Jul 7, 2022

I think there are only smaller regressions remaining now, probably not critical.

@SuperSandro2000
Copy link
Member

[ ] python3Packages.selenium regressed, maintainer: @jraygauthier.

#180518

andrew-d and others added 5 commits July 7, 2022 16:29
The purpose is to integrate the usual Haskell rebuild.
This version is really being phased out,
so let's hope it's better somewhat working than not building.
…ch64-darwin

python310Packages.twisted: remove pyOpenSSL checkInput on aarch64-darwin
@vcunat
Copy link
Member Author

vcunat commented Jul 7, 2022

proj_7: I propose simply disabling these tests: #180578

@jraygauthier
Copy link
Member

@SuperSandro2000 : #180518 looks fine to me for merge.

vcunat and others added 4 commits July 8, 2022 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet