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

gcc7: Removed java as a target language #39917

Closed
wants to merge 752 commits into from

Conversation

Synthetica9
Copy link
Member

@Synthetica9 Synthetica9 commented May 3, 2018

Motivation for this change

As discussed in #39866

GCC6 is the last GCC release to support Java as a target language. I quote @gebner (#39866 (comment)):

I think we should remove them completely. AFAICT the only place where we override enableJava et al. is in the gcj6 attribute (which uses gcc6).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@Synthetica9
Copy link
Member Author

@GrahamcOfBorg build gcc7

@xeji
Copy link
Contributor

xeji commented May 3, 2018

Please rebase this on staging.

Mic92 and others added 25 commits May 3, 2018 14:24
The following changes have been applied:

- the property `http.headers.X-Content-Type-Options` must a list of
  strings rather than a serialized list
- instead of `/etc/docker/registry/config.yml` the configuration will be
  written with `pkgs.writeText` and the store path will be used to run
  the registry. This reduces the risk of possible impurities by relying
  on the Nix store only.
- cleaned up the property paths to easy readability and reduce the
  verbosity.
- enhanced the testcase to ensure that digests can be deleted as well
- the `services.docker-registry.extraConfig` object will be merged with
  `registryConfig`

/cc @ironpinguin
…ote/

This way, emacs can find the 'asymptote' mode.
This way easier to understand and the officially recommended approach.

/cc @dezgeg @fpletz
The logic regarding the generated `.version-suffix` file is already
defined in `lib/trivial.nix` and shouldn't be duplicated in
`nixos/version`.
As suggested in NixOS#39416 (comment)
the versioning attributes in `lib` should be consistent to
`nixos/version` which implicates the following changes:

* `lib.trivial.version` -> `lib.trivial.release`
* `lib.trivial.suffix` -> `lib.trivial.versionSuffix`
* `lib.nixpkgsVersion` -> `lib.version`

As `lib.nixpkgsVersion` is referenced several times in `NixOS/nixpkgs`,
`NixOS/nix` and probably several user's setups. As the rename will cause
a notable impact it's better to keep `lib.nixpkgsVersion` as alias with
a warning yielded by `builtins.trace`.
The package is broken on master for some time now:
https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.notary.x86_64-linux/all

The main reason for the breackage is that the `Makefile` script attempts
to retrieve the latest git commit by using `git rev-parse` which breaks
as `git` is not in the build environment. This could be fixed by using
`?=` rather than `:=` for the `GITCOMMIT` variable in the `make` script
to easily override `GITCOMMIT` in the `buildPhase`.

See the Hydra logs for reference:
https://nix-cache.s3.amazonaws.com/log/ib4qp8h4r8d830ra4fah38l7ybb82gp7-notary-0.6.0.drv

Furthermore some refactoring was applied:

* Activated the test suite for `cmd/notary` to confirm the basic
  functionality when building for NixOS.

* Added {pre,post} hooks for `{build,install}Phase`

* Added myself as maintainer to have more people available in case of
  further breakage.
Some time ago I fixed the broken package `osquery` (see NixOS#39336).
I had to test the package manually by starting the daemon locally,
however this doesn't ensure that the module is still functional.

In order to cover the package *and* the integration with the NixOS
module I thought that adding a testcase might be the best idea.

The current testcase does the following things:

* Starts an `osqueryd` service in a test machine with customized logger
  path and PID file

* Ensures that the `osqueryd.service` unit is running

* Checks if the customized flags (`pidfile`, `logger_path`) are applied
  to `osquery`.

* Performs a simple test query against the `etc_hosts` database to check
  if the basic funcitonality of `osquery` (storing system information into
  a database) works fine.
This appears to be a cut-and-paste error.
This is necessary for OCSP and/or remote CRL verification of server
certificates to work, which is a fairly common thing to need.
@Synthetica9
Copy link
Member Author

Okay, that was definitely not what I wanted to do

@Synthetica9
Copy link
Member Author

@xeji I did git rebase -i --onto upstream/staging, what did I do wrong?

@Synthetica9
Copy link
Member Author

Okay, so I I think I have it correct now, here's what I did:

 ✘  ~/d/nixpkgs   gcc7-nojava   git checkout upstream/staging
Note: checking out 'upstream/staging'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at edc9258e6ec Merge pull request #39897 from r-ryantm/auto-update/dbus
 ~/d/nixpkgs  ➦ edc9258e6ec    git cherry-pick 5ece3d8f19e73a8bac9dc99e1409fbbb21e6ddbe
[detached HEAD 3641b35baee] gcc7: Removed java as a target language
 Date: Thu May 3 13:20:42 2018 +0200
 1 file changed, 8 insertions(+), 59 deletions(-)
 ~/d/nixpkgs  ➦ 3641b35baee    git checkout -b gcc7-nojava-fix 
Switched to a new branch 'gcc7-nojava-fix'
 ~/d/nixpkgs   gcc7-nojava-fix   git push origin gcc7-nojava-fix 

The result can be found here: staging...Synthetica9:gcc7-nojava-fix

Should I PR that onto staging? (cc @xeji)

@Profpatsch
Copy link
Member

I’ll close this first, feel free to open a new PR. Rebasing is hard 😖.

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