text:
Initial pass at adding ORC to Iceberg.

Known problems:

Doesn't do schema evolution.
Doesn't include column size metrics.
Doesn't properly handle timestamp with timezone.
Doesn't do the schema mangling for partitions.

Thanks! I'll have a look shortly.

This looks promising. I think we should be able to get everything working.
I added ORC to TestDataFrameWrites and tried it out but hit a couple of test failures with it. You might want to test that next.
Would you like to open PRs for some of the independent changes in here? Moving SimpleRecord out and the changes to RandomData are good candidates to get some of the changes in right away.

Ok, I've updated the branch with the changes based on the comments.

Snyk isn't letting me see what the problem is. Should we add a travis-ci build?

I'm all for travis CI, but we need a Parquet release first. I'm working on that next.

Ok, I think I have all of the feedback resolved.

I assume you'll squash the commit before committing. I've just left them as separate commits to make review easier.

With the last commit the TestDataFramesWrites works with ORC also.

I'm on leave today and tomorrow, I'll review the changes on Monday. Thanks!

Looks good to me. I'll do a little more digging into the random data tomorrow to make sure it covers everything, but otherwise I think this is ready to commit.

@omalley, I have a few minor updates. Do you want me to include them when I squash, or do you want me to open a PR for your branch?

You can go ahead and include them in the squash. What were they?

Fix spelling (primative -> primitive), pass floats through for validation, and use strict equality when checking floats and doubles because for a storage system, the bits really should be identical. I'm also adding generic type args for maps and lists in some places.

I've been burned so badly by using equality for floats & doubles over the years that I always avoid it. Even for a storage system, cases like non-normalized or various NaN will cause problems. In this case, because we are generating the data, it is no doubt fine. I still wouldn't recommend it.

I think the good outweighs the bad here. A storage system should guarantee that the bits you pass in are the bits you get out, and we should verify that's the case. For values like NaN where it could be reasonable to normalize, we should explicitly test for it and not rely on undefined behavior.

Merged as c59138eadcfb4eb2558a15f73c00b54528d02e12. Thanks for contributing, @omalley!
Would you mind opening a few issues to cover the remaining features that we need for ORC before it is ready for a release?

authors: omalley rdblue

repo: Netflix/iceberg


text:
Adding volume info to batch decorator

Would be useful to add volume information into the batch decorator so that EBS, EFS or FSx volumes can be attached to the jobs to access data quickly for training, cache pre-trained weights, cache data from S3 etc.
Simplest version would be to pass in a mount path parameter into the decorator that will add two entries: volumes and mountPoints to the AWS Batch Job Definition containerProperties object.
https://docs.aws.amazon.com/batch/latest/userguide/job_definition_parameters.html#containerProperties

Makes sense. I will add it in the next release.

also, ulimits could be a great addition - https://gitter.im/metaflow_org/community?at=60403e47d2619a4f2e1f6766

Yeah, looking for to have this implement too. Our use case if more of intergration with AWS CodeArtifact to pull pip libraries, however there needs to be away of sharing the logged in mechanism :)

An update - a partial fix for this issue was part of Metaflow 2.3.5 - https://github.com/Netflix/metaflow/releases/tag/2.3.5#441
cc @samuelthan @mattmcclean

hi, @savingoyal  do you have any plan to fully support this?
I am new to metaflow. What I did is to modify the metaflow-aws terraform code to create efs with the correct subnet settings and mount efs when booting using the user data (https://aws.amazon.com/premiumsupport/knowledge-center/batch-mount-efs/).
Another tots is to modify the metaflow to create full volume json objects in the container definition, but will require user modify their cloud infra. Also clear documentation is required.

source: gharchive/issue

authors: NerdToMars mattmcclean samuelthan savingoyal

repo: Netflix/metaflow

license_type: permissive

license_source: github-api


text:
chore(core): Improve "...in the Browser?" docs

Description
Rewriting of the "Using Polly in the Browser?" section.
Motivation and Context
Just to improve clarity. See #219 for further details.
Types of Changes
Just documentation
Checklist

[x] My commits and the title of this PR follow the Conventional Commits Specification.
[x] I have read the contributing guidelines.

BTW, I've been surprised a couple of times by the pre-commit hook not saving my commit message on hook failure. I don't know what the solution is, but it'd be good to either know that the commit message won't necessarily be saved (and so need to be written again), or that something like a pre-push hook be used so the commit message is always available.

The CI failures are unrelated, I'll fix them separately.

Thanks for taking the time to land this!

Great, thanks :)

source: gharchive/pull-request

authors: jasonmit tombh

repo: Netflix/pollyjs


text:
S3 Auditor should use the ARN class

https://github.com/Netflix/security_monkey/blob/587f460697d9e0a71d4e7bff8cd2fb6c41bafbc7/security_monkey/auditors/s3.py#L121
It should be using the ARN class, which has a regex that can parse cloudfront ARNs.
Ideally, we don't want the codebase to have multiple regular expressions that all represent an ARN.
Issue:
POLICY - Bad ARN -- arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity  ...

Fixed and merged in #492

license_source: bigquery


text:
Move tightly coupled metrics out of packages

If this makes sense, I will create separate metrics collectors in metrics package that implement EventListener interfaces of individual packages.

It makes sense to me. Instead of having monolithic EventListener interfaces in each package, could we have
WithOn<Event>(func callback())

methods on the structs? This way users and tests don't need to pass a no-op, and have the option to configure a subset of the listeners.

It makes sense to me. Instead of having monolithic EventListener interfaces in each package, could we have
WithOn<Event>(callback func()) // callback will have different signature as necessary

methods on the structs? This way users and tests don't need to pass a no-op, and have the option to configure a subset of the listeners.

I considered doing at the beginning, but opted for the interface at the end since per-event approach would make the caller code more verbose.
I gave it a try to see how it would look like now, but stuff like below is making me doubt if it is worth it for the additional bit of flexibility. See the last commit.
server := jsonrpc.NewServer(1, utils.NewNopZapLogger()).WithValidator(validator.New()).WithOnNewRequest(listener.OnNewRequest).WithOnRequestHandled(listener.OnRequestHandled).WithOnRequestFailed(listener.OnRequestFailed)

Let me know what you think about the latest push @joshklop

I considered doing at the beginning, but opted for the interface at the end since per-event approach would make the caller code more verbose.

It looks alright to me. We could put the .With... calls on separate lines.
server := jsonrpc.NewServer(1, utils.NewNopZapLogger())
        .WithValidator(validator.New())
        .WithOnNewRequest(listener.OnNewRequest)
        .WithOnRequestHandled(listener.OnRequestHandled)
        .WithOnRequestFailed(listener.OnRequestFailed)

It moves callbacks to the call site, rather than making the caller implement an interface away from the call site. Since the callbacks will probably be concise, I think this makes sense.
It feels similar to Go code that uses functional options for configuration.

Let me know what you think about the latest push

What is the SelectiveListener for?

Let me know what you think about the latest push

What is the SelectiveListener for?

It allows caller to selectively listen to events by assigning callbacks for each of them separately.

Something like SelectiveListener + EventListener interface, gives user the flexibility to use standalone callbacks, implement the interface however they see fit and keeps the overall clutter minimum IMO.

Personally, I feel we could achieve the same with the With... methods. We can attach the callbacks in makeRPCMetrics(server *jsonrpc.Server), instead of having an intermediary SelectiveListener that fulfills the same purpose.

Personally, I feel we could achieve the same with the With... methods

That is correct, until we start to add more and more metrics to packages. With each additional metrics, we will need to chain more With... calls, and create more clutter.

until we start to add more and more metrics to packages. With each additional metric, we will need to chain more With... calls, and create more clutter.

Is the situation different for SelectiveListener?

Yes, there are no additional calls needed to be made. Just an assignment to function pointers in SelectiveListener

authors: joshklop omerfirmak

repo: NethermindEth/juno


text:
Different pale forest item in card and board Fetchr 5.1.4 Pre-Release 2

I have just loaded my first card of the new version, and the pale forest item is different on the board compared to the card. On the board the item is creaking heart, however on the card it shows chiselled resin bricks. Photo attached for reference.

Addition: The correct item for this card was creaking heart - using the /give player item function, chiselled resin bricks did not mark the item off the card, however, a creaking heart did

Addition: Issue occurs consistently with these items on the board (creaking heart)/card (chiselled resin bricks) across different seeds. I am yet to find a card which contains a creaking heart item to test whether it accepts creaking heart or chiselled resin bricks as the item or shows correctly on the board.

Can reproduce. HUD display shows wrong sprite when creaking heart is on the card.

Suspect the sprites are inadvertently swapped between the two reported items. Currently looking for a seed with Chiseled Resin Bricks, to confirm this.

Well, not exactly swapped. Perhaps an off-by-one error...?

authors: CraftyJessJess davepusey

repo: NeunEinser/bingo

license: MIT


text:
VERSION file; refactored MANIFEST.in

Made one file - VERSION - that keeps track of the current package version.
include_package_data=True tells an installer to include all files from MANIFEST.in.
Removed from . import ... in elephant/__init__.py since they are not used in __init__.py later on. Avoid the bad practice of using from elephant import * style.

Coverage remained the same at 87.341% when pulling 0350728862be7e42a56e7203b420b97638153e34 on INM-6:version_file into 1cf5723eb6d457d839d9c0746535bbf3fe8492a7 on NeuralEnsemble:master.

Regarding the line in the developer's guide.
First, check that the version string in :file:`elephant/VERSION` is correct.

I don't understand the point of putting this line in the doc in the way it is now. Consider either removing this line at all (it's not clear what "correct" version means) or explaining why the developer should care about the version file. For example, if he/she fixes a bug, the minor digit 0.6.x has to be incremented.

The line is under the heading "Making a release" and was kept as a reference to make sure all developers/maintainers create releases in the same manner to ensure consistency.
To avoid the confusion you spotted, we could think of dividing these two points into to separate pages, one for developers (i.e., contributors) and one for maintainers (i.e., those making releases etc).

Now merged in https://github.com/NeuralEnsemble/elephant/pull/222

authors: coveralls dizcza mdenker

repo: NeuralEnsemble/elephant


text:
Reading .rhd files with tridesclous

Hello,
I'm acquiring data with an Intan RHD2000 board, so the data files have .rhd  extensions. Tridesclous can't open it. Is there a way to make it work?
Thanks.

I will do it.
The format is well describe by intan?

I proposed writing an RHD2000 IO here #305 but I never got around to actually doing it. Yes the format is well described and they provide a script to load their files into python on their website http://intantech.com/downloads.html

@danielmuellernai : Oups, I totally forgot this. Sorry.
I propose to start it as soon as neo 0.6 is released but if you want to start it before I can help later on.

I didn't perfectly follow the development of neo.rawio Is it ready? If so I would start working on it.
Also for @m-kassa : in the Issue I referenced is a possible workaround involving intan's NeuroExplorer conversion and the NeuroExplorer IO in neo.

Yes rawio is ready, it is in the master since octoberand it is now mature enought,  we are about to release (0.6) in a few weeks.
ephyvirwer and tridesclous already use rawio.

Happy to hear rawio is mature enough. I'm getting to work on RHD2000IO then.

Hi Gracia,
I can send you a file, they are a bit large, what is the best way to do
this?
Cheers
Jason
On Thu, 25 Oct 2018 at 23:23, Garcia Samuel notifications@github.com
wrote:

Hi @bionicinnovations https://github.com/bionicinnovations.
I am waiting that someone give me a file from this format. (<10Mo)
If you have one, I could start it.
Note that the openephys format is already implemented here #580
https://github.com/NeuralEnsemble/python-neo/pull/580 but not merged.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NeuralEnsemble/python-neo/issues/489#issuecomment-433029435,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AlQri9pLy1Zkc-pnaOoVJ5IvHkq24C2sks5uoa0ugaJpZM4Sc19U
.

--
Jason Potas
*0411050101 *

Hi Gracia,
here is a link to a .rhs file.
https://drive.google.com/file/d/1w7big3U3Xxbt-88B0tFhR_fOITIXKGxp/view?usp=sharing
Thanks again for your help, I am very grateful!
Kind regards
Jason
On Fri, 26 Oct 2018 at 18:23, Garcia Samuel notifications@github.com
wrote:

Dropbox or wetranswfer or google drive.
As you want.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NeuralEnsemble/python-neo/issues/489#issuecomment-433313008,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AlQri9sndNQsRuyfljiCSmzG0SOWFcCPks5uoriMgaJpZM4Sc19U
.

--
Jason Potas
*0411050101 *

Thank you.
I will work on it.

Close by #593

authors: bionicinnovations danielmuellernai m-kassa samuelgarcia

repo: NeuralEnsemble/python-neo


text:
nixio==1.5.0 make test failing

nixio 1.5.0 have been released on 15 april 2021.
Now neo/test/iotest/test_nixio.py is failing.
This block all other  PR.

a fix is integrated in this PR https://github.com/NeuralEnsemble/python-neo/pull/978


text:
Added trained model and the script to get the output

I still couldn't figure out how to integrate resulting tensor to get amount of people present on the image from their probabilities.

Please check training / validation loop with this particular part showing how to get the number of objects from density map: https://github.com/NeuroSYS-pl/objects_counting_dmap/blob/master/looper.py#L80-L86

Hey, @tgolan-neurosys. Just saying thanks, because I could finally get my count. ) Which is 1055.95890625 for this image - https://github.com/abitrolly/ai_people_counter/blob/master/input.png
I am not sure if the count is correct. I trained it on a single channel and after conversion of image to single channel I can not distinguish between trees and people. It is great to get that count any way. I will try to test it on images from the dataset and some random photos where I can count everything manually.
The code you referenced loops over single element and I send https://github.com/NeuroSYS-pl/objects_counting_dmap/pull/10 to simplify it.
https://github.com/NeuroSYS-pl/objects_counting_dmap/blob/56ccdb6b98a5e713273f261323d66768c0324c44/looper.py#L80-L86
I am not proficient in PyTorch. Maybe you can answer the simple question? Why a single element array is returned and not just a single element?

Hey, @tgolan-neurosys. Just saying thanks, because I could finally get my count. ) Which is 1055.95890625 for this image - https://github.com/abitrolly/ai_people_counter/blob/master/input.png
I am not sure if the count is correct. I trained it on a single channel and after conversion of image to single channel I can not distinguish between trees and people. It is great to get that count any way. I will try to test it on images from the dataset and some random photos where I can count everything manually.
The code you referenced loops over single element and I send https://github.com/NeuroSYS-pl/objects_counting_dmap/pull/10 to simplify it.
https://github.com/NeuroSYS-pl/objects_counting_dmap/blob/56ccdb6b98a5e713273f261323d66768c0324c44/looper.py#L80-L86
I am not proficient in PyTorch. Maybe you can answer the simple question? Why a single element array is returned and not just a single element?

I do not understand why and how it's supposed to be "a single element". The same way one-element list does not become a single element.
Since it is a tensor you can apply all operations available for PyTorch's tensors. If you want a single value you can always use item().

I do not understand why and how it's supposed to be "a single element". The same way one-element list does not become a single element.
Since it is a tensor you can apply all operations available for PyTorch's tensors. If you want a single value you can always use item().

authors: abitrolly tgolan-neurosys


text:
not found in the YAML file

[07:54:28 WARN]: Nag author(s): '[NewAmazingPVP]' of 'AutoViaUpdater v6.5' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[08:54:28 INFO]: [AutoViaUpdater] [STDOUT] ViaRewind%20Legacy%20Support not found in the YAML file. Did you touch the doNotTouch.yml file? Regenerate it
[08:54:28 WARN]: Nag author(s): '[NewAmazingPVP]' of 'AutoViaUpdater v6.5' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[09:54:28 INFO]: [AutoViaUpdater] [STDOUT] ViaRewind%20Legacy%20Support not found in the YAML file. Did you touch the doNotTouch.yml file? Regenerate it
[09:54:28 WARN]: Nag author(s): '[NewAmazingPVP]' of 'AutoViaUpdater v6.5' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[10:54:28 INFO]: [AutoViaUpdater] [STDOUT] ViaRewind%20Legacy%20Support not found in the YAML file. Did you touch the doNotTouch.yml file? Regenerate it
[10:54:28 WARN]: Nag author(s): '[NewAmazingPVP]' of 'AutoViaUpdater v6.5' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[11:54:28 INFO]: [AutoViaUpdater] [STDOUT] ViaRewind%20Legacy%20Support not found in the YAML file. Did you touch the doNotTouch.yml file? Regenerate it
[11:54:28 WARN]: Nag author(s): '[NewAmazingPVP]' of 'AutoViaUpdater v6.5' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[12:54:28 INFO]: [Vault] Checking for Updates ...
[12:54:28 INFO]: [AutoViaUpdater] [STDOUT] ViaRewind%20Legacy%20Support not found in the YAML file. Did you touch the doNotTouch.yml file? Regenerate it
[12:54:28 WARN]: Nag author(s): '[NewAmazingPVP]' of 'AutoViaUpdater v6.5' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[12:54:28 WARN]: [Vault] No files found, or Feed URL is bad.
[12:54:28 INFO]: [Vault] No new version available
[13:54:28 INFO]: [AutoViaUpdater] [STDOUT] ViaRewind%20Legacy%20Support not found in the YAML file. Did you touch the doNotTouch.yml file? Regenerate it
[13:54:28 WARN]: Nag author(s): '[NewAmazingPVP]' of 'AutoViaUpdater v6.5' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[14:54:28 INFO]: [AutoViaUpdater] [STDOUT] ViaRewind%20Legacy%20Support not found in the YAML file. Did you touch the doNotTouch.yml file? Regenerate it
[14:54:28 WARN]: Nag author(s): '[NewAmazingPVP]' of 'AutoViaUpdater v6.5' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).

This is a known bug with AutoViaUpdater v6.5, can you update to v7.0? I will release v7.5 soon.

repo: NewAmazingPVP/AutoViaUpdater


text:
mergin-client error when changes made to geopackages

Seems to be occurring with programatic and QGIS by-hand changes to files.

The documentation for this is available here http://htmlpreview.github.io/?https://github.com/NewGraphEnvironment/dff-2022/blob/master/scripts/qgis/mergin/py_client_error.html .


text:
MCS-1501 Update requirements

Updated versions in the requirements file (as much as possible).
Added github workflows to automatically test python 3.8, 3.9, and 3.10 on both linux and mac.

@ThomasSchellenbergNextCentury I am getting a failure on integration tests using 3.10, here is the process I used:

git clone https://github.com/NextCenturyCorporation/MCS.git
cd MCS
python3.10 -m venv --prompt mcs venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install machine-common-sense
pip install -r requirements.txt
python -m unittest  (Good)

- python run_tests.py  --mcs_unity_build_file_path ../../../unity/test19.app/Contents/MacOS/MCS-AI2-THOR --dev (Bad)
========================================
HANDMADE TEST METADATA TIER: LEVEL1
Initialize return: {'cameraNearPlane': 9.999999747378752e-05, 'cameraFarPlane': 9999.0}
RUNNING SCENE: 001.empty_room_movement.scene.json
Traceback (most recent call last):
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/integration_tests/run_tests.py", line 21, in
start_handmade_tests(
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/integration_tests/run_handmade_tests.py", line 355, in start_handmade_tests
successful, status = run_single_scene(
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/integration_tests/run_handmade_tests.py", line 226, in run_single_scene
step_metadata = controller.start_scene(scene_data)
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/venv/lib/python3.10/site-packages/machine_common_sense/controller.py", line 365, in start_scene
scene_config = self._convert_scene_config(config_data)
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/venv/lib/python3.10/site-packages/machine_common_sense/controller.py", line 345, in _convert_scene_config
return schema.load(config_data)
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/venv/lib/python3.10/site-packages/marshmallow/schema.py", line 722, in load
return self._do_load(
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/venv/lib/python3.10/site-packages/marshmallow/schema.py", line 909, in _do_load
raise exc
marshmallow.exceptions.ValidationError: {'_schema': ['Invalid input type.']}

@ThomasSchellenbergNextCentury I am getting a failure on integration tests using 3.10. Looks lie is marshmallow. Here is the process I used:

git clone https://github.com/NextCenturyCorporation/MCS.git
cd MCS
git checkout MCS-1501-reqs
python3.10 -m venv --prompt mcs venv
source venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install machine-common-sense
pip install -r requirements.txt
python -m unittest  (Good)

- python run_tests.py  --mcs_unity_build_file_path ../../../unity/test19.app/Contents/MacOS/MCS-AI2-THOR --dev (Bad)
========================================
HANDMADE TEST METADATA TIER: LEVEL1
Initialize return: {'cameraNearPlane': 9.999999747378752e-05, 'cameraFarPlane': 9999.0}
RUNNING SCENE: 001.empty_room_movement.scene.json
Traceback (most recent call last):
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/integration_tests/run_tests.py", line 21, in
start_handmade_tests(
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/integration_tests/run_handmade_tests.py", line 355, in start_handmade_tests
successful, status = run_single_scene(
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/integration_tests/run_handmade_tests.py", line 226, in run_single_scene
step_metadata = controller.start_scene(scene_data)
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/venv/lib/python3.10/site-packages/machine_common_sense/controller.py", line 365, in start_scene
scene_config = self._convert_scene_config(config_data)
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/venv/lib/python3.10/site-packages/machine_common_sense/controller.py", line 345, in _convert_scene_config
return schema.load(config_data)
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/venv/lib/python3.10/site-packages/marshmallow/schema.py", line 722, in load
return self._do_load(
File "/Users/jacob.audick_cn/Documents/new-requirements/MCS/venv/lib/python3.10/site-packages/marshmallow/schema.py", line 909, in _do_load
raise exc
marshmallow.exceptions.ValidationError: {'_schema': ['Invalid input type.']}

@jaudick Oof, I forgot to check the integration tests for other python versions... Let me try to figure out if I can install Python 3.10, so I can test this locally

@jaudick There were two issues:

I forgot to update the versions in the setup.py file, and make sure it supports 3.10 (apparently I misread it, and we only supported up to 3.9 before, but now we fully support 3.10 as well!). Please pull the latest.
Your step number 7 is incorrect. That command installs the latest release of machine_common_sense, ignoring the modified code on your local branch. You need to run: python -m pip install -e . (remember the dot at the end). You can verify this refers to your local branch by running pip show machine_common_sense; the "Location" should be the file path to your local MCS repo.

The integration tests are currently running fine for me with 3.10, so hopefully this will fix your issue as well.

authors: ThomasSchellenbergNextCentury jaudick

repo: NextCenturyCorporation/MCS


text:
Enhance get_list_of_xx calls by allowing for filter by network id

Enhance get_list_of_xx calls by allowing for filter by network id
Description
While developing utils using libcloud, I found that there were several routines in the LoadBalancer driver that just did not seem right.  Specifically, these were the "get a list of XXX"-type routines.  I felt (and others agreed) that it was "less than ideal" that these routines all defaulted to "return EVERYTHING from your company across ALL networks".  Initially, I assumed that it would filter by network (since I had already told the LB Driver what my network Id was.  However, in testing my util, I found that it return LoadBalancers (in my case) from networks that I had never heard of.
Therefore, I created this PR.  The interface changes are BACKWARDS compatible.
For example:
def list_balancers(self)     ==>     def list_balancers(self, network_id=None)
Status
This code has been tested to show that:

by default, the original all-encompassing lists are returned.
using the new parameter, a list that only applies to the given network id is returned.

I do have several more tests that I want to run.  I won't be able to get to those until 8/31/16 though.
Checklist (tick everything that applies)

I will get to these (and update the PR as needed) on the 31st.
I just wanted to get you this code as soon as possible.

[ ] Code linting (required, can be done after the PR checks)
[ ] Documentation
[ ] Tests
[ ] ICLA (required for bigger changes)

NOTE: We took this "concept" and applied to all the places that WE needed.  This may apply to the compute and backup drivers as well.

LGTM

repo: NexusIS/libcloud


text:
proccess keeps running when sublime text exists [windows]

Running a Gulp task with watch must be killed specifically before exiting.
In case of closing sublime text without exisiting, node.exe keeps running - and a new sublime text session will not be able to pick up the process and will error if running a new gulp task!

I'm not sure if Sublime provides a callback for when the editor closes, I'll definitely take a look and report back here.

sweet!

Sadly there's no callback when Sublime exits, so what I did is creating a new command (gulp_exit) which will kill all running tasks and then close the editor. There's however a callback when a view closes but to use it I should check on every view close if it's the last one of all the open windows, which is not very nice.
The command works, but the annoying part is that you'll have to bind it to a shortcut by hand, like this:
    // Mac
    { "keys": ["super+q"], "command": "gulp_exit" },

    // Linux/Windows
    { "keys": ["alt+f4"], "command": "gulp_exit" }

The command is in this branch if you want to try it out. I'll merge it into master once I'll update the docs.
Let me know if this helps or if you have a better idea!

nice workaround, but generally i wouldn't want to override a native OS shortcut..
Plus it wont fire if someone press the close [X] button, or File->exit ..
Also - i am new to git, and i dont actually know how to get the branch for the plugin... [package control would usually do that for me]
Can you help me in getting the new code?
Moreover - are you sure gulp_exit closes the editor in the same manner that it closes itself?
thanks

nice workaround, but generally i wouldn't want to override a native OS shortcut..
Plus it wont fire if someone press the close [X] button, or File->exit ..

I know, it's not really the best experience :(, it's a shame Sublime doesn't provide a callback for this.
I'll give the 'view close' callback a try and if it works maybe make it available with a flag explaining that it could impact performance.

Also - i am new to git, and i dont actually know how to get the branch for the plugin... [package control would usually do that for me]
Can you help me in getting the new code?

Yup!
It might be a bit annoying, but you'll have to do something like this:

Remove gulp using Package Controls Remove Package command.
Go to your packages folder ([Ctrl/Cmd]+Shift+P -> Browse Packages).
Open a terminal.
Clone this project there: $> git clone git@github.com:NicoSantangelo/sublime-gulp.git Gulp.
cd into the package and checkout the branch:

$> cd Gulp
$> git checkout clean-exit

That's it! (maybe restart Sublime)
When you want to go back to using PackageControl, you can safely remove the Gulp folder and re-install using PackageControls Install Package inside Sublime.
I'll try to get this on master as fast as I can, but if you want to test it is really helpful. Sorry if it's too much of a hassle

Moreover - are you sure gulp_exit closes the editor in the same manner that it closes itself?

Yes!, Sublime internally calls exit to close itself on the default Key Bindings.

Hey!
I did some experiments trying to figure out when the user is closing the editor without using a Key Binding and sadly there's no straightforward way that works 100% of the time.
I think I'll merge this with master so at least we have the Key Binding, and you can test it without having to clone the branch.

Well, this is in. I know it's not the best solution, but currently it's the only thing that (kind of) works.
I'll close this, but if you have any problem or suggestion, let me know and I'll reopen (please tag me so Github sends me a notification).
Thanks again!

ok thank you sir.

authors: NicoSantangelo dirad

repo: NicoSantangelo/sublime-gulp

license: mit


text:
print multiple commands

hello
i want print a image and text or array how can i use image command with another command and send it to print

This issue is over a year old without a response. Closing for now. Please re-open if this is still an issue.

authors: NielsLeenheer enimakherratia

repo: NielsLeenheer/EscPosEncoder


text:
Fix compiler warnings

Warning
clang-cl: warning: unknown argument ignored in clang-cl: '-fno-ident' [-Wunknown-argument]
Solve
Delete the 3 lines below in src\build\config\compiler\BUILD.gn
line 315 to 317
if (!is_win || is_clang) {
cflags += [ "-fno-ident" ]
}

Hopefully it will be introduced in LLVM 13.
https://github.com/llvm/llvm-project/commit/83feaa36ad53ce93ed808169d3316ed757703e47

authors: Nifury playgithub

repo: Nifury/ungoogled-chromium-windows


text:
[FR] More handlers

Hi,
any chance in the future to support >2 handlers? I run into your repository while looking for a Vue component to make a range slider with falloff, something like:

Thanks!

Sorry, it's hard to add this feature to the current architecture, so I won't add this feature recently.

Support for more handles in the latest version.

authors: NightCatSama undavide

repo: NightCatSama/vue-slider-component


text:
Vue 3 support

Hey! Are you aware that this library doesn't work with vue 3 and do you have plans to fix it?
I'm getting this error:

I believe this is because you can't extend Vue anymore, which is happening here: https://github.com/NightCatSama/vue-slider-component/blob/master/lib/vue-slider.tsx#L48
Let me know if there's anything I can do to help - although I'm completely unfamiliar with this library's code.

Sorry, it is not yet compatible with Vue3.
It will be compatible when the stable version of vue3 is released.

The next version with vue3 support has been released, but it's still in beta, if you find any bugs you can report back to me!
$ yarn add vue-slider-component@next
# npm install vue-slider-component@next --save

authors: NightCatSama callumacrae


text:
[FEATURE] Support '.yaml' extension for .brickflow-project-root.yml and brickflow-multi-project.yml files.

Is your feature request related to a problem? Please describe.
Support '.yaml' extension for .brickflow-project-root.yml and brickflow-multi-project.yml files.
Cloud Information
N/A
Describe the solution you'd like
Besides '.yml' also support '.yaml' file extensions for mentioned files.
Describe alternatives you've considered
N/A
Additional context
N/A

assigned it to Iacomini.riccardo@gmail.com

authors: menathan pariksheet

repo: Nike-Inc/brickflow


text:
Formalize pack description

Pack is a quite difficult thing. Thus we need to formalize its description and requirements for future usage and modification.

Em, not sure such an utility piece of code matters something in terms of concepts. Concepts are supposed to be an architectural trick, named type requirements to use them in some generic algorithm type traits. Packing is important, but it is an algorithm itself. Type requirements are not applicable here, I think.

On 5 Jun 2020, at 10:56, Nikita notifications@github.com wrote:

Pack is a quite difficult thing. Thus we need to formalize its concept for future usage and modification.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

OK, maybe not a concept. But we should formalize what we expect from pack now while we are reviewing it. Otherwise, we'll waste a lot of time understanding it next time.

Agreed. Extremely descriptive comments along with inclusion into the doxygen-generated documentation would do the trick, I believe?

On 5 Jun 2020, at 13:42, Nikita notifications@github.com wrote:

OK, maybe not a concept. But we should formalize what we expect from pack now while we are reviewing it. Otherwise, we'll waste a lot of time understanding it next time.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Yes. I think that will work.

authors: nemothenoone nkaskov

repo: NilFoundation/hash


text:
🛑 Nilead Logger is down

In 96a3295, Nilead Logger (https://logger.mynilead.com:9502/status) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Nilead Logger is back up in 9865d0d.

repo: Nilead/uptime


text:
Attempt at supporting webgl2

Adds ES versions of shaders and moves pipeline setup to plugin build instead of startup system (identical to how the rest of bevy handles its pipeline setups), finally I have changed bevy version from git repo to published 0.5 release, this is mostly so I could actually build it in my project while testing as main branch has a few breaking changes that affect other libs.
This is still a WIP, the shaders no longer cause a panic, but at least in my usecase I wasn't able to produce any visual output for my shapes. If someone wants to pick up where I left off, good luck.
Related: #93

but at least in my usecase I wasn't able to produce any visual output for my shapes. If someone wants to pick up where I left off, good luck.

It seems bevy_webgl2 was not properly supporting front / back facing. I've just released 0.5.1 version fixing it.

Updating to bevy_webgl2 0.5.1 and using my latest branch has fixed it, finally it works on the web!

Thanks @alyti for your contribution. Just a couple of things before merging:

I just merged a PR (#98) to fix an issue with clippy after you forked to fix the CI on master. Idk if merging now would unfix that.
Cargo.toml should be reverted to point to the main branch of Bevy. I'll release bevy_prototype_lyon v0.3.1 just after merging this PR.
I ran cargo +nightly fmt --all -- --check but there are some incorrect newlines. Maybe try to rerun it to make the CI pass.

Hi @Nilirad, I've reverted cargo.toml changes, I also tried to run cargo fmt again locally but didn't get anything new.

Yeah, I also tried the cargo fmt check thing on master and got the same errors. Maybe its vscode that changes the newlines locally, since CI passed normally there...
Here CI gives error apparently because of forked repo... I'll merge and I'll fix any possible error locally.

I suspect for CI to pass here there would need to be  #[allow(clippy::too_many_lines)] added to pipeline creation function since the new cfg if condition results in 10 lines instead of 2 it used to be and thus being over 50 line limit.

authors: Nilirad alyti mrk-its


text:
any kind of error in callJs leads to JSON parse error, original error disappears

The code in neel.js (see neel.nim, line 254) for responding to a callJs request will swallow any exception caused by the function being called and make it look like the problem is a JSON parse error. Offending code section:
254 ws.onmessage = (data) => {
255     try {
256         let x = JSON.parse(data.data)
257         let v = Object.values(x)
258         neel.callJs(v[0], v[1])
259     } catch (err) {
260         let x = JSON.parse(data)
261         let v = Object.values(x)
262         neel.callJs(v[0], v[1])
263     }
264 }

If line 256 succeeds and the function called in line 258 then throws an exception, then the catch block attempts to re-parse the whole message as JSON, which fails with Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data and the original exception which was thrown in the try block is lost.
I think this would do the trick:
254 ws.onmessage = (data) => {
255    let x;
256     try {
257         x = JSON.parse(data.data)
258     } catch (err) {
259         x = JSON.parse(data)
260     }
261         let v = Object.values(x)
262         neel.callJs(v[0], v[1])
263 }

@LemongrabThree Apologies for the delay brother.
@NecroticOoze Take a look please

@LemongrabThree
We've just released 0.3.1 which includes your changes. Thanks for the contribution! Happy coding

authors: LemongrabThree Niminem

repo: Niminem/Neel


text:
Methods don't get generated in the Live part

I'm running into the error method not found in ActorLive in some project. Recreated the issue in the form of the example of the library. I looked at the generated code and, indeed, for some reason the Live part does not contain the generated methods.
The example works just fine, but I can't seem to figure out why I won't with the code below.
pub struct Actor {
    database: String,
}

#[interthread::actor]
impl Actor {
    pub fn new(database: String) -> Self {
        Self { database }
    }
    pub fn bump() {}
    pub fn get_user(self, username: String) -> String {
        "read_user".into()
    }
}
fn main() {

    let actor =
    ActorLive::new("test".to_owned());

    let mut actor_a = actor.clone();
    let mut actor_b = actor.clone();

    actor_a.bump();

    let handle_a = std::thread::spawn( move || {
    actor_a.get_user("test");
    });

    let handle_b = std::thread::spawn( move || {
    actor_b.get_user("test")
    });

    let _  = handle_a.join();
    let hb = handle_b.join().unwrap();
}

Using crates:
interthread = "1.2.4"
oneshot     = "0.1.6"
Rust version:
cargo 1.77.2 (e52e36006 2024-03-26)
Thanks for the effort!

Hi, Guy Dols !
The behaviour you're observing is indeed intentional ( doesn't mean it's nice one).
The macro is designed to target methods that utilize as receiver
either &self or &mut self ( I will improve the documentation, just to make sure that the reader can't avoid this statement).
Lets look at what you're pointing at:
pub fn bump() - this is a static method has no receiver at all, there is no way to read
or mutate the state, the macro will ignore it ( this will change in future versions ).
pub fn get_user(self, username: String) -> String -
this method has a self receiver which consumes the instance, this is against the model itself, no instance - no model.
In the first case, it was solely my mistake as I was unable to provide
a straightforward justification at the time for:

Why we need Actor's associated (static) methods in the model?

What associated methods should be included in the model?

See the option  assoc it makes the macro to take in consideration public static methods. But
it will not work for in this case as there isn't any input or output ( so it will be ignored anyway ) .. as I've said my mess.
The plan is for the next release ( hopefully soon as I'm a bit bussy at the moment ) to implement some
changes which will remove the assoc option in favor of default inclusion of static methods
based on following arguments :

We need associated methods in the model because it saves from exporting ( declaring public ) Actor type (and then importing it) just for the sake of using some associated methods on it.
All non-private (pub , pub(crate) and so on.. ).

This behaviour will change in future release.
Next, second  method get_user consumes self, the model simply can't be reliably constructed for methods that consume the actor instance, therefore the macro will ignore these methods
letting the user deal with them if any.
I recognize that the current behavior may appear ignorant at first glance.
However, raising errors for unprocessable code,
will create impediments for users who're customizing the model to meet their
specific requirements by adding necessary functionalities.
Even if the method signature will be of the form pub fn get_user(self, username: String) -> Self
we can detect it and assume that it's a possible swap, note that in this case we will not return
anything to ActorLive instance. So we can perform just a swap.. but a simple swap of the Actor doesn't require the method to consume the instance like in this example:

struct Actor(String);

#[interthread::actor]
impl Actor {

    pub fn new( name: &'static str ) -> Self {
        Self(name.to_string())
    }

    pub fn get_name(&self) -> String {
        self.0.clone()
    }

    pub fn swap(&mut self, other: Self ) -> Self {
        std::mem::replace( self, other)
    }
}

fn main() {

    let mut act_one = ActorLive::new("One");
    // check name
    println!("First  - {}", act_one.get_name());

    let act_two = Actor::new("Two");
    // swap the actors
    let _ = act_one.swap(act_two);

    // check name
    println!("Second - {}", act_one.get_name());

    // we need to wait
    std::thread::sleep(std::time::Duration::from_secs(1));

}

Going back to original question (design),
if you where to trick the macro by changing the method signature receiver to an acceptable one ( &self or &mut self ),
and then print it on the file via edit and file  and then changing the receiver back to
self, Rust will not compile the code as it's capable to detect the trouble, we need to do some additional changes in ActorScript::direct :

pub struct Actor {
    database: String,
}

#[interthread::actor(file="path/to/you_file.rs",
// edit(script,live(imp(get_user))))  ]
edit(script))]

impl Actor {
    pub fn new(database: String) -> Self {
        Self { database }
    }
    pub fn method_1(&self) {}
    pub fn method_2(&self) {}
    pub fn get_user(self, username: String) -> String {
        "read_user".into()
    }
}

//++++++++++++++++++[ Interthread  Write to File ]+++++++++++++++++//
// Object Name   : Actor
// Initiated By  : #[interthread::actor(file="path/to/you_file.rs",edit(file(script),live(imp(file(get_user)))))]

pub enum ActorScript {
    Method1 {},
    Method2 {},
    GetUser { input: (String), inter_send: oneshot::Sender<String> },
}
impl ActorScript {
    pub fn direct(self, actor: &mut Actor) {
        match self {
            ActorScript::Method1 {} => {
                actor.method_1();
            }
            ActorScript::Method2 {} => {
                actor.method_2();
            }
            ActorScript::GetUser { input: (username), inter_send } => {
                // we may create and swap a new actor for every call to "get_user"
                //let old_actor = std::mem::replace( actor, Actor::new( "New".to_string()) );

                inter_send
                    //.send(old_actor.get_user(username))
                    .send(actor.get_user(username))
                    .unwrap_or_else(|_error| {
                        core::panic!(
                            "'ActorScript::GetUser.direct'. Sending on a closed channel."
                        )
                    });
            }
        }
    }
    pub fn play(receiver: std::sync::mpsc::Receiver<ActorScript>, mut actor: Actor) {
        while let std::result::Result::Ok(msg) = receiver.recv() {
            msg.direct(&mut actor);
        }
        eprintln!("Actor the end ...");
    }
}
impl std::fmt::Debug for ActorScript {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            ActorScript::Method1 { .. } => write!(f, "ActorScript::Method1"),
            ActorScript::Method2 { .. } => write!(f, "ActorScript::Method2"),
            ActorScript::GetUser { .. } => write!(f, "ActorScript::GetUser"),
        }
    }
}
impl ActorLive {
    pub fn get_user(&self, username: String) -> String {
        let (inter_send, inter_recv) = oneshot::channel();
        let msg = ActorScript::GetUser {
            input: (username),
            inter_send,
        };
        let _ = self
            .sender
            .send(msg)
            .expect("'ActorLive::method.send'. Channel is closed!");
        inter_recv
            .recv()
            .unwrap_or_else(|_error| {
                core::panic!("'Actor::get_user' from inter_recv. Channel is closed!")
            })
    }
}

// *///.............[ Interthread  End of Write  ].................//

fn main() {

    let mut act = ActorLive::new("MyInstance".to_string());

    let _ = act.get_user("Bla".to_string());
}

It has to be done manually case dependent.
So to recap, I will change static methods soon but 'self' receivers
I believe it's preferable to leave on user's experience as there isn't a
generalized solution.
What are your thoughts on this matter?
Thank you for your involvement!

Hey Simon,
Thank you for the time and effort in explaining the design choices.
It's much clearer now with the examples you have given.
I was able to rectify it in the project I was working on when I stumbled onto the problem. In hindsight, I feel kind of silly not seeing the pattern when compared to the library example. But now that I have a better understanding of the design, it makes perfect sense.
BTW, great library, I often dreamed of this kind of solution to the problem of having to manually define channels and interactions over and over again.
Great work!

authors: NimonSour guydols

repo: NimonSour/interthread


text:
ghcWithHoogle fails to build index if all dependencies are GHC core libraries

Describe the bug
ghcWithHoogle will fail to index if all dependencies are GHC core libraries.
It will fail with the following error message:
error: --- TypeError ------------------------------------------------------------------------------------------------------------------------------------------------------------- nix
at: (69:43) in file: /nix/store/cczavfv0z5fn392v37ypc48555wagvil-source/pkgs/development/haskell-modules/hoogle.nix

    68|        + " the following were specified: "
    69|        + lib.concatMapStringsSep ", " (p: p.name) packages)}
      |                                           ^
    70|     mkdir -p $out/share/doc/hoogle

value is null while a set was expected

To Reproduce
Steps to reproduce the behavior:

clone https://github.com/poscat0x04/ghc-with-hoogle-demo
run nix develop (requires nix flake), this should fail
add any package that's not a GHC core library to build-depends
run nix develop again, now it should enter dev shell just fine

Expected behavior
ghcWithHoogle should handle the case where all dependencies are GHC core libraries
Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute: haskell.lib
# a list of nixos modules affected by the problem
module:

@poscat0x04 Thanks for reporting this.
Could post a way to reproduce this without using flakes?

@poscat0x04 Thanks for reporting this.
Could post a way to reproduce this without using flakes?

This is a duplicate of #82245

authors: cdepillabout pjones poscat0x04

repo: NixOS/nixpkgs


text:
Packaging Request:  Electrum Personal Server

Project description
Electrum is one of the most popular desktop Bitcoin wallet applications, however it does not run its own full node, and sends and receives data and txs to other full nodes in the network.  Electrum Personal Server enables Electrum to connect to a local Bitcoin Core full node, which it can't do on its own, improving privacy and functionality (faster searches, etc).
Metadata

homepage URL: https://github.com/chris-belcher/electrum-personal-server
source URL: https://github.com/chris-belcher/electrum-personal-server
license: MIT
platforms: unix, linux, darwin

You can use electrs and fulcrum - both packaged in Nixpkgs.
Unless there is strong reason for using EPS, I prefer not to package yet another implementation.
Closing. Feel free to reopen when you really really need EPS.

authors: byrongibson prusnak


text:
Vulnerability roundup 111: calibre-web-0.6.14: 6 advisories [9.8]

search, files

[ ] CVE-2021-4171 CVSSv3=9.8 (nixos-unstable)
[ ] CVE-2022-0339 CVSSv3=9.8 (nixos-unstable)
[ ] CVE-2021-4164 CVSSv3=8.8 (nixos-unstable)
[ ] CVE-2022-0273 CVSSv3=6.5 (nixos-unstable)
[ ] CVE-2022-0352 CVSSv3=6.1 (nixos-unstable)
[ ] CVE-2021-4170 CVSSv3=5.4 (nixos-unstable)

CVE details
CVE-2021-4171
calibre-web is vulnerable to Business Logic Errors
CVE-2022-0339
Server-Side Request Forgery (SSRF) in Pypi calibreweb prior to 0.6.16.
CVE-2021-4164
calibre-web is vulnerable to Cross-Site Request Forgery (CSRF)
CVE-2022-0273
Improper Access Control in Pypi calibreweb prior to 0.6.16.
CVE-2022-0352
Cross-site Scripting (XSS) - Reflected in Pypi calibreweb prior to 0.6.16.
CVE-2021-4170
calibre-web is vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Scanned versions: nixos-unstable: 5aaed40d22f.
Cc @pborzenkov

Fixed:

nixos-unstable: calibre-web-0.6.18

authors: ckauhaus yorickvP


text:
nvidia udev process fails

Mar 24 18:20:17 porty systemd-udevd[90508]: card0: Process '/nix/store/dndi916j6yxzfzzj2sma2llhrlwahq06-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0 c $(grep nvidia-frontend /proc/devices | cut -d \  -f 1) 0'' failed with exit code 1.
Mar 24 18:20:17 porty systemd-udevd[90533]: card0-DP-3: Process '/nix/store/dndi916j6yxzfzzj2sma2llhrlwahq06-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia3 c $(grep nvidia-frontend /proc/devices | cut -d \  -f 1) 3'' failed with exit code 1.
Mar 24 18:20:17 porty systemd-udevd[90584]: card0-DP-2: Process '/nix/store/dndi916j6yxzfzzj2sma2llhrlwahq06-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia2 c $(grep nvidia-frontend /proc/devices | cut -d \  -f 1) 2'' failed with exit code 1.
Mar 24 18:20:17 porty systemd-udevd[90508]: card0-DP-1: Process '/nix/store/dndi916j6yxzfzzj2sma2llhrlwahq06-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia1 c $(grep nvidia-frontend /proc/devices | cut -d \  -f 1) 1'' failed with exit code 1.
Mar 24 18:20:17 porty systemd-udevd[90574]: card0-HDMI-A-1: Process '/nix/store/dndi916j6yxzfzzj2sma2llhrlwahq06-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia1 c $(grep nvidia-frontend /proc/devices | cut -d \  -f 1) 1'' failed with exit code 1.

This is on latest nixos unstable commit 1ec61dd4167f04be8d05c45780818826132eea0d (nixos/nixos-unstable)

Same issues here.
Every time I plug / unplug DP port, It appears and crash my GDM.
I found this line in hardware - nvidia NixOS module:
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/hardware/video/nvidia.nix#L365=

I've got some cleanup commit(s): https://github.com/colemickens/nixpkgs/commits/cmpkgs
ctrl-f "nvidia". I've got a lot of cleanups in progress.
I still have flickering (I think it's a sway issue) but no crashing and actually, I somehow fixed EGL+Xwayland.
I'm not sure what you're experiencing though -- at least, I can't imagine why a failing udev rule would just cause gnome to crash. For the most part these rules seem to be setting permission on hotPLUG rather than unplug. But, I just got it to quiet down, I didn't investigate super thoroughly.

I also have these warnings (added some whitespace for better reading):

May 23 15:10:09 copper systemd-udevd[688]: nvidia:          Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidiactl c 195 255'' failed with exit code 1.
May 23 15:10:10 copper systemd-udevd[688]: card0-DP-1:      Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:10 copper systemd-udevd[688]: card0:           Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:10 copper systemd-udevd[688]: card0-HDMI-A-1:  Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:10 copper systemd-udevd[688]: card0:           Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:10 copper systemd-udevd[688]: card0-DP-2:      Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:10 copper systemd-udevd[688]: card0:           Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:10 copper systemd-udevd[688]: card0-DP-3:      Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:10 copper systemd-udevd[688]: card0:           Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:10 copper systemd-udevd[688]: card0-Unknown-1: Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:10 copper systemd-udevd[688]: card0:           Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:10 copper systemd-udevd[688]: card0:           Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:11 copper systemd-udevd[688]: card0:           Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:11 copper systemd-udevd[688]: card0:           Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:12 copper systemd-udevd[688]: card0:           Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.
May 23 15:10:12 copper systemd-udevd[688]: card0:           Process '/nix/store/14lypyys4gfcl982rjddxa6jg7msqz9q-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0   c 195 0'    failed with exit code 1.

Note that those card0-???-#, warnings are for the physical sockets on the back of the card which are not connected to any monitor. The card0-Unknown-1 is a USB-C socket.
The connected sockets, HDMI-0 and DP-0, do not generate a warning.
Also note that the first line (beginning with nvidia: Process...) is trying to create a different file.
My setup:

NVIDIA RTX 2060 SUPER
Latest stable proprietary driver
Latest unstable nixpkgs
hardware.nvidia.modesetting.enable = true

I can no longer use the HDMI port on my laptop either. Tried reverting to 22.05 to see if it would help but no dice. Either way, I get this in my log over and over again, and my system becomes laggy until I unplug the cable:
Jul 02 16:20:42 triton systemd-udevd[47004]: card1: Process '/nix/store/j9rc786ylq8cid4zgcn6idknilkbd4ax-bash-5.1-p16/bin/bash -c 'mknod -m 666 /dev/nvidia0 c 195 0' failed with exit code 1.
Jul 02 16:20:43 triton kernel: [drm:nv_drm_gem_export_nvkms_memory_ioctl [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Failed to lookup NVKMS gem object for export: 0x00000001

This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/laptop-screen-not-detected/20117/2

after some testing, I found that #126604 resolves the udev errors in the log. It didn't fully resolve my HDMI issues, but it did help. I was able to render retroarch to an external monitor via VK_KHR_display, which I wasn't able to do previously. So that's definitely an improvement, and the system stalling repetitive erros are also gone. The PR does have a merge conflict but it's pretty simple to resolve, I just copy and pasted the line from the PR replacing the existing line in a fork of nixos-unstable to test and it worked well.

I don't use X so I'm not sure. I stil cannot use Vivarium (wayland) with an external monitor, so something is still wrong since I was able to a few months ago. Like I mentioned, the main improvements are the fact that my system is not longer unresponsive when the HDMI cable is plugged in, and that I was at least able to use retroarch from a tty, which I wasn't before.

For the record, I cherry-picked the commit on top of 22.05 to test. Plugging external monitors in hybrid mode still crashes X11 on my Thinkpad P15. This laptop is only usable in discrete GPU mode. Too bad, I was hoping this was related 🤷♂

authors: VergeDX colemickens exzombie jessestricker nixos-discourse nrdxp


text:
haskellPackages.postgrest fails to build on aarch64-darwin

Steps To Reproduce
Steps to reproduce the behavior:

nix-shell -p haskellPackages.postgrest

Build log
error: Package ‘configurator-pg-0.2.5’ in /nix/store/vrkp5raqkgiaa3xs62i8pm53hc8qrg5s-nixpkgs/nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix:64838 is marked as broken, refusing to evaluate.

       a) To temporarily allow broken packages, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_BROKEN=1

        Note: For `nix shell`, `nix build`, `nix develop` or any other Nix 2.4+
        (Flake) command, `--impure` must be passed in order to read this
        environment variable.

       b) For `nixos-rebuild` you can set
         { nixpkgs.config.allowBroken = true; }
       in configuration.nix to override this.

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowBroken = true; }
       to ~/.config/nixpkgs/config.nix.
(use '--show-trace' to show detailed location information)

Additional context
Add any other context about the problem here.
Notify maintainers

?
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
❯ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 21.6.0, macOS 12.5`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.10.3`
 - channels(axel): `""`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

@AxelTLarsson We'd happily accept PRs fixing this if you can figure out why configurator-pg is marked broken (and why postgrest is marked broken), and how to fix it.

@cdepillabout Sorry about the confusion, was using an outdated channel (I thought I updated it but needed sudo), updated the description with correct error output now. configurator-pg is not broken, but postgrest is, but I have hopes it will be fixed with a new version: https://github.com/PostgREST/postgrest/issues/2412

authors: AxelTLarsson cdepillabout


text:
newgrp in nix-shell gives "setgid: Operation not permitted"

Issue description
When using newgrp inside a nix-shell, the group change fails with "setgid: Operation not permitted".  newgrp outside of a nix shell works as expected. Also, changing to the current group inside a nix-shell succeeds. I've confirmed this is a problem on Nixos and Ubuntu using Nix. The issue occurs with our without the dash login flag to newgrp.
Steps to reproduce
nix-shell --pure -p shadow
newgrp - wheel # wheel is an example of one of a user's non-primary groups

log:
ryantm@home1 ~ (master)$ nixos-version
17.03pre94694.fa4167c (Gorilla)
ryantm@home1 ~ (master)$ nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion
warning: Nix search path entry ‘/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs’ does not exist, ignoring
"17.03pre95294.54a0e90"
ryantm@home1 ~ (master)$ whoami
ryantm
ryantm@home1 ~ (master)$ groups
users wheel networkmanager
ryantm@home1 ~ (master)$ nix-shell --pure -pshadow
error: getting status of ‘/home/ryantm/default.nix’: No such file or directory
ryantm@home1 ~ (master)$ nix-shell --pure -p shadow
warning: Nix search path entry ‘/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs’ does not exist, ignoring

[nix-shell:~]$ whoami
ryantm

[nix-shell:~]$ groups
users wheel networkmanager

[nix-shell:~]$ newgrp - wheel
setgid: Operation not permitted

[nix-shell:~]$ exit
ryantm@home1 ~ (master)$ newgrp - wheel
WARNING: bad ownership on /nix/var/nix/profiles/per-user/
WARNING: bad ownership on /nix/var/nix/gcroots/per-user/
ryantm@home1 ~ (master)$ echo $?
0
ryantm@home1 ~ (master)$ logout
ryantm@home1 ~ (master)$ nix-shell --pure -p shadow
warning: Nix search path entry ‘/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs’ does not exist, ignoring

[nix-shell:~]$ newgrp - wheel
setgid: Operation not permitted

[nix-shell:~]$ echo $?
1

strace:
ryantm@home1 ~ (master)$ nix-shell --pure -p shadow strace
[nix-shell:~]$ strace newgrp - wheel
execve("/nix/store/nzx36nwgdy04gwrlfqmrml0w2gh05vnh-shadow-4.2.1/bin/newgrp", ["newgrp", "-", "wheel"], [/* 47 vars */]) = 0
brk(NULL)                               = 0x857000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8fbffde000
access("/etc/ld-nix.so.preload", R_OK)  = -1 ENOENT (No such file or directory)
open("/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib/tls/x86_64/libcrypt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib/tls/x86_64", 0x7fff8705efb0) = -1 ENOENT (No such file or directory)
open("/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib/tls/libcrypt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib/tls", 0x7fff8705efb0) = -1 ENOENT (No such file or directory)
open("/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib/x86_64/libcrypt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib/x86_64", 0x7fff8705efb0) = -1 ENOENT (No such file or directory)
open("/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib/libcrypt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \v\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=57000, ...}) = 0
mmap(NULL, 2335072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8fbfb84000
mprotect(0x7f8fbfb90000, 2093056, PROT_NONE) = 0
mmap(0x7f8fbfd8f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0x7f8fbfd8f000
mmap(0x7f8fbfd91000, 184672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8fbfd91000
close(3)                                = 0
open("/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\4\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=1908040, ...}) = 0
mmap(NULL, 3791104, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8fbf7e6000
mprotect(0x7f8fbf97b000, 2093056, PROT_NONE) = 0
mmap(0x7f8fbfb7a000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x194000) = 0x7f8fbfb7a000
mmap(0x7f8fbfb80000, 14592, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8fbfb80000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8fbffdc000
arch_prctl(ARCH_SET_FS, 0x7f8fbffdc700) = 0
mprotect(0x7f8fbfb7a000, 16384, PROT_READ) = 0
mprotect(0x7f8fbfd8f000, 4096, PROT_READ) = 0
mprotect(0x607000, 4096, PROT_READ)     = 0
mprotect(0x7f8fbffe1000, 4096, PROT_READ) = 0
brk(NULL)                               = 0x857000
brk(0x878000)                           = 0x878000
getgid()                                = 100
open("/proc/self/loginuid", O_RDONLY)   = 3
read(3, "1000", 12)                     = 4
close(3)                                = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = 0
sendto(3, "\2\0\0\0\v\0\0\0\7\0\0\0passwd\0", 19, MSG_NOSIGNAL, NULL, 0) = 19
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=3, revents=POLLIN|POLLHUP}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="passwd\0", iov_len=7}, {iov_base="\310O\3\0\0\0\0\0", iov_len=8}], msg_iovlen=2, msg_control=[{cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[4]}], msg_controllen=20, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 15
mmap(NULL, 217032, PROT_READ, MAP_SHARED, 4, 0) = 0x7f8fbffa7000
close(4)                                = 0
close(3)                                = 0
getuid()                                = 1000
getgroups(16, [1, 57, 100])             = 3
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = 0
sendto(3, "\2\0\0\0\f\0\0\0\6\0\0\0group\0", 18, MSG_NOSIGNAL, NULL, 0) = 18
poll([{fd=3, events=POLLIN|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=3, revents=POLLIN|POLLHUP}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="group\0", iov_len=6}, {iov_base="\310O\3\0\0\0\0\0", iov_len=8}], msg_iovlen=2, msg_control=[{cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[4]}], msg_controllen=20, msg_flags=MSG_CMSG_CLOEXEC}, MSG_CMSG_CLOEXEC) = 14
mmap(NULL, 217032, PROT_READ, MAP_SHARED, 4, 0) = 0x7f8fbff72000
close(4)                                = 0
close(3)                                = 0
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=172, ...}) = 0
read(3, "passwd:    files \ngroup:     fil"..., 4096) = 172
read(3, "", 4096)                       = 0
close(3)                                = 0
open("/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/nix/store/hwbvmr4imiyi5ziq6v2snynr7zf022b5-glibc-2.24/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320 \0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0555, st_size=55912, ...}) = 0
mmap(NULL, 2168280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8fbf5d4000
mprotect(0x7f8fbf5de000, 2097152, PROT_NONE) = 0
mmap(0x7f8fbf7de000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7f8fbf7de000
mmap(0x7f8fbf7e0000, 21976, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8fbf7e0000
close(3)                                = 0
mprotect(0x7f8fbf7de000, 4096, PROT_READ) = 0
open("/etc/group", O_RDONLY|O_CLOEXEC)  = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=503, ...}) = 0
read(3, "root:x:0:\nwheel:x:1:ryantm\nkmem:"..., 4096) = 503
close(3)                                = 0
open("/etc/gshadow", O_RDONLY)          = -1 ENOENT (No such file or directory)
open("/etc/gshadow", O_RDONLY)          = -1 ENOENT (No such file or directory)
open("/etc/shadow", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)
getuid()                                = 1000
open("/etc/login.defs", O_RDONLY)       = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=404, ...}) = 0
read(3, "DEFAULT_HOME yes\n\nSYS_UID_MIN  4"..., 4096) = 404
read(3, "", 4096)                       = 0
close(3)                                = 0
setgid(1)                               = -1 EPERM (Operation not permitted)
dup(2)                                  = 3
fcntl(3, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
write(3, "setgid: Operation not permitted\n", 32setgid: Operation not permitted
) = 32
close(3)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++

More debugging info
The newgrp outside of the shell uses a setuid-wrapper
ryantm@home1 ~ (master)$ nix-shell --pure -p shadow libcap which --command "which newgrp"
warning: Nix search path entry ‘/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs’ does not exist, ignoring
/nix/store/nzx36nwgdy04gwrlfqmrml0w2gh05vnh-shadow-4.2.1/bin/newgrp
ryantm@home1 ~ (master)$ which newgrp
/var/setuid-wrappers/newgrp
ryantm@home1 ~ (master)$

The capabilities look the same:
ryantm@home1 ~ (master)$ capsh --print
Current: =
Bounding set =cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_\
chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit\
_read
Securebits: 00/0x0/1'b0
 secure-noroot: no (unlocked)
 secure-no-suid-fixup: no (unlocked)
 secure-keep-caps: no (unlocked)
uid=1000(ryantm)
gid=100(users)
groups=1(wheel),57(networkmanager),100(users)
ryantm@home1 ~ (master)$ nix-shell --pure -p shadow libcap which --command "capsh --print"
warning: Nix search path entry ‘/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs’ does not exist, ignoring
Current: =
Bounding set =cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_\
chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit\
_read
Securebits: 00/0x0/1'b0
 secure-noroot: no (unlocked)
 secure-no-suid-fixup: no (unlocked)
 secure-keep-caps: no (unlocked)
uid=1000(ryantm)
gid=100(users)
groups=1(wheel),57(networkmanager),100(users)

Yes, that seems expected to not to work. newgrp seems to need setuid, and setuid binaries cannot exist in the store; the setuid wrapper indirection must be used.

That's unfortunate, because newgrp seems like a good way to change a user's primary group temporarily, so the files and folders they create have the correct group.

You can call /var/setuid-wrappers/newgrp explicitly.

@vcunat That works on Nixos, but not other operating systems.

On other systems there's typically /usr/bin/newgrp ;-)

Related issue: https://github.com/NixOS/nix/issues/1037
I think there needs to be better ergonomics with regards to developing applications that make use of setuid programs inside a nix-shell.

@vcunat Is that now /run/wrappers/bin/ now?

Yes, apparently, but generally one should try to avoid hardcoding such paths.

@vcunat That still doesn't work because it this error:
The value for the SHELL variable was not found the /etc/shells file

This incident has been reported

Is there some sort of change to /etc/shells needed inside a nix-shell.

Are there any updates on this issue, please?

I confirmed this is still an issue with the latest nixpkgs master and nix version 2.2.2.

still important to me

authors: CMCDragonkai dezgeg hab25 mmahut ryantm vcunat


text:
nixos-generate-config suggest invalid Nix

Describe the bug
nixos-generate-config generates the following commented out invalid syntax:
  # Configure keymap in X11
  # services.xserver.layout = "us";
  # services.xserver.xkbOptions = {
  #   "eurosign:e";
  #   "caps:escape" # map caps to escape.
  # };

Perhaps = [ ... ] was intended?
Steps To Reproduce
Steps to reproduce the behavior:

nixos-generate-config
View configuration.nix

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

system: "x86_64-linux"
host os: Linux 5.15.102, NixOS, 22.11 (Raccoon), 22.11.3184.9b8e5abb183
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.11.1
channels(root): "nixos-22.11.3184.9b8e5abb183"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Nice catch!
xkbOptions requires a comma separated string.
I submitted a PR which will fix this issue.

authors: paumr schuelermine


text:
adguardhome bind_port has no effect

Describe the bug
services.adguardhome = {
      enable = true;
      openFirewall = true;
      settings = {
        bind_port = 7777;
        schema_version = 20;
      };
    };

and
networking = {
        hostName = "yoshinon";
        networkmanager.enable = true;
        firewall = {
          allowedTCPPorts = [ 7777 ];
          allowedUDPPorts = [ 53 ];
      };
    };

Result:
wget 127.0.0.1:7777
--2024-01-04 03:29:56--  http://127.0.0.1:7777/
Connecting to 127.0.0.1:7777... failed: Connection refused.

but!
wget 127.0.0.1:3000
--2024-01-04 03:29:59--  http://127.0.0.1:3000/
Connecting to 127.0.0.1:3000... connected.

AdGuard page open on 3000 port
Expected behavior
I expect that adguard will open on the port I specified
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.69, NixOS, 23.11 (Tapir), 23.11.2217.d02d818f22c7`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

cc @StillerHarpo @CRTified

@aquinary They changed the option to http.address since v0.107.36  (see https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#configuration-file)
This should work
services.adguardhome = {
      enable = true;
      openFirewall = true;
      settings = {
        bind_port = 7777;
        http.address = "0.0.0.0:7777";
        schema_version = 20;
      };
    };

You still have to set bind_port for openFirewall to work (we should fix that). allowedTCPPorts and allowedUDPPorts shouldn't be neccessary

There is already a pull request which will fix this https://github.com/NixOS/nixpkgs/pull/266450

@aquinary They changed the option to http.address since v0.107.36 (see https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#configuration-file)
This should work
services.adguardhome = {
  enable = true;
  openFirewall = true;
  settings = {
    bind_port = 7777;
    http.address = "0.0.0.0:7777";
    schema_version = 20;
  };
};

I can confirm that it works!
Thanks for this solution, it will allow me to wait for the PR :)

Thx!

authors: StillerHarpo aquinary badele dotlambda


text:
Build failure: python312Packages.pynvml 11.5.0

Steps To Reproduce
Steps to reproduce the behavior:

Build python312Packages.pynvml

Build log
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/6jpp5rzkq6dyl6jbxalfpxawv4magrqs-python3.12-pynvml-11.5.0.drv^*'
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/l0cgnizcxf4k6b5r3blvw4fjywmal9mg-pynvml-11.5.0.tar.gz
source root is pynvml-11.5.0
setting SOURCE_DATE_EPOCH to timestamp 1676432198 of file pynvml-11.5.0/pynvml/_version.py
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
applying patch /nix/store/r9ddrnj2x0rfgic1myrvfxcp845nw6f1-0001-locate-libnvidia-ml.so.1-on-NixOS.patch
patching file pynvml/nvml.py
Hunk #1 succeeded at 1795 (offset 320 lines).
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
Executing setuptoolsBuildPhase
/build/pynvml-11.5.0/versioneer.py:421: SyntaxWarning: invalid escape sequence '\s'
  LONG_VERSION_PY['git'] = '''
Traceback (most recent call last):
  File "/build/pynvml-11.5.0/nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 20, in <module>
    version=versioneer.get_version(),
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/build/pynvml-11.5.0/versioneer.py", line 1480, in get_version
    return get_versions()["version"]
           ^^^^^^^^^^^^^^
  File "/build/pynvml-11.5.0/versioneer.py", line 1412, in get_versions
    cfg = get_config_from_root(root)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/build/pynvml-11.5.0/versioneer.py", line 342, in get_config_from_root
    parser = configparser.SafeConfigParser()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
/nix/store/3qnm3nwjajgqa771dmi2dnwxrw0kzq5m-stdenv-linux/setup: line 1578: pop_var_context: head of shell_variables not a function context

Additional context
python311Packages.pynvml builds fine by itself.
This package is central to anyone using CUDA 12 (i.e. pretty much any ML projects).
Notify maintainers
@bcdarwin
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.18, NixOS, 24.05 (Uakari), 24.05.20240229.1536926`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.05"`
 - channels(sec): `""`
 - nixpkgs: `/nix/store/lwyjz70qh12nq6cb7fixl85vryzxqm3c-source

Add a :+1: reaction to issues you find important.

I'll try to find time to look into this at some point relatively soon, but note that machine learning using 3.12 is probably not generally feasible in Nixpkgs yet (e.g. not all torch dependencies build).

No worries. I was reporting it as it shows up in nixos-review

I'll try to find time to look into this at some point relatively soon, but note that machine learning using 3.12 is probably not generally feasible in Nixpkgs yet (e.g. not all torch dependencies build).

That might be true. I am a user who cannot build nvitop on a recent CUDA 12.4 system. There aren't any other dependencies, that's a tool like nvtop or nvidia-smi, to see the load of a GPU. Thanks for investing the time and effort to make it work. CUDA 12.4 is being rolled out to cloud providers.

@bcdarwin this came up again as part of the Zero Hydra Failures campaign. See #309533

Fixed some time AGO.

authors: Wolfsauge bcdarwin sarahec


text:
nixos-container terminate doesn't terminate systemd in container, container hangs

When run nixos-container terminate on my container, the container doesn't shut down properly.
It hangs with the following processes:
● container@container--0.service - Container 'container--0'
   Loaded: loaded (/nix/store/a5jrx6k6npg3kzw38xzy6axbwbalf65l-unit-container-.service/container@.service; linked; vendor preset: enabled)
   Active: deactivating (stop-sigterm) since Sun 2017-12-10 22:39:10 UTC; 35s ago
  Process: 26013 ExecStop=/nix/store/2gvqfz4hwvdii722738sxk5az9f59s0a-unit-script/bin/container@-pre-stop (code=exited, status=0/SUCCESS)
 Main PID: 16886 (systemd-nspawn)
   Status: "Container running: Startup finished in 1.158s."
    Tasks: 3 (limit: 4915)
   CGroup: /system.slice/system-container.slice/container@container--0.service
           ├─16886 /nix/store/cd2r3b7j655vfdnvfwci71dn4yyaxa0p-systemd-234/bin/systemd-nspawn --keep-unit -M container--0 -D /var/lib/containers/container--0 --network-veth --notify-ready=yes --bind-ro=/nix/store --
           ├─16911 systemd
           └─18047 /nix/store/cd2r3b7j655vfdnvfwci71dn4yyaxa0p-systemd-234/lib/systemd/systemd-journald

See how there are only systemd, systemd-nspawn and systemd-journald left in the container, so I suspect it's a problem with what nixos-container does, as opposed to what I do in my container.

After 90 seconds, systemd kills the container with a SIGKILL, so that way the hang is eventually resolved.
This is what the log of systemctl status container@container--0.service looks like:
Dec 10 22:39:10 corp1 systemd[1]: Stopping Container 'container--0'...
Dec 10 22:39:10 corp1 container container--0[16886]: container-node-3 login: [  OK  ] Stopped target Timers.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped Daily Cleanup of Temporary Directories.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped target Multi-User System.
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping Journalbeat log shipper...
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Removed slice system-getty.slice.
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping glusterVolumeRunningCheckWatchdog.service...
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped target Host and Network Name Lookups.
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping stolon-keeper.service...
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping Nginx Web Server...
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping etcd key-value store...
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping D-Bus System Message Bus...
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped target Swap.
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping Gluster Events Notifier...
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping consul.service...
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping Login Service...
Dec 10 22:39:10 corp1 container container--0[16886]:          Unmounting /nix/var/nix/daemon-socket...
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped target Login Prompts.
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping Console Getty...
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping GlusterFS, a clustered file-system server...
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping filebeat log shipper...
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping SSH Daemon...
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping Dnsmasq Daemon...
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping stolon-sentinel.service...
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped D-Bus System Message Bus.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped SSH Daemon.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped Console Getty.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped Gluster Events Notifier.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped stolon-sentinel.service.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped Login Service.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped glusterVolumeRunningCheckWatchdog.service.
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping Permit User Sessions...
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped GlusterFS, a clustered file-system server.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped Permit User Sessions.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped target User and Group Name Lookups.
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping Name Service Cache Daemon...
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped target Remote File Systems.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped Name Service Cache Daemon.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped Dnsmasq Daemon.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped Nginx Web Server.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Unmounted /nix/var/nix/daemon-socket.
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping stolon-proxy.service...
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping nginxAfterGlusterfs.service...
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped Create Volatile Files and Directories.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped stolon-proxy.service.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped nginxAfterGlusterfs.service.
Dec 10 22:39:10 corp1 container container--0[16886]:          Unmounting /var/custom/files...
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Unmounted /var/custom/files.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped target Network is Online.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped filebeat log shipper.
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped Journalbeat log shipper.
Dec 10 22:39:10 corp1 container container--0[16886]:          Stopping beatsAfterTinc.service...
Dec 10 22:39:10 corp1 container container--0[16886]: [  OK  ] Stopped beatsAfterTinc.service.
Dec 10 22:40:40 corp1 systemd[1]: container@container--0.service: State 'stop-sigterm' timed out. Killing.
Dec 10 22:40:40 corp1 systemd[1]: container@container--0.service: Killing process 16886 (systemd-nspawn) with signal SIGKILL.
Dec 10 22:40:40 corp1 systemd[1]: container@container--0.service: Killing process 16911 (systemd) with signal SIGKILL.
Dec 10 22:40:40 corp1 systemd[1]: container@container--0.service: Killing process 18047 (systemd-journal) with signal SIGKILL.
Dec 10 22:40:40 corp1 systemd[1]: container@container--0.service: Main process exited, code=killed, status=9/KILL
Dec 10 22:40:40 corp1 systemd[1]: container@container--0.service: Killing process 18047 (systemd-journal) with signal SIGKILL.
Dec 10 22:40:40 corp1 systemd[1]: Stopped Container 'container--0'.
Dec 10 22:40:40 corp1 systemd[1]: container@container--0.service: Unit entered failed state.
Dec 10 22:40:40 corp1 systemd[1]: container@container--0.service: Failed with result 'timeout'.

I further found that when I run kill -RTMIN+4 $PID_OF_SYSTEMD_IN_CONTAINER directly myself, the container shuts down perfectly fine.
But when I first nixos-continer destroy it, and then send the systemd in it a kill -RTMIN+4, it doesn't shut down as expected.
So nixos-container destroy myst be doing something that puts systemd in a state where it no longer cares about the RTMIN+4 signal.
This is the strace -ftt of that systemd process inside the container when it's hung (the blank space is when I sent the signal that it ignores):
1512947647.362697 epoll_wait(4,

[{EPOLLIN, {u32=2536246592, u64=94066614996288}}], 10, -1) = 1
1512947660.802490 clock_gettime(CLOCK_BOOTTIME, {tv_sec=181618, tv_nsec=995880215}) = 0
1512947660.802631 getpid()              = 1
1512947660.802754 read(5, "&\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 128) = 128
1512947660.802914 sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="PRIORITY=6\nSYSLOG_FACILITY=3\nCOD"..., iov_len=126}, {iov_base="MESSAGE=", iov_len=8}, {iov_base="Received SIGRTMIN+4.", iov_len=20}, {iov_base="\n", iov_len=1}], msg_iovlen=4, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 155
1512947660.803170 open("/run/systemd/transient/poweroff.target", O_RDONLY|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)
1512947660.803323 open("/etc/systemd/system/poweroff.target", O_RDONLY|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)
1512947660.803400 open("/run/systemd/system/poweroff.target", O_RDONLY|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)
1512947660.803465 open("/run/systemd/generator/poweroff.target", O_RDONLY|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)
1512947660.803553 sendmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="PRIORITY=3\nSYSLOG_FACILITY=3\nCOD"..., iov_len=130}, {iov_base="MESSAGE=", iov_len=8}, {iov_base="Failed to enqueue poweroff.targe"..., iov_len=70}, {iov_base="\n", iov_len=1}], msg_iovlen=4, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 209
1512947660.803645 read(5, 0x7ffc92161770, 128) = -1 EAGAIN (Resource temporarily unavailable)
1512947660.803743 getpid()              = 1
1512947660.803804 getpid()              = 1
1512947660.803866 getpid()              = 1
1512947660.803944 epoll_wait(4,

Also I haven't said that yet: machinectl terminate immediately shuts down the machine correctly. It's likely something in nixos-container destroy that's not doing the right thing.
I've re-run the strace with -s 3000 to get more output:
1512948159.715451 epoll_wait(4,

[{EPOLLIN, {u32=1576541504, u64=94009820716352}}], 10, -1) = 1
1512948162.570648 clock_gettime(CLOCK_BOOTTIME, {tv_sec=182120, tv_nsec=764014164}) = 0
1512948162.570745 getpid()              = 1
1512948162.570826 read(5, "&\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 128) = 128
1512948162.570862 sendmsg(12, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="PRIORITY=6\nSYSLOG_FACILITY=3\nCODE_FILE=src/basic/log.c\nCODE_LINE=1151\nCODE_FUNC=log_received_signal\nSYSLOG_IDENTIFIER=systemd\n", iov_len=126}, {iov_base="MESSAGE=", iov_len=8}, {iov_base="Received SIGRTMIN+4.", iov_len=20}, {iov_base="\n", iov_len=1}], msg_iovlen=4, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 155
1512948162.570909 open("/run/systemd/transient/poweroff.target", O_RDONLY|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)
1512948162.570937 open("/etc/systemd/system/poweroff.target", O_RDONLY|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)
1512948162.570955 open("/run/systemd/system/poweroff.target", O_RDONLY|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)
1512948162.570973 open("/run/systemd/generator/poweroff.target", O_RDONLY|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC) = -1 ENOENT (No such file or directory)
1512948162.570998 sendmsg(12, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="PRIORITY=3\nSYSLOG_FACILITY=3\nCODE_FILE=src/core/manager.c\nCODE_LINE=1933\nCODE_FUNC=manager_start_target\nSYSLOG_IDENTIFIER=systemd\n", iov_len=130}, {iov_base="MESSAGE=", iov_len=8}, {iov_base="Failed to enqueue poweroff.target job: Unit poweroff.target not found.", iov_len=70}, {iov_base="\n", iov_len=1}], msg_iovlen=4, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 209
1512948162.571022 read(5, 0x7ffe1f81f740, 128) = -1 EAGAIN (Resource temporarily unavailable)
1512948162.571047 getpid()              = 1
1512948162.571061 getpid()              = 1
1512948162.571073 getpid()              = 1
1512948162.571084 epoll_wait(4,

This seems to reveal the error: Failed to enqueue poweroff.target job: Unit poweroff.target not found.
For those not familiar with systemd signals: SIGRTMIN+4, which nixos-containers is sending, triggers the poweroff.target.
But it seems like this target file does not exist in my container at the 4 locations it's trying to find it at, so probably systemd just does nothing when it can't find that file.

But it seems like this target file does not exist in my container

Ah, interesting. While the container is running, the file does exist here:
# ls -lah /etc/systemd/system/poweroff.target
lrwxrwxrwx 1 root root 94 Jan  1  1970 /etc/systemd/system/poweroff.target -> /nix/store/cd2r3b7j655vfdnvfwci71dn4yyaxa0p-systemd-234/example/systemd/system/poweroff.target

Maybe /nix/store in the container gets unmounted too early in the shutdown sequence, before systemd has the chance to read this file?

OK, I think I've got the reason. In
https://github.com/NixOS/nixpkgs/blob/4d0875a56ef012fbd26095feda89438ea812e01a/pkgs/tools/virtualization/nixos-container/nixos-container.pl#L265-L276
it calls terminateContainer (which does machinectl terminate, which runs asynchronously and immediately returns), and then we immediately delete the $profileDir, $gcRootsDir, $root and the $confFile.
Probably poweroff.target lives in $root, so we delete it here before systemd actually gets the chance to come by there.
This is supported by the observation that when I put a sleep(5); after the terminateContainer line, everything works fine.
So I think the solution is the same as the solution to #32545 should be: Make terminateContainer block until the container is actually gone. Only after that delete the container's root. For an example of how to poll for the container being down, see here.
Now we just have to bring that to perl 😱

I guess this can be closed as the PR fixing this has been merged,


text:
Nice-dcv-client fails

Describe the bug

First time reporting a bug here so let me know if I missed anything:
I tried to install nice-dcv-client and it fails with "error: auto-patchelf could not satisfy dependency libcrypto.so.1.1"
Steps To Reproduce
Steps to reproduce the behavior:

nix-shell -p nice-dcv-client

Expected behavior

Install nice-dcv-client
Additional context

It fails on both 24.05 and 24.11.
Metadata

host os: Linux 6.6.52, NixOS, 24.05 (Uakari), 24.05.6850.7e1ca67996af
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.18.8
channels(root): "nixos-24.05"
nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos

Notify maintainers

@rmcgibbo
@jtojnar

Note for maintainers: Please tag this issue in your PR.

Add a :+1: reaction to issues you find important.

I've replaced openssl with openssl_1_1 and that fixes my openssl error but the libcrypto still remains. Should the package be using libxcrypt instead?
I don't know much about nix packaging so how would I ln -s openssl_1_1's libcrypt.so during the installation?