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

morty: init -> 0.2.0 #34886

Merged
merged 3 commits into from Jun 2, 2018
Merged

morty: init -> 0.2.0 #34886

merged 3 commits into from Jun 2, 2018

Conversation

leenaars
Copy link
Contributor

@leenaars leenaars commented Feb 12, 2018

Motivation for this change

This tool complements searx (from the same author), and provides a proxy service that can be used for visiting search results from the search engine.

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.

enable = true;
key = "78a9cd0cfee20c672f78427efb2a2a96036027f0";
port = 3001;
};
Copy link
Member

Choose a reason for hiding this comment

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

Please unindent enable by 2 spaces, then indent the rest to be in line with the enable line.

* No Caching/Etag
* Supports GET/POST forms and IFrames
* Optional HMAC URL verifier key to prevent service abuse
";
Copy link
Member

Choose a reason for hiding this comment

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

Please use '' instead of " (use two single quotes instead of one double-quote) on long text blocks. Also, move the first line of the text to its own line. Finally, the maintainer line should be maintainers.

@@ -576,6 +577,7 @@
mighttpd2 = 285;
hass = 286;
monero = 287;
morty = 288;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this need a static uid?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm new at packaging services, and basically replicated the setup of searx which is its companion tool. That set uid and gid, so I did that for morty as well.

Is there a checklist for adding services somewhere?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not really; I'm just wondering whether there's a reason for allocating a uid; if there's a reason that's totally fine, otherwise you can probably get away with dynamic uids.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm certainly not an expert in this. If you want this removed, let me know.

Copy link
Contributor

Choose a reason for hiding this comment

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

What type of data does the service generate? Are you likely to transfer it across hosts & is it too expensive to fixup permissions at service start or do you need to refer to the uid before the uid/name mapping is established? If so, using a static uid may be appropriate. I'm happy to defer to your judgement regarding the service, I know nothing about it, but often static uids are used for no good reason and so the pattern propagates.

@leenaars
Copy link
Contributor Author

I removed the fixed uid/gid mapping, under the assumption that a proxy has little worthwhile state.

@joachifm
Copy link
Contributor

@GrahamcOfBorg test morty

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

while evaluating ‘dischargeProperties’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:386:25, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:324:62:
while evaluating the attribute ‘condition’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:467:14:
while evaluating the attribute ‘condition’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:467:14:
while evaluating the attribute ‘condition’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:467:14:
while evaluating the attribute ‘services.nixosManual’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/attrsets.nix:199:44:
while evaluating anonymous function at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:75:45, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/attrsets.nix:199:52:
while evaluating ‘yieldConfig’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:74:29, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:77:16:
while evaluating anonymous function at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:80:24, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:80:11:
while evaluating anonymous function at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:81:26, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/lib/modules.nix:81:13:
The option `services.morty' defined in `<unknown-file>' does not exist.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

while evaluating 'dischargeProperties' at /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:386:25, called from /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:324:62:
while evaluating the attribute 'condition' at /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:467:14:
while evaluating the attribute 'condition' at /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:467:14:
while evaluating the attribute 'condition' at /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:467:14:
while evaluating the attribute 'services.nixosManual' at /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/attrsets.nix:199:44:
while evaluating anonymous function at /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:75:45, called from /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/attrsets.nix:199:52:
while evaluating 'yieldConfig' at /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:74:29, called from /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:77:16:
while evaluating anonymous function at /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:80:24, called from /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:80:11:
while evaluating anonymous function at /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:81:26, called from /var/lib/gc-of-borg/nix-test-rs-1/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-1/lib/modules.nix:81:13:
The option `services.morty' defined in `<unknown-file>' does not exist.

@joachifm
Copy link
Contributor

@GrahamcOfBorg test morty

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: tests.morty

Partial log (click to expand)

while evaluating the attribute 'values' at �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/lib/modules.nix�[0m:434:7:
while evaluating 'concatMap' at �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/lib/lists.nix�[0m:104:18, called from �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/lib/modules.nix�[0m:434:16:
while evaluating 'concatMap' at �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/lib/lists.nix�[0m:104:18, called from �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/lib/modules.nix�[0m:324:17:
while evaluating anonymous function at �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/lib/modules.nix�[0m:324:28, called from undefined position:
while evaluating 'dischargeProperties' at �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/lib/modules.nix�[0m:392:25, called from �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/lib/modules.nix�[0m:325:62:
while evaluating the attribute 'value' at �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/lib/modules.nix�[0m:216:48:
while evaluating the attribute 'config.uid' at �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/nixos/modules/services/networking/morty.nix�[0m:76:9:
while evaluating the attribute 'ids.uids.morty' at �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/lib/attrsets.nix�[0m:199:44:
attribute 'morty' missing, at �[1m/var/lib/gc-of-borg/nix-test-rs-12/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-12/nixos/modules/services/networking/morty.nix�[0m:76:15

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: tests.morty

Partial log (click to expand)

while evaluating the attribute 'values' at /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/lib/modules.nix:434:7:
while evaluating 'concatMap' at /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/lib/lists.nix:104:18, called from /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/lib/modules.nix:434:16:
while evaluating 'concatMap' at /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/lib/lists.nix:104:18, called from /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/lib/modules.nix:324:17:
while evaluating anonymous function at /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/lib/modules.nix:324:28, called from undefined position:
while evaluating 'dischargeProperties' at /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/lib/modules.nix:392:25, called from /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/lib/modules.nix:325:62:
while evaluating the attribute 'value' at /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/lib/modules.nix:216:48:
while evaluating the attribute 'config.uid' at /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/nixos/modules/services/networking/morty.nix:76:9:
while evaluating the attribute 'ids.uids.morty' at /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/lib/attrsets.nix:199:44:
attribute 'morty' missing, at /home/ofborg/ofborg3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/builder-7c6f434c3/nixos/modules/services/networking/morty.nix:76:15

config = mkIf config.services.morty.enable {

users.extraUsers.morty =
{ uid = config.ids.uids.morty;
Copy link
Contributor

Choose a reason for hiding this comment

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

Eval error here & below. Just leave unspecified to have ids dynamically allocated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed this, and also updated to fresh release.

@joachifm
Copy link
Contributor

@GrahamcOfBorg test morty

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.morty

Partial log (click to expand)

mortyProxyWithKey: exit status 1
syncing
mortyProxyWithKey: running command: sync
mortyProxyWithKey: exit status 0
test script finished in 9.69s
cleaning up
killing mortyProxyWithKey (pid 593)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/jaq5gv0gsv7bjdrkm96yzq91wfjc0g81-vm-test-run-morty

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tests.morty

Partial log (click to expand)

mortyProxyWithKey: running command: sync
mortyProxyWithKey# [   17.568988] dhcpcd[765]: eth0: Router Advertisement from fe80::2
mortyProxyWithKey# [   17.577832] dhcpcd[765]: eth0: adding address fec0::5054:ff:fe12:3456/64
mortyProxyWithKey: exit status 0
test script finished in 18.50s
cleaning up
killing mortyProxyWithKey (pid 627)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/3lchhnjr9zyimaj62j3g9whz0shqbzx7-vm-test-run-morty

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/php/versions.

These checks were done:

- built on NixOS
- /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/phar.phar passed the binary check.
- /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/phar passed the binary check.
- /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/php passed the binary check.
- /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/phpdbg passed the binary check.
- /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/php-cgi passed the binary check.
- /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/pear passed the binary check.
- /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/peardev passed the binary check.
- /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/pecl passed the binary check.
- /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6/bin/php-fpm passed the binary check.
- 9 of 9 passed binary check by having a zero exit code.
- 0 of 9 passed binary check by having the new version present in output.
- found 7.2.6 with grep in /nix/store/25l2hz7njpg9glpmslcadkgqwai5f77s-php-7.2.6
- directory tree listing: https://gist.github.com/409d2cfaa7e805714825281fbaba0d0f
- du listing: https://gist.github.com/7fbd8e3d56524f70b3dfb94c045fccd2
@joachifm
Copy link
Contributor

LGTM, though to be strictly conforming to the guidelines this should ideally be one commit for the package and one for the service, with appropriate commit subjects.

@leenaars leenaars changed the title morty: init -> 0.1.0 morty: init -> 0.2.0 May 30, 2018
@leenaars
Copy link
Contributor Author

leenaars commented Jun 2, 2018

@joachifm: split into one commit for the package and one for the service.

@joachifm joachifm merged commit ae512f2 into NixOS:master Jun 2, 2018
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

4 participants