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

corerad: 0.2.6 -> 0.2.7 #91458

Merged
merged 4 commits into from Jun 25, 2020
Merged

corerad: 0.2.6 -> 0.2.7 #91458

merged 4 commits into from Jun 25, 2020

Conversation

mdlayher
Copy link
Member

Motivation for this change

New CoreRAD release, support for systemd readiness notification. See second commit for the unit change, and https://www.freedesktop.org/software/systemd/man/sd_notify.html#Description for documentation.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Binary builds, tests continue to pass.

$ ./result/bin/corerad -h
CoreRAD v0.2.7 BETA (2020-06-24)
flags:
  -c string
        path to configuration file (default "corerad.toml")
  -init
        write out a default configuration file to "corerad.toml" and exit
client: waiting for success: ping -c 1 fd00:dead:beef:dead::1
(0.02 seconds)
(7.85 seconds)
Verify SLAAC on client
client: waiting for success: rdisc6 -1 -r 10 eth1
(0.32 seconds)
client: waiting for success: ip -6 addr show dev eth1 | grep -q 'fd00:dead:beef:dead:'
(0.02 seconds)
client: must succeed: ip -6 addr show dev eth1
(0.00 seconds)
(0.34 seconds)
Verify HTTP debug server is configured
router: must succeed: curl localhost:9430/metrics
(0.05 seconds)
(0.05 seconds)
(8.35 seconds)
test script finished in 8.37s
cleaning up
killing client (pid 6)
killing router (pid 17)
(0.00 seconds)
/nix/store/b9s5ql4qsfqh69srjdpvry695cbzrbnr-vm-test-run-unnamed

/cc @jonringer @marsam per previous PRs (thank you again!)

Signed-off-by: Matt Layher <mdlayher@gmail.com>
Signed-off-by: Matt Layher <mdlayher@gmail.com>
@mdlayher
Copy link
Member Author

@GrahamcOfBorg test corerad

@mdlayher
Copy link
Member Author

/marvin opt-in

@marvin-mk2 marvin-mk2 bot added the marvin label Jun 25, 2020
@marvin-mk2
Copy link

marvin-mk2 bot commented Jun 25, 2020

Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here.

@mdlayher
Copy link
Member Author

/status needs_review

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/201

Signed-off-by: Matt Layher <mdlayher@gmail.com>

buildFlagsArray = ''
-ldflags=
-X github.com/mdlayher/corerad/internal/build.linkTimestamp=1591474872
-X github.com/mdlayher/corerad/internal/build.linkTimestamp=1593050100
Copy link
Contributor

@zowoq zowoq Jun 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest removing/disabling this or setting it to SOURCE_DATE_EPOCH as if anyone else (human or bot) ever bumps this package I doubt it will be noticed or updated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this is something I've been meaning to automate but I haven't actually figured out how yet.

However, I did just find https://nixos.org/nixpkgs/manual/#chap-stdenv:

set-source-date-epoch-to-latest.sh
This sets SOURCE_DATE_EPOCH to the modification time of the most recent file.

So perhaps I can figure out how to plumb this in. Should I do it in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, doesn't need to be done in this PR.

TBH, I wouldn't bother with trying to set a timestamp unless it's somehow necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've found a method that seems to work. I previously added a file in the root of the git repository which is updated with the current tag's timestamp when I make a release. By reading this file in preBuild, I can automate the process. Let me know if this is alright.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work?

build.linkTimestamp=$(<.gittagtime)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does, thanks! Updated.

Signed-off-by: Matt Layher <mdlayher@gmail.com>
@mdlayher
Copy link
Member Author

Any more thoughts @zowoq? Thanks for your time.

@zowoq zowoq merged commit 29b75dc into NixOS:master Jun 25, 2020
@mdlayher mdlayher deleted the mdl-corerad-0.2.7 branch June 26, 2020 00:05
@marvin-mk2 marvin-mk2 bot requested a review from timokau July 3, 2020 20:34
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

3 participants