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/ofborg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d823622c4338
Choose a base ref
...
head repository: NixOS/ofborg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c5b65f4ead7b
Choose a head ref
  • 8 commits
  • 7 files changed
  • 1 contributor

Commits on Aug 7, 2018

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    4c635fa View commit details
  2. Merge pull request #212 from NixOS/config-updates

    Handle case-sensitive usernames by lowercasing
    grahamc authored Aug 7, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bb364c5 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    e5680ff View commit details
  4. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    a98152f View commit details
  5. Run carnix!

    grahamc committed Aug 7, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    0c80557 View commit details
  6. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    8df71df View commit details
  7. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    9ccce84 View commit details
  8. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    c5b65f4 View commit details
Showing with 47 additions and 14 deletions.
  1. +26 −3 default.nix
  2. +6 −6 nix/ofborg-carnix.nix
  3. +7 −0 nix/update-carnix.sh
  4. +1 −1 ofborg/Cargo.lock
  5. +1 −1 ofborg/Cargo.toml
  6. +1 −1 ofborg/src/tasks/log_message_collector.rs
  7. +5 −2 scripts/update-known-users.sh
29 changes: 26 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
@@ -23,9 +23,6 @@ in {
in pkgs.runCommand "ofborg-rs-symlink-compat" {
src = stripDeps build;
} ''
set -x
mkdir -p $out/bin
for f in $(find $src -type f); do
bn=$(basename "$f")
@@ -43,6 +40,32 @@ in {
test -e $out/bin/github_comment_poster
test -e $out/bin/log_message_collector
test -e $out/bin/evaluation_filter
# Verify that the outpath contains the version number matching the
# Cargo.toml
if ! grep -q 'version = "${drv.crateVersion}"' ${./ofborg/Cargo.toml}; then
cat <<EOF
Build failed because you bumped the Cargo
version without regenerating the carnix
file.
Run:
nix-shell --run ./nix/update-carnix.sh
and commit those changes.
EOF
fi
'';

ofborg.php = pkgs.runCommand
12 changes: 6 additions & 6 deletions nix/ofborg-carnix.nix
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ let kernel = buildPlatform.parsed.kernel.name;
) [] (builtins.attrNames feat);
in
rec {
ofborg = f: ofborg_0_1_6 { features = ofborg_0_1_6_features { ofborg_0_1_6 = f; }; };
ofborg = f: ofborg_0_1_7 { features = ofborg_0_1_7_features { ofborg_0_1_7 = f; }; };
aho_corasick_0_5_3_ = { dependencies?[], buildDependencies?[], features?[] }: buildRustCrate {
crateName = "aho-corasick";
version = "0.5.3";
@@ -427,9 +427,9 @@ rec {
sha256 = "1y6qnd9r8ga6y8mvlabdrr73nc8cshjjlzbvnanzyj9b8zzkfwk2";
inherit dependencies buildDependencies features;
};
ofborg_0_1_6_ = { dependencies?[], buildDependencies?[], features?[] }: buildRustCrate {
ofborg_0_1_7_ = { dependencies?[], buildDependencies?[], features?[] }: buildRustCrate {
crateName = "ofborg";
version = "0.1.6";
version = "0.1.7";
authors = [ "Graham Christensen <graham@grahamc.com>" ];
src = include [ "Cargo.toml" "Cargo.lock" "src" "test-srcs" "build.rs" ] ./../ofborg;
build = "build.rs";
@@ -1449,10 +1449,10 @@ rec {
libc_0_2_40.default = true;
num_cpus_1_8_0.default = (f.num_cpus_1_8_0.default or true);
}) [ libc_0_2_40_features ];
ofborg_0_1_6 = { features?(ofborg_0_1_6_features {}) }: ofborg_0_1_6_ {
ofborg_0_1_7 = { features?(ofborg_0_1_7_features {}) }: ofborg_0_1_7_ {
dependencies = mapFeatures features ([ amqp_0_1_0 either_1_5_0 env_logger_0_4_3 fs2_0_4_3 hubcaps_0_3_16 hyper_0_10_13 hyper_native_tls_0_2_4 log_0_3_8 lru_cache_0_1_1 md5_0_3_7 nom_4_0_0_beta3 serde_1_0_43 serde_derive_1_0_43 serde_json_1_0_16 sys_info_0_5_6 tempfile_2_2_0 uuid_0_4_0 ]);
};
ofborg_0_1_6_features = f: updateFeatures f (rec {
ofborg_0_1_7_features = f: updateFeatures f (rec {
amqp_0_1_0.default = true;
either_1_5_0.default = true;
env_logger_0_4_3.default = true;
@@ -1464,7 +1464,7 @@ rec {
lru_cache_0_1_1.default = true;
md5_0_3_7.default = true;
nom_4_0_0_beta3.default = true;
ofborg_0_1_6.default = (f.ofborg_0_1_6.default or true);
ofborg_0_1_7.default = (f.ofborg_0_1_7.default or true);
serde_1_0_43.default = true;
serde_derive_1_0_43.default = true;
serde_json_1_0_16.default = true;
7 changes: 7 additions & 0 deletions nix/update-carnix.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
#!/bin/sh

set -eu

cd nix

patched_carnix() {
src=$1
result=$2

(
cd "$(dirname "$src")"
cargo build
)

carnix "$src" --output "$result"
patch -p1 "$result" ./carnix.patch
}
2 changes: 1 addition & 1 deletion ofborg/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ofborg/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ofborg"
version = "0.1.6"
version = "0.1.7"
authors = ["Graham Christensen <graham@grahamc.com>"]
include = ["Cargo.toml", "Cargo.lock", "src", "test-srcs", "build.rs"]
build = "build.rs"
2 changes: 1 addition & 1 deletion ofborg/src/tasks/log_message_collector.rs
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ use std::io::Write;

use ofborg::writetoline::LineWriter;
use ofborg::message::buildlogmsg::{BuildLogStart, BuildLogMsg};
use ofborg::message::buildresult::{BuildStatus, BuildResult};
use ofborg::message::buildresult::BuildResult;
use ofborg::worker;
use amqp::protocol::basic::{Deliver, BasicProperties};

7 changes: 5 additions & 2 deletions scripts/update-known-users.sh
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ function fetch_users() {
| jq 'map(.login | ascii_downcase)'
}

cp ./config.extra-known-users.json "$accumulator"
jq "map(ascii_downcase)" ./config.extra-known-users.json > "$accumulator"

page=0
while true; do
@@ -34,4 +34,7 @@ jq -s '{ "runner": { "known_users": .[0]}}' "$accumulator" > "$dest"

rm -f "$result" "$scratch" "$accumulator"

jq -s '.[0] * .[1] * .[2]' ./config.public.json ./config.known-users.json ./config.private.json > ./config.prod.json
jq -s '.[0] * .[1] * .[2]' \
./config.public.json \
./config.known-users.json \
./config.private.json > ./config.prod.json