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

bacnet-stack: init at 1.0.0 #96872

Merged
merged 1 commit into from Oct 30, 2020
Merged

bacnet-stack: init at 1.0.0 #96872

merged 1 commit into from Oct 30, 2020

Conversation

@WhittlesJr
Copy link
Contributor

@WhittlesJr WhittlesJr commented Aug 31, 2020

Motivation for this change

I use BACnet MS/TP for my employment, and this is the only tool that I'm aware of that allows you to capture BACnet MS/TP traffic running on a serial port on Linux. It works great with Wireshark.

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.

I use this for the "mstpcap" executable which, I have confirmed, works. There are a number of tools that I don't use, and I have not tested them.

Copy link
Member

@dali99 dali99 left a comment

Needs bumping to the newest version from the right repo source.

pkgs/tools/networking/bacnet-stack/default.nix Outdated Show resolved Hide resolved
pkgs/tools/networking/bacnet-stack/default.nix Outdated Show resolved Hide resolved
pkgs/tools/networking/bacnet-stack/default.nix Outdated Show resolved Hide resolved
pkgs/tools/networking/bacnet-stack/default.nix Outdated Show resolved Hide resolved
pkgs/tools/networking/bacnet-stack/default.nix Outdated Show resolved Hide resolved
@WhittlesJr
Copy link
Contributor Author

@WhittlesJr WhittlesJr commented Sep 10, 2020

@dali99, thanks for the review. I believe I've applied the needed changes.

@dali99
Copy link
Member

@dali99 dali99 commented Sep 11, 2020

Commits need to be squshed, PR title needs updating.

bacnet-stack: init at 1.0.0 should be the only commit

@WhittlesJr WhittlesJr changed the title bacnet-stack: init at 2019-04-14 bacnet-stack: init at 1.0.0 Sep 11, 2020
@WhittlesJr
Copy link
Contributor Author

@WhittlesJr WhittlesJr commented Sep 11, 2020

Should be good to go.

For future reference, should I always keep everything in a single commit during the review process? I figured that it would make reviewing easier if I maintained the history until the review was done. I am aware that PRs should be squashed to a single commit before merging, of course.

@dali99
Copy link
Member

@dali99 dali99 commented Sep 11, 2020

I'm also on the fence about it. I personally would like to avoid force pushes until the end, since it's much easier as you say to see the diffs, not to mention that force pushing has a tendency to break the links in the notifications.

But that's not what I usually see people doing.

dali99
dali99 approved these changes Sep 11, 2020
Copy link
Member

@dali99 dali99 left a comment

builds, haven't tested binaries

@WhittlesJr
Copy link
Contributor Author

@WhittlesJr WhittlesJr commented Sep 18, 2020

Anything remaining before we can merge?

@dali99
Copy link
Member

@dali99 dali99 commented Sep 18, 2020

no we just need someone with mergeaccess to look at it
@jonringer

pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
buildPhase = ''
make BUILD=debug BACNET_PORT=linux BACDL_DEFINE=-DBACDL_BIP=1 BACNET_DEFINES=" -DPRINT_ENABLED=1 -DBACFILE -DBACAPP_ALL -DBACNET_PROPERTY_LISTS"
'';
Copy link
Contributor

@jonringer jonringer Sep 22, 2020

this looks like a good candidate for makeFlags, but i couldn't get it to build after

Copy link
Contributor Author

@WhittlesJr WhittlesJr Sep 22, 2020

Do you want me to figure that out before merging? Or can I leave it as-is?

Copy link
Contributor

@jonringer jonringer Sep 24, 2020

I couldn't figure it out... so either way, it's good.

@jonringer
Copy link
Contributor

@jonringer jonringer commented Sep 24, 2020

Please follow CONTRIBUTING.md and manual#submitting-changes-making-patches and squash the fix-up commits.

This can be done without git rebase -i by doing:

git reset HEAD~1                    # move fix-up commits into unstaged
git add -- pkgs/                    # move changes into staged
git commit --amend --no-edit        # add changes to previous commit
git push ... ... --force            # modify current PR branch

However, git rebase -i is a more powerful alternative, I created a small video demonstrating it's use here. A more indepth text tutorial can be found here

@WhittlesJr
Copy link
Contributor Author

@WhittlesJr WhittlesJr commented Oct 29, 2020

@jonringer, For future reference, should I always keep everything in a single commit during the review process? I figured that it would make reviewing easier if I maintained the history until the review was done. I am aware that PRs should be squashed to a single commit before merging, of course.

Update pkgs/tools/networking/bacnet-stack/default.nix

Co-authored-by: Daniel Løvbrøtte Olsen <daniel.olsen99+GitHub@gmail.com>

bacnet-stack: Add maintainer and use the original GitHub repo

bacnet-stack: Alphabetize

Update pkgs/top-level/all-packages.nix

Co-authored-by: Jon <jonringer@users.noreply.github.com>
@WhittlesJr
Copy link
Contributor Author

@WhittlesJr WhittlesJr commented Oct 29, 2020

@jonringer Squashed and rebased onto master

@jonringer
Copy link
Contributor

@jonringer jonringer commented Oct 30, 2020

commits should be "logical units", and most people interpret that as, "if i were to cherry-pick these commits, what level abstraction would i expect"

For package additions, it's usually one per package

Copy link
Contributor

@jonringer jonringer left a comment

LGTM

Result of nixpkgs-review pr 96872 1

1 package built:
  • bacnet-stack

@jonringer jonringer merged commit fcc6849 into NixOS:master Oct 30, 2020
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants