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

add patchwork #59111

Closed
Closed

Conversation

thedavidmeister
Copy link
Contributor

@thedavidmeister thedavidmeister commented Apr 7, 2019

fixes #59100

Motivation for this change

Adds patchwork, official client for secure scuttlebutt.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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 nix-review --run "nix-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@thedavidmeister
Copy link
Contributor Author

i kind of bumbled through this by copying the joplin-desktop and standardnotes derivations

the gsettings-desktop-schemas seems to be needed to prevent crashes when uploading profile pics

@thedavidmeister
Copy link
Contributor Author

thedavidmeister commented Apr 7, 2019

seems to run ok but there are warnings.

any help debugging would be appreciated!

this on boot:

(process:20493): Gtk-WARNING **: 22:25:30.050: Locale not supported by C library.
        Using the fallback 'C' locale.
{ path: '/home/thedavidmeister/.ssb',
  party: true,
  timeout: 0,
  pub: true,
  local: true,
  friends: { dunbar: 150, hops: 2 },
  gossip: { connections: 3 },
  connections: 
   { outgoing: { net: [Array] },
     incoming: { net: [Array], ws: [Array] } },
  timers: { connection: 0, reconnect: 5000, ping: 300000, handshake: 5000 },
  caps: 
   { shs: '1KHLiKZvAvjbY1ziZEHMXawbCEIM6qwjCDm3VYRan/s=',
     sign: null },
  master: [],
  logging: { level: 'notice' },
  port: 8008,
  blobsPort: 8989,
  server: true,
  _: [],
  host: '::',
  ws: { host: '::1', port: 8989, scope: [ 'device' ], transform: 'shs' },
  keys: 
   { curve: 'ed25519',
     public: '8VYZW+U0zbewBQSaKpi1fCTD2cPEbkKy8B6amcy06IY=.ed25519',
     private: null,
     id: '@8VYZW+U0zbewBQSaKpi1fCTD2cPEbkKy8B6amcy06IY=.ed25519' } }
ssb-friends: createFriendStream legacy api used
git-ssb is not installed, or not available in path
Error: listen EADDRINUSE :::8989
    at Object._errnoException (util.js:1024:11)
    at _exceptionWithHostPort (util.js:1046:20)
    at Server.setupListenHandle [as _listen2] (net.js:1351:14)
    at listenInCluster (net.js:1392:12)
    at Server.listen (net.js:1476:7)
    at EventEmitter.emitter.listen (/home/thedavidmeister/.cache/appimage-run/9811e63b0395fab7bf604f9dcd63c60ad91457d1378881365e26ae2aa8c159b4/squashfs-root/app/resources/app.asar/node_modules/pull-ws/server.js:50:14)
    at Object.server (/home/thedavidmeister/.cache/appimage-run/9811e63b0395fab7bf604f9dcd63c60ad91457d1378881365e26ae2aa8c159b4/squashfs-root/app/resources/app.asar/node_modules/scuttlebot/node_modules/multiserver/plugins/ws.js:20:31)
    at Object.server (/home/thedavidmeister/.cache/appimage-run/9811e63b0395fab7bf604f9dcd63c60ad91457d1378881365e26ae2aa8c159b4/squashfs-root/app/resources/app.asar/node_modules/multiserver/compose.js:96:29)
    at /home/thedavidmeister/.cache/appimage-run/9811e63b0395fab7bf604f9dcd63c60ad91457d1378881365e26ae2aa8c159b4/squashfs-root/app/resources/app.asar/node_modules/multiserver/index.js:45:21
    at Array.map (<anonymous>)
ssb-friends: stream legacy api used
ssb-friends: get legacy api used

then a lot of this:

(ssb-patchwork:20493): dconf-WARNING **: 22:27:31.414: failed to commit changes to dconf: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files

(ssb-patchwork:20493): dconf-WARNING **: 22:27:31.431: failed to commit changes to dconf: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files

(ssb-patchwork:20493): dconf-WARNING **: 22:27:31.445: failed to commit changes to dconf: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files

(ssb-patchwork:20493): dconf-WARNING **: 22:27:31.446: failed to commit changes to dconf: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files

Copy link
Contributor

@bricewge bricewge left a comment

Choose a reason for hiding this comment

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

As discussed in #53156 (comment) you should probably renamed the package and put it in pkgs/applications/networking/ssb/ alongside patchwork-classic.

Related with your bug report #59100

pkgs/applications/social/patchwork/default.nix Outdated Show resolved Hide resolved
pkgs/applications/social/patchwork/default.nix Outdated Show resolved Hide resolved
@christianbundy
Copy link

@thedavidmeister I think the error you're seeing is coming from ssbc/patchwork#972

@matthiasbeyer
Copy link
Contributor

Is this "patchwork" or "patchwork-classic"? Because if it is the latter, don't mind continuing... patchwork-classic is afaik deprecated and only patchwork should be used.

If it is patchwork, I'd welcome to have this in nixpkgs!

@thedavidmeister
Copy link
Contributor Author

@matthiasbeyer patchwork, i got the latest appimage

@thedavidmeister
Copy link
Contributor Author

i tested 3.11.4 with nix-env -f . -iA patchwork

running this version has a lot fewer errors than newer version(s): ssbc/patchwork#972

tried adding git-ssb but it didn't help (build time vs. run time path differences?), i don't think it is needed as it is debug info (check comment thread)

moved the derivation to networking/ssb/patchwork

fixed maintainer-list.nix

don't think appimageTools is correct here as we are consuming not building an app image

@ghost ghost mentioned this pull request May 2, 2019
20 tasks
@thedavidmeister
Copy link
Contributor Author

thanks for the review @asymmetric i implemented what i could, how do you feel about it now?

@asymmetric
Copy link
Contributor

Added a comment.

@thedavidmeister
Copy link
Contributor Author

@asymmetric i don't see it 🤔

@asymmetric
Copy link
Contributor

Because you defined version outside of the package's expression, you need to inherit version;, otherwise the full package name cannot be composed.

@thedavidmeister
Copy link
Contributor Author

@asymmetric great, seems to work with the version on the derivation rather than the let

how you feeling about it now?

@asymmetric
Copy link
Contributor

Nice!

You should clean up the commit history and make it fit this.

In short, there should probably be just one commit (maybe two, to add yourself to the maintainers), and it should look like patchwork: init at 3.11.4.

@thedavidmeister
Copy link
Contributor Author

@asymmetric doesn't github provide the option to squash commits when merging the PR?

@matthiasbeyer
Copy link
Contributor

Yes, but it does not provide options for cleaning up the branch. You made several changes which should end up in different commits, but not several changes which should end up in one commit.

@asymmetric
Copy link
Contributor

Also I think it's nice not to ask the maintainers to clean up your branch when merging, even if in theory they could :)

But I agree that there's a lot of things to check manually when contributing to nixpkgs.

@thedavidmeister
Copy link
Contributor Author

This is the real history of the code development, rewriting it to fit someone(s) else’s aesthetics is beyond me I’m afraid

IMO “cleaning up” is a git smell, I don’t expect anyone to ever do it! but I’ll roll with this idea to get a merge approved

Would 1 commit for maintainers and 1 for everything else as suggested earlier provide sufficient dopamine for everyone? 😉

@samueldr
Copy link
Member

samueldr commented May 4, 2019

Yes two commits is fine. One for adding yourself to the maintainers list, and the other one for the package init is what would be expected. And thanks for the contribution!


The Making patches section of the manual has the exact format for packages and modules.

The manual explains it as “Make commits of logical units”. The main idea being that yes, while developing things are messy, and it's natural, they're not necessarily what's published here. It is “a smell”, but I'm not sure it's a bad smell, considering the scope of Nixpkgs, and how git, this way, becomes the history of the main changes, not the development history of separate features. This is part of CONTRIBUTING.md.

@thedavidmeister
Copy link
Contributor Author

@samueldr what is the commit message for adding myself to maintainers?

@samueldr
Copy link
Member

When in doubt, I check the history and try to reason with the general rules.

Here maintainers: Add thedavidmeister could be fine, as an example.

Package inits and upgrades have rules that allows automation.

@thedavidmeister thedavidmeister mentioned this pull request May 15, 2019
10 tasks
@thedavidmeister
Copy link
Contributor Author

@samueldr kk, here it is #61530

@infinisil infinisil closed this May 26, 2019
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.

add patchbay (secure scuttlebutt)
8 participants