[nix] Cleanup nix derivation for static builds

Similar PR will go for crun/conmon/libpod/cri-o/etc, too.
Here I skip the btrfs and lvm2 support for static binary, because:

btrfs will not support in CentOS 8
With skopeo experience both btrfs and lvm2 are not easy for compile as static binary

Also see:

~~https://github.com/containers/crun/pull/372~~
~~https://github.com/containers/conmon/pull/161~~
https://github.com/containers/skopeo/pull/932
https://github.com/containers/buildah/pull/2380
https://github.com/containers/libpod/pull/6402
https://github.com/cri-o/cri-o/pull/3804

Static binaries:

crun-0.13-linux-amd64
conmon-v2.0.17-linux-amd64
skopeo-v1.0.0-linux-amd64
buildah-v1.14.9-linux-amd64
podman-v1.9.3-linux-amd64
cri-o-v1.17.4-linux-amd64.tar.gz
cri-o-v1.18.1-linux-amd64.tar.gz

Ansible Roles:

https://github.com/alvistack/ansible-role-crun
https://github.com/alvistack/ansible-role-conmon
https://github.com/alvistack/ansible-role-skopeo
https://github.com/alvistack/ansible-role-buildah
https://github.com/alvistack/ansible-role-podman
https://github.com/alvistack/ansible-role-cri_o

Fixes #5774

@saschagrunert PTAL
Since we don't really know much about .nix static builds, I will rely on you guys to get this working.

@saschagrunert if I apply make nixpkgs to update the nix/nixpkgs.json, e.g. as below:
diff --git a/nix/nixpkgs.json b/nix/nixpkgs.json
index fbc774373..84df2d61e 100644
--- a/nix/nixpkgs.json
+++ b/nix/nixpkgs.json
@@ -1,8 +1,9 @@
 {
   "url": "https://github.com/nixos/nixpkgs",
-  "rev": "a08d4f605bca62c282ce9955d5ddf7d824e89809",
-  "date": "2020-03-20T10:10:15+01:00",
-  "sha256": "1bniq08dlmrmrz4aga1cj0d7rqbaq9xapm5ar15wdv2c6431z2m8",
+  "rev": "1b5925f2189dc9b4ebf7168252bf89a94b7405ba",
+  "date": "2020-05-27T15:03:28+02:00",
+  "path": "/nix/store/qdsrj7hw9wzzng9l2kfbsyi9ynprrn6p-nixpkgs",
+  "sha256": "0q9plknr294k4bjfqvgvp5vglfby5yn64k6ml0gqwi0dwf0qi6fv",
   "fetchSubmodules": false,
   "deepClone": false,
   "leaveDotGit": false

After nix build -f nix/ the result binary always become v1.9.3...
$ ./result/bin/podman --version
podman version 1.9.3

Should that due to upstream nixpkgs template being updated? I manually trace the changes for podman/default.nix (https://github.com/NixOS/nixpkgs/commits/master/pkgs/applications/virtualization/podman/default.nix) but have no idea...

@saschagrunert if I apply make nixpkgs to update the nix/nixpkgs.json, e.g. as below (ok I copy that from crun/conmon):

If we update the nixpkgs here then we also have to ensure that the remote container image (for CI purposes) on quay.io is up-to-date. See
https://github.com/containers/libpod/blob/adca437d03bc74edcf3ef9b60ea55360157f893c/Makefile#L227-L232

If we update the nixpkgs here then we also have to ensure that the remote container image (for CI purposes) on quay.io is up-to-date. See
https://github.com/containers/libpod/blob/adca437d03bc74edcf3ef9b60ea55360157f893c/Makefile#L227-L232

Therefore too much dependency and looks like overkill for this PR, let's try again for that later ;-)

Ah I think we still have to update the image to get the CI happy :)

Oh dear @saschagrunert please share me some hints O_O||

@hswong3i can you set NIX_IMAGE ?= quay.io/podman/nix-podman:1.1.0 and run make nix-image to verify it works?
https://github.com/containers/libpod/blob/adca437d03bc74edcf3ef9b60ea55360157f893c/Makefile#L227-L232
Can someone invite me to https://quay.io/organization/podman? I think @TomSweeneyRedHat helped me the last time pushing the image to the right location. :innocent:

@hswong3i can you set NIX_IMAGE ?= quay.io/podman/nix-podman:1.1.0 and run make nix-image to verify it works?
https://github.com/containers/libpod/blob/adca437d03bc74edcf3ef9b60ea55360157f893c/Makefile#L227-L232
Can someone invite me to https://quay.io/organization/podman? I think @TomSweeneyRedHat helped me the last time pushing the image to the right location. innocent

OK make nix-image successful:
checking for references to /tmp/nix-build-podman-static.drv-0/ in /nix/store/61qm573j28xriipwrhpy1wc6g4zwrq2c-podman-static-man...
/nix/store/xzj9mvy3c2h1p8sy0cb66100qy477jvf-podman-static-bin
Removing intermediate container 895f98181f35
 ---> c03a360a150c
Step 6/7 : WORKDIR /
 ---> Running in b263d2989d13
Removing intermediate container b263d2989d13
 ---> b2d4f64185d5
Step 7/7 : RUN rm -rf work
 ---> Running in 0955495ae273
Removing intermediate container 0955495ae273
 ---> 55ef9814af04
Successfully built 55ef9814af04
Successfully tagged quay.io/podman/nix-podman:1.1.0

hswong3i@hswong3i-XPS-13-7390:~/Documents/alvistack/_fork/libpod$ docker image list quay.io/podman/nix-podman
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
quay.io/podman/nix-podman   1.1.0               55ef9814af04        19 seconds ago      2.38GB

Compile now successful: https://github.com/alvistack/libpod/releases/download/v1.9.3/podman-v1.9.3-linux-amd64
$ ls -lah ./podman-v1.9.3-linux-amd64
-r-xr-xr-x 1 hswong3i hswong3i 44M May 31 11:38 ./podman-v1.9.3-linux-amd64

$ ldd ./podman-v1.9.3-linux-amd64
    not a dynamic executable

$ file ./podman-v1.9.3-linux-amd64
./podman-v1.9.3-linux-amd64: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, Go BuildID=8aoQlir-hnIlUFgPjNpP/HSxtS1j80TAJXsk5b3Ly/BQf_LNRIsfb5jKfcQMNO/YygPNHhAHpdqlPmgvpOs, stripped

$ sudo ./podman-v1.9.3-linux-amd64 --version
podman-v1.9.3-linux-amd64 version 1.9.3

Static binaries:

crun-0.13-linux-amd64
conmon-v2.0.17-linux-amd64
skopeo-v1.0.0-linux-amd64
buildah-v1.14.9-linux-amd64
podman-v1.9.3-linux-amd64
cri-o-v1.17.4-linux-amd64.tar.gz
cri-o-v1.18.1-linux-amd64.tar.gz

Therefore could focus on CI/CD fixes ;-)

@rhatdan No changes required since https://github.com/containers/libpod/pull/6402#issuecomment-642234551, just rebase with master and updated with make nixpkgs, result with:
$ ldd ./result/bin/podman
	not a dynamic executable

$ file ./result/bin/podman
./result/bin/podman: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, Go BuildID=tIR_apEKntIrKbN1k27R/cmADc2sDkbNQPNFfReYn/janG-kpvvfHLqowrTGeP/V8RMUtiR0ZH3UeFHkzAP, stripped

$ ls -lah ./result/bin/podman
-r-xr-xr-x 1 hswong3i hswong3i 41M Jan  1  1970 ./result/bin/podman

$ ./result/bin/podman --version
podman version 2.0.0-dev

P.S. I found that previous test failed due to timeout but without error message? Let's debug test again with recent force push?

@hswong3i Tests are failing?

@rhatdan @saschagrunert I could do the timeout static_build (https://github.com/containers/libpod/pull/6402/checks?check_run_id=787704367) locally. Any hints for debugging this?

@ rhatdan update test for static binary.
BTW, still WIP for improving the static binary test case. Will update again soon.

@ rhatdan finally static build working, CI updated and working, also synchronize coding style between crun/conmon/skopeo/buildah/podman.

@rhatdan finally static build working, CI updated and working, also synchronize coding style between crun/conmon/skopeo/buildah/podman.

/approve

@saschagrunert PTAL

/retest

@giuseppe Finally all CI passed, e.g. https://github.com/containers/podman/pull/6402/checks?check_run_id=852867371 ;-)

/lgtm

Now that crun/conmon/skopeo/buildah/podman are statically built (and available on https://github.com/alvistack/ repositories)..
Is there any guide on how to "manually install" a full static binary podman distribution?
Something like:

Placing (or linking) downloaded binaries in the right directory (/usr/bin, /usr/local/bin, $HOME/.local/bin, ...)
Setting up configuration files (containers.conf, storage.conf, registries.conf, auth.conf, ...) and placing them in the right directory (/etc/containers, $HOME/.config/containers, ...)

My objetive here is to maually install and configure a root-less podman as I already install and configure docker making the process as less "invasive" for the system as I can.

Rootless podman, you should just need to install the executable in your homedir, but you will need other programs like fuse-overlayfs and crun or runc installed.
Finally you would probably want registries.conf in your home dir under ~/.config/containers/registries.conf
I have never tried this, but I believe this will work.  Try it and document what you find.

@rhatdan First of all, thank you for your comment.
I've created the ~/.config/containers/registries.conf file (with only docker.io registry)
[registries.search]
registries = ['docker.io']

[registries.insecure]
registries = []

[registries.block]
registries = []

I've runc already installed in my Ubuntu 20.04.1 (but would like to use the static compilled crun available on https://github.com/alvistack/)
$ runc --version
runc version 1.0.0-rc10
commit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
spec: 1.0.1-dev

But, more things are needed (and looks like can't be placed on ~/.local/bin)...
./podman-v2.1.0-linux-amd64 run hello-world
Error: could not find a working conmon binary (configured options: [/usr/libexec/podman/conmon /usr/local/libexec/podman/conmon /usr/local/lib/podman/conmon /usr/bin/conmon /usr/sbin/conmon /usr/local/bin/conmon /usr/local/sbin/conmon /run/current-system/sw/bin/conmon]): invalid argument

Then I tried with
sudo ln -s $PWD/conmon-v2.0.21-linux-amd64 /usr/local/bin/conmon

But now If I run again
./podman-v2.1.0-linux-amd64 run hello-world

The process stalls (never ends) and nothing happens... but I can see that two podman processes are running...
$ ps -af
UID          PID    PPID  C STIME TTY          TIME CMD
root        1007    1005  0 07:16 tty1     00:00:01 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/125/gdm/Xauthority -background none -noreset -keeptty -verbose 3
gdm         1733    1005  0 07:16 tty1     00:00:00 /usr/libexec/gnome-session-binary --systemd --autostart /usr/share/gdm/greeter/autostart
root        3501    3499  6 07:16 tty2     00:37:03 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
rubensa     3856    3499  0 07:16 tty2     00:00:00 /usr/libexec/gnome-session-binary --systemd --systemd --session=ubuntu
rubensa     5429    4940  0 07:16 pts/0    00:00:00 /bin/bash -l
rubensa     5432    4896  0 07:16 pts/0    00:00:00 /bin/bash -l
rubensa   215334  160869  0 17:23 pts/0    00:00:00 ./podman-v2.1.0-linux-amd64 run hello-world
rubensa   215347  215334  0 17:23 pts/0    00:00:00 ./podman-v2.1.0-linux-amd64 run hello-world
rubensa   217138  210646  0 17:29 pts/1    00:00:00 ps -af

And nothing is created under ~.config/containers

I think a static bundle like we provide it in CRI-O would make sense. Just untar, make install and you’re good to go.

With the previous commands I noticed that bolt_state.db was created under ~/.local/share/containers/storage/libpod
To try a bit more, I downloaded static binaries for fuse-overlayfs-x86_64-1.1.2.  Can I create a storage.conf file under ~/.config/containers/ to specify mount_program = "/path/to/fuse-overlayfs-x86_64-1.1.2" and expect this to be used?

Umm...  looks like it is used...  but now I have to see how I can configure this...
$ ./podman-v2.1.0-linux-amd64 run hello-world
ERRO[0000] User-selected graph driver "overlay" overwritten by graph driver "vfs" from database - delete libpod local files to resolve

Tried with a new containers.conf under ~/.config/containers/ with
runtime = "/path/to/crun-0.14.1-linux-amd64"

but same error message as before...
If I remove from storage.conf the following lines (keeping only storage.options section)
[storage]
  driver = "overlay"

again the process (hello-world) is stuck and nothing happens.

Don't put anything in ~/.local/share/containers. Podman will create this content on first run.
Podman searches for fuse-overlayfs and if it finds it will setup overlayfs. If it is in the users executable path it should get added.
In github.com/containers/storage
./utils.go:	if path, err := exec.LookPath("fuse-overlayfs"); err == nil {
Then Podman will take care of everything else.
You could precreate the storage.conf

containers.conf pointing at crun would work also.

@rhatdan Thanks for the info.
I didn't created anything under  ~/.local/share/containers.  As you say, the folder was created with an storage/libpod/bolt_state.db file on it.
I tried again like this:
$ sudo ln -s /software/podman-v2.1.0-linux-amd64 /usr/local/bin/podman
$ sudo ln -s /software/fuse-overlayfs-x86_64-1.1.2 /usr/local/bin/fuse-overlayfs
$ sudo ln -s /software/crun-0.14.1-linux-amd64 /usr/local/bin/crun
$ sudo ln -s /software/conmon-v2.0.21-linux-amd64 /usr/local/bin/conmon

With ~/.config/containers/containers.conf
runtime = "crun"

~/.config/containers/registries.conf
[registries.search]
registries = ['docker.io']

[registries.insecure]
registries = []

[registries.block]
registries = []

~/.config/containers/storage.conf
[storage.options]
  mount_program = "fuse-overlayfs"

Running
$ podman run hello-world

The cursor keeps blinking and nothing happens...
Is there any way to debug what is happening in the stalled process?
  11841 pts/1    Ss     0:00 bash
  12179 pts/1    Sl+    0:00 podman run hello-world
  12191 pts/1    S+     0:00 podman run hello-world

Found the flag to debug...
$ podman run --log-level=debug hello-world
INFO[0000] podman filtering at log level debug
DEBU[0000] Called run.PersistentPreRunE(podman run --log-level=debug hello-world)
DEBU[0000] Reading configuration file "/home/rubensa/.config/containers/containers.conf"
DEBU[0000] Merged system config "/home/rubensa/.config/containers/containers.conf": &{Containers:{Devices:[] Volumes:[] ApparmorProfile:containers-default-0.22.0 Annotations:[] CgroupNS:host Cgroups:enabled DefaultCapabilities:[CAP_AUDIT_WRITE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_KILL CAP_MKNOD CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETFCAP CAP_SETGID CAP_SETPCAP CAP_SETUID CAP_SYS_CHROOT] DefaultSysctls:[] DefaultUlimits:[] DefaultMountsFile: DNSServers:[] DNSOptions:[] DNSSearches:[] EnableLabeling:false Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm] EnvHost:false HTTPProxy:false Init:false InitPath: IPCNS:private LogDriver:k8s-file LogSizeMax:-1 NetNS:slirp4netns NoHosts:false PidsLimit:2048 PidNS:private SeccompProfile:/usr/share/containers/seccomp.json ShmSize:65536k TZ: Umask:0022 UTSNS:private UserNS:host UserNSSize:65536} Engine:{CgroupCheck:false CgroupManager:cgroupfs ConmonEnvVars:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin] ConmonPath:[/usr/libexec/podman/conmon /usr/local/libexec/podman/conmon /usr/local/lib/podman/conmon /usr/bin/conmon /usr/sbin/conmon /usr/local/bin/conmon /usr/local/sbin/conmon /run/current-system/sw/bin/conmon] DetachKeys:ctrl-p,ctrl-q EnablePortReservation:true Env:[] EventsLogFilePath:/run/user/1000/libpod/tmp/events/events.log EventsLogger:file HooksDir:[/usr/share/containers/oci/hooks.d] ImageDefaultTransport:docker:// InfraCommand:/pause InfraImage:k8s.gcr.io/pause:3.2 InitPath:/usr/libexec/podman/catatonit LockType:shm MultiImageArchive:false Namespace: NetworkCmdPath: NoPivotRoot:false NumLocks:2048 OCIRuntime:runc OCIRuntimes:map[crun:[/usr/bin/crun /usr/sbin/crun /usr/local/bin/crun /usr/local/sbin/crun /sbin/crun /bin/crun /run/current-system/sw/bin/crun] kata:[/usr/bin/kata-runtime /usr/sbin/kata-runtime /usr/local/bin/kata-runtime /usr/local/sbin/kata-runtime /sbin/kata-runtime /bin/kata-runtime /usr/bin/kata-qemu /usr/bin/kata-fc] runc:[/usr/bin/runc /usr/sbin/runc /usr/local/bin/runc /usr/local/sbin/runc /sbin/runc /bin/runc /usr/lib/cri-o-runc/sbin/runc /run/current-system/sw/bin/runc]] PullPolicy:missing Remote:false RemoteURI: RemoteIdentity: ActiveService: ServiceDestinations:map[] RuntimePath:[] RuntimeSupportsJSON:[crun runc] RuntimeSupportsNoCgroups:[crun] RuntimeSupportsKVM:[kata kata-runtime kata-qemu kata-fc] SetOptions:{StorageConfigRunRootSet:false StorageConfigGraphRootSet:false StorageConfigGraphDriverNameSet:false StaticDirSet:false VolumePathSet:false TmpDirSet:false} SignaturePolicyPath:/home/rubensa/.config/containers/policy.json SDNotify:false StateType:3 StaticDir:/home/rubensa/.local/share/containers/storage/libpod StopTimeout:10 TmpDir:/run/user/1000/libpod/tmp VolumePath:/home/rubensa/.local/share/containers/storage/volumes} Network:{CNIPluginDirs:[/usr/libexec/cni /usr/lib/cni /usr/local/lib/cni /opt/cni/bin] DefaultNetwork:podman NetworkConfigDir:/home/rubensa/.config/cni/net.d}}
DEBU[0000] Using conmon: "/usr/local/bin/conmon"
DEBU[0000] Initializing boltdb state at /home/rubensa/.local/share/containers/storage/libpod/bolt_state.db
DEBU[0000] Using graph driver
DEBU[0000] Using graph root /home/rubensa/.local/share/containers/storage
DEBU[0000] Using run root /run/user/1000/containers
DEBU[0000] Using static dir /home/rubensa/.local/share/containers/storage/libpod
DEBU[0000] Using tmp dir /run/user/1000/libpod/tmp
DEBU[0000] Using volume path /home/rubensa/.local/share/containers/storage/volumes
DEBU[0000] Set libpod namespace to ""
DEBU[0000] Not configuring container store
DEBU[0000] Initializing event backend file
DEBU[0000] using runtime "/usr/bin/runc"
DEBU[0000] using runtime "/usr/local/bin/crun"
WARN[0000] Error initializing configured OCI runtime kata: no valid executable found for OCI runtime kata: invalid argument

Need to check the error...

Tried with
sudo ln -s /software/slirp4netns-x86_64-1.1.4 /usr/local/bin/slirp4netns

but same problem
$ podman run --log-level=debug --net=slirp4netns hello-world
INFO[0000] podman filtering at log level debug
DEBU[0000] Called run.PersistentPreRunE(podman run --log-level=debug --net=slirp4netns hello-world)
DEBU[0000] Reading configuration file "/home/rubensa/.config/containers/containers.conf"
DEBU[0000] Merged system config "/home/rubensa/.config/containers/containers.conf": &{Containers:{Devices:[] Volumes:[] ApparmorProfile:containers-default-0.22.0 Annotations:[] CgroupNS:host Cgroups:enabled DefaultCapabilities:[CAP_AUDIT_WRITE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_KILL CAP_MKNOD CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETFCAP CAP_SETGID CAP_SETPCAP CAP_SETUID CAP_SYS_CHROOT] DefaultSysctls:[] DefaultUlimits:[] DefaultMountsFile: DNSServers:[] DNSOptions:[] DNSSearches:[] EnableLabeling:false Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm] EnvHost:false HTTPProxy:false Init:false InitPath: IPCNS:private LogDriver:k8s-file LogSizeMax:-1 NetNS:slirp4netns NoHosts:false PidsLimit:2048 PidNS:private SeccompProfile:/usr/share/containers/seccomp.json ShmSize:65536k TZ: Umask:0022 UTSNS:private UserNS:host UserNSSize:65536} Engine:{CgroupCheck:false CgroupManager:cgroupfs ConmonEnvVars:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin] ConmonPath:[/usr/libexec/podman/conmon /usr/local/libexec/podman/conmon /usr/local/lib/podman/conmon /usr/bin/conmon /usr/sbin/conmon /usr/local/bin/conmon /usr/local/sbin/conmon /run/current-system/sw/bin/conmon] DetachKeys:ctrl-p,ctrl-q EnablePortReservation:true Env:[] EventsLogFilePath:/run/user/1000/libpod/tmp/events/events.log EventsLogger:file HooksDir:[/usr/share/containers/oci/hooks.d] ImageDefaultTransport:docker:// InfraCommand:/pause InfraImage:k8s.gcr.io/pause:3.2 InitPath:/usr/libexec/podman/catatonit LockType:shm MultiImageArchive:false Namespace: NetworkCmdPath: NoPivotRoot:false NumLocks:2048 OCIRuntime:runc OCIRuntimes:map[crun:[/usr/bin/crun /usr/sbin/crun /usr/local/bin/crun /usr/local/sbin/crun /sbin/crun /bin/crun /run/current-system/sw/bin/crun] kata:[/usr/bin/kata-runtime /usr/sbin/kata-runtime /usr/local/bin/kata-runtime /usr/local/sbin/kata-runtime /sbin/kata-runtime /bin/kata-runtime /usr/bin/kata-qemu /usr/bin/kata-fc] runc:[/usr/bin/runc /usr/sbin/runc /usr/local/bin/runc /usr/local/sbin/runc /sbin/runc /bin/runc /usr/lib/cri-o-runc/sbin/runc /run/current-system/sw/bin/runc]] PullPolicy:missing Remote:false RemoteURI: RemoteIdentity: ActiveService: ServiceDestinations:map[] RuntimePath:[] RuntimeSupportsJSON:[crun runc] RuntimeSupportsNoCgroups:[crun] RuntimeSupportsKVM:[kata kata-runtime kata-qemu kata-fc] SetOptions:{StorageConfigRunRootSet:false StorageConfigGraphRootSet:false StorageConfigGraphDriverNameSet:false StaticDirSet:false VolumePathSet:false TmpDirSet:false} SignaturePolicyPath:/home/rubensa/.config/containers/policy.json SDNotify:false StateType:3 StaticDir:/home/rubensa/.local/share/containers/storage/libpod StopTimeout:10 TmpDir:/run/user/1000/libpod/tmp VolumePath:/home/rubensa/.local/share/containers/storage/volumes} Network:{CNIPluginDirs:[/usr/libexec/cni /usr/lib/cni /usr/local/lib/cni /opt/cni/bin] DefaultNetwork:podman NetworkConfigDir:/home/rubensa/.config/cni/net.d}}
DEBU[0000] Using conmon: "/usr/local/bin/conmon"
DEBU[0000] Initializing boltdb state at /home/rubensa/.local/share/containers/storage/libpod/bolt_state.db
DEBU[0000] Using graph driver
DEBU[0000] Using graph root /home/rubensa/.local/share/containers/storage
DEBU[0000] Using run root /run/user/1000/containers
DEBU[0000] Using static dir /home/rubensa/.local/share/containers/storage/libpod
DEBU[0000] Using tmp dir /run/user/1000/libpod/tmp
DEBU[0000] Using volume path /home/rubensa/.local/share/containers/storage/volumes
DEBU[0000] Set libpod namespace to ""
DEBU[0000] Not configuring container store
DEBU[0000] Initializing event backend file
DEBU[0000] using runtime "/usr/bin/runc"
DEBU[0000] using runtime "/usr/local/bin/crun"
WARN[0000] Error initializing configured OCI runtime kata: no valid executable found for OCI runtime kata: invalid argument

For the record:  my ~/.config/containers is a symlink, but I don't think that can cause any problem.

Tried creating ~/.config/containers/policy.json
{
    "default": [
        {
            "type": "insecureAcceptAnything"
        }
    ],
    "transports":
        {
            "docker-daemon":
                {
                    "": [{"type":"insecureAcceptAnything"}]
                }
        }
}

Same result.
Tried creating ~/.config/cni/net.d/87-podman-bridge.conf
{
  "cniVersion": "0.4.0",
  "name": "podman",
  "plugins": [
    {
      "type": "bridge",
      "bridge": "cni-podman0",
      "isGateway": true,
      "ipMasq": true,
      "hairpinMode": true,
      "ipam": {
        "type": "host-local",
        "routes": [{ "dst": "<IP_ADDRESS>/0" }],
        "ranges": [
          [
            {
              "subnet": "<IP_ADDRESS>/16",
              "gateway": "<IP_ADDRESS>"
            }
          ]
        ]
      }
    },
    {
      "type": "portmap",
      "capabilities": {
        "portMappings": true
      }
    },
    {
      "type": "firewall"
    },
    {
      "type": "tuning"
    }
  ]
}

Same result.
Tried with (although looks like cni-plugins are not used in rootless mode https://github.com/containers/podman/issues/2174#issuecomment-458467409)
$ tar xvfz cni-plugins-linux-amd64-v0.8.7.tgz

on folder ~/.config/cni and setting ~./config/containers/containers.conf to
runtime = "crun"
cni_config_dir = "/home/rubensa/.config/cni/net.d"
cni_plugin_dir = "/home/rubensa/.config/cni"

Same result
INFO[0000] podman filtering at log level debug
DEBU[0000] Called run.PersistentPreRunE(podman run --log-level=debug hello-world)
DEBU[0000] Reading configuration file "/home/rubensa/.config/containers/containers.conf"
DEBU[0000] Merged system config "/home/rubensa/.config/containers/containers.conf": &{Containers:{Devices:[] Volumes:[] ApparmorProfile:containers-default-0.22.0 Annotations:[] CgroupNS:host Cgroups:enabled DefaultCapabilities:[CAP_AUDIT_WRITE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_KILL CAP_MKNOD CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETFCAP CAP_SETGID CAP_SETPCAP CAP_SETUID CAP_SYS_CHROOT] DefaultSysctls:[] DefaultUlimits:[] DefaultMountsFile: DNSServers:[] DNSOptions:[] DNSSearches:[] EnableLabeling:false Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm] EnvHost:false HTTPProxy:false Init:false InitPath: IPCNS:private LogDriver:k8s-file LogSizeMax:-1 NetNS:slirp4netns NoHosts:false PidsLimit:2048 PidNS:private SeccompProfile:/usr/share/containers/seccomp.json ShmSize:65536k TZ: Umask:0022 UTSNS:private UserNS:host UserNSSize:65536} Engine:{CgroupCheck:false CgroupManager:cgroupfs ConmonEnvVars:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin] ConmonPath:[/usr/libexec/podman/conmon /usr/local/libexec/podman/conmon /usr/local/lib/podman/conmon /usr/bin/conmon /usr/sbin/conmon /usr/local/bin/conmon /usr/local/sbin/conmon /run/current-system/sw/bin/conmon] DetachKeys:ctrl-p,ctrl-q EnablePortReservation:true Env:[] EventsLogFilePath:/run/user/1000/libpod/tmp/events/events.log EventsLogger:file HooksDir:[/usr/share/containers/oci/hooks.d] ImageDefaultTransport:docker:// InfraCommand:/pause InfraImage:k8s.gcr.io/pause:3.2 InitPath:/usr/libexec/podman/catatonit LockType:shm MultiImageArchive:false Namespace: NetworkCmdPath: NoPivotRoot:false NumLocks:2048 OCIRuntime:runc OCIRuntimes:map[crun:[/usr/bin/crun /usr/sbin/crun /usr/local/bin/crun /usr/local/sbin/crun /sbin/crun /bin/crun /run/current-system/sw/bin/crun] kata:[/usr/bin/kata-runtime /usr/sbin/kata-runtime /usr/local/bin/kata-runtime /usr/local/sbin/kata-runtime /sbin/kata-runtime /bin/kata-runtime /usr/bin/kata-qemu /usr/bin/kata-fc] runc:[/usr/bin/runc /usr/sbin/runc /usr/local/bin/runc /usr/local/sbin/runc /sbin/runc /bin/runc /usr/lib/cri-o-runc/sbin/runc /run/current-system/sw/bin/runc]] PullPolicy:missing Remote:false RemoteURI: RemoteIdentity: ActiveService: ServiceDestinations:map[] RuntimePath:[] RuntimeSupportsJSON:[crun runc] RuntimeSupportsNoCgroups:[crun] RuntimeSupportsKVM:[kata kata-runtime kata-qemu kata-fc] SetOptions:{StorageConfigRunRootSet:false StorageConfigGraphRootSet:false StorageConfigGraphDriverNameSet:false StaticDirSet:false VolumePathSet:false TmpDirSet:false} SignaturePolicyPath:/home/rubensa/.config/containers/policy.json SDNotify:false StateType:3 StaticDir:/home/rubensa/.local/share/containers/storage/libpod StopTimeout:10 TmpDir:/run/user/1000/libpod/tmp VolumePath:/home/rubensa/.local/share/containers/storage/volumes} Network:{CNIPluginDirs:[/usr/libexec/cni /usr/lib/cni /usr/local/lib/cni /opt/cni/bin] DefaultNetwork:podman NetworkConfigDir:/home/rubensa/.config/cni/net.d}}
DEBU[0000] Using conmon: "/usr/local/bin/conmon"
DEBU[0000] Initializing boltdb state at /home/rubensa/.local/share/containers/storage/libpod/bolt_state.db
DEBU[0000] Using graph driver
DEBU[0000] Using graph root /home/rubensa/.local/share/containers/storage
DEBU[0000] Using run root /run/user/1000/containers
DEBU[0000] Using static dir /home/rubensa/.local/share/containers/storage/libpod
DEBU[0000] Using tmp dir /run/user/1000/libpod/tmp
DEBU[0000] Using volume path /home/rubensa/.local/share/containers/storage/volumes
DEBU[0000] Set libpod namespace to ""
DEBU[0000] Not configuring container store
DEBU[0000] Initializing event backend file
DEBU[0000] using runtime "/usr/bin/runc"
DEBU[0000] using runtime "/usr/local/bin/crun"
WARN[0000] Error initializing configured OCI runtime kata: no valid executable found for OCI runtime kata: invalid argument

Re-checking doc and looks like driver="overlay" is required for root-less so changed (again) storage.conf to:
[storage]
driver = "overlay"
[storage.options]
mount_program = "fuse-overlayfs"

Now, looks like one more step is run (but then, again, stalled)
$ podman run --log-level=debug hello-world
INFO[0000] podman filtering at log level debug
DEBU[0000] Called run.PersistentPreRunE(podman run --log-level=debug hello-world)
DEBU[0000] Reading configuration file "/home/rubensa/.config/containers/containers.conf"
DEBU[0000] Merged system config "/home/rubensa/.config/containers/containers.conf": &{Containers:{Devices:[] Volumes:[] ApparmorProfile:containers-default-0.22.0 Annotations:[] CgroupNS:host Cgroups:enabled DefaultCapabilities:[CAP_AUDIT_WRITE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_KILL CAP_MKNOD CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETFCAP CAP_SETGID CAP_SETPCAP CAP_SETUID CAP_SYS_CHROOT] DefaultSysctls:[] DefaultUlimits:[] DefaultMountsFile: DNSServers:[] DNSOptions:[] DNSSearches:[] EnableLabeling:false Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm] EnvHost:false HTTPProxy:false Init:false InitPath: IPCNS:private LogDriver:k8s-file LogSizeMax:-1 NetNS:slirp4netns NoHosts:false PidsLimit:2048 PidNS:private SeccompProfile:/usr/share/containers/seccomp.json ShmSize:65536k TZ: Umask:0022 UTSNS:private UserNS:host UserNSSize:65536} Engine:{CgroupCheck:false CgroupManager:cgroupfs ConmonEnvVars:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin] ConmonPath:[/usr/libexec/podman/conmon /usr/local/libexec/podman/conmon /usr/local/lib/podman/conmon /usr/bin/conmon /usr/sbin/conmon /usr/local/bin/conmon /usr/local/sbin/conmon /run/current-system/sw/bin/conmon] DetachKeys:ctrl-p,ctrl-q EnablePortReservation:true Env:[] EventsLogFilePath:/run/user/1000/libpod/tmp/events/events.log EventsLogger:file HooksDir:[/usr/share/containers/oci/hooks.d] ImageDefaultTransport:docker:// InfraCommand:/pause InfraImage:k8s.gcr.io/pause:3.2 InitPath:/usr/libexec/podman/catatonit LockType:shm MultiImageArchive:false Namespace: NetworkCmdPath: NoPivotRoot:false NumLocks:2048 OCIRuntime:runc OCIRuntimes:map[crun:[/usr/bin/crun /usr/sbin/crun /usr/local/bin/crun /usr/local/sbin/crun /sbin/crun /bin/crun /run/current-system/sw/bin/crun] kata:[/usr/bin/kata-runtime /usr/sbin/kata-runtime /usr/local/bin/kata-runtime /usr/local/sbin/kata-runtime /sbin/kata-runtime /bin/kata-runtime /usr/bin/kata-qemu /usr/bin/kata-fc] runc:[/usr/bin/runc /usr/sbin/runc /usr/local/bin/runc /usr/local/sbin/runc /sbin/runc /bin/runc /usr/lib/cri-o-runc/sbin/runc /run/current-system/sw/bin/runc]] PullPolicy:missing Remote:false RemoteURI: RemoteIdentity: ActiveService: ServiceDestinations:map[] RuntimePath:[] RuntimeSupportsJSON:[crun runc] RuntimeSupportsNoCgroups:[crun] RuntimeSupportsKVM:[kata kata-runtime kata-qemu kata-fc] SetOptions:{StorageConfigRunRootSet:false StorageConfigGraphRootSet:false StorageConfigGraphDriverNameSet:false StaticDirSet:false VolumePathSet:false TmpDirSet:false} SignaturePolicyPath:/home/rubensa/.config/containers/policy.json SDNotify:false StateType:3 StaticDir:/home/rubensa/.local/share/containers/storage/libpod StopTimeout:10 TmpDir:/run/user/1000/libpod/tmp VolumePath:/home/rubensa/.local/share/containers/storage/volumes} Network:{CNIPluginDirs:[/usr/libexec/cni /usr/lib/cni /usr/local/lib/cni /opt/cni/bin] DefaultNetwork:podman NetworkConfigDir:/home/rubensa/.config/cni/net.d}}
DEBU[0000] Using conmon: "/usr/local/bin/conmon"
DEBU[0000] Initializing boltdb state at /home/rubensa/.local/share/containers/storage/libpod/bolt_state.db
DEBU[0000] Using graph driver overlay
DEBU[0000] Using graph root /home/rubensa/.local/share/containers/storage
DEBU[0000] Using run root /run/user/1000/containers
DEBU[0000] Using static dir /home/rubensa/.local/share/containers/storage/libpod
DEBU[0000] Using tmp dir /run/user/1000/libpod/tmp
DEBU[0000] Using volume path /home/rubensa/.local/share/containers/storage/volumes
DEBU[0000] Set libpod namespace to ""
DEBU[0000] Not configuring container store
DEBU[0000] Initializing event backend file
DEBU[0000] using runtime "/usr/local/bin/crun"
WARN[0000] Error initializing configured OCI runtime kata: no valid executable found for OCI runtime kata: invalid argument
DEBU[0000] using runtime "/usr/bin/runc"

Umm...  no one more step...  only the order of messages from:
DEBU[0000] using runtime "/usr/bin/runc"
DEBU[0000] using runtime "/usr/local/bin/crun"
WARN[0000] Error initializing configured OCI runtime kata: no valid executable found for OCI runtime kata: invalid argument

to:
DEBU[0000] using runtime "/usr/local/bin/crun"
WARN[0000] Error initializing configured OCI runtime kata: no valid executable found for OCI runtime kata: invalid argument
DEBU[0000] using runtime "/usr/bin/runc"

Looking at Rootless containers with Podman: The basics seems that I only need:

slirp4netns (static binaries downloaded from https://github.com/rootless-containers/slirp4netns/releases/tag/v1.1.4 and linked under /usr/local/bin)
podman (static binaries downloaded from https://github.com/alvistack/containers-podman/releases/tag/v2.1.1 and linked under /usr/local/bin)

But this is not enough as podman itself needs extra utilities...
As suggested by @rhatdan this extra is needed:

fuse-overlayfs (static binaries downloaded from https://github.com/containers/fuse-overlayfs/releases/tag/v1.1.2 and linked under /usr/local/bin)
crun (static binaries downloaded from https://github.com/alvistack/containers-crun/releases/tag/0.15 and linked under /usr/local/bin)

But looks like this is also needed:

conmon (static binaries downloaded from https://github.com/alvistack/containers-conmon/releases/tag/v2.0.21 and linked under /usr/local/bin)

Do I need any of skopeo, cri-o or buildash for running podman (I think not, but not sure)?
But this is not enough as podman needs some configuration:

~/.config/containers/policy.json

{
    "default": [
        {
            "type": "insecureAcceptAnything"
        }
    ],
    "transports":
        {
            "docker-daemon":
                {
                    "": [{"type":"insecureAcceptAnything"}]
                }
        }
}

~/.config/containers/registries.conf

[registries.search]
registries = ['docker.io']

[registries.insecure]
registries = []

[registries.block]
registries = []

~/.config/containers/storage.conf

[storage]
driver = "overlay"
[storage.options]
mount_program = "fuse-overlayfs"

~/.config/containers/containers.conf

runtime = "crun"

But, unfortunately, after all I can't make podman rootless working using static binaries...  :(
PS:  I'm on Ubuntu 20.04.1 and checked /etc/subuid and /etc/subgid configuration and /proc/sys/user/max_user_namespaces and looks ok.
Any ideas on this?

If I execute the following on Fedora this is what I see
$ rpm -q podman --requires
/bin/sh
config(podman) = 2:2.1.1-2.fc33
conmon >= 2:2.0.16-1
containernetworking-plugins >= 0.8.6-1
containers-common >= 1.1.1-9
iptables
libassuan.so.0()(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.32)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libdl.so.2()(64bit)
libdl.so.2(GLIBC_2.2.5)(64bit)
libgpg-error.so.0()(64bit)
libgpgme.so.11()(64bit)
libgpgme.so.11(GPGME_1.0)(64bit)
libgpgme.so.11(GPGME_1.1)(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.12)(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libpthread.so.0(GLIBC_2.3.2)(64bit)
librt.so.1()(64bit)
librt.so.1(GLIBC_2.2.5)(64bit)
libseccomp.so.2()(64bit)
nftables
oci-runtime
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1
rtld(GNU_HASH)

Out of these you will definitely need conmon, and potentially some of the configuration files specified in containers-common.
But to run rooless we will also need --recommends
 rpm -q podman --recommends
catatonit
container-selinux
crun >= 0.14-2
fuse-overlayfs >= 0.3-8
podman-plugins = 2:2.1.1-2.fc33
runc
slirp4netns >= 0.3.0-2

Out of these, you really just need fuse-overlayfs, slirp4netns,  and crun (or runc)

@QiWang19 @ashley-cui Might be a good blog to write. What does podman need to run successfully.

@QiWang19 @ashley-cui Might be a good blog to write. What does podman need to run successfully.

yes, sounds good let's draft one.

@rubensa you may need some of the required dependencies from the installation notes, https://podman.io/getting-started/installation#build-and-run-dependencies. From my side sudo apt install uidmap would work. I was using ubuntu 20.04.


fixed dead link

What :computer:

a nonexistent developer document link

Why :hand:

to avoid confusion

Thank you for reporting this, it is fixed with next release


Detailpage layout

Description
This pull request remains the fixes of the responsiveness of the detailpage.
Fixes # (issue)
Type of change
Please delete options that are not relevant.

[x] Responsiveness detailpage
[x] Adding width & height to the video element for performance purposes

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[x] Responsiveness

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules

Ziet er goed uit.
De responsiveness op de detailpage klopt en de whitespace op de overzichtspage gaat ook goed!


updated scope to match instructions

Added new [] to the scope to match the instructions.

The braces of the placeholder aren't C# braces, and a C# string array using the new keyword is new[] { ... }, so the current instruction is accurate. However, that reasoning breaks in the next example for the extension method ...
IServiceCollection AddGraphClient(IServiceCollection, string[])

I'll make a few edits to fix it up. Thanks for calling this out.


build: add melange config for libpst

Summary
Adds the melange config to build libpst for wolfi-base. The pipeline builds the CLI package, but not the Python bindings and the build pipeline does not include the man pages. Build has only been tested on x86_64.
Test instructions
To build the packages, run:
docker run --privleged --rm \
    -v "${PWD}":/work \
    cgr.dev/chainguard/melange \
    build libpst.yaml \
    --arch=x86_64 \
    --signing-key melange.rsa

After the package is built, install it in wolfi-base with:
apk add --allow-untrusted libpst-0.6.76-r0.apk

Once it's installed, verify that readpst is available by runnign readpst --help.

🥷 <(Let's Melange!)


Added ntChar:getDesc text wrapping for hud

Should add wrapping for the description hud element. Untested.

Mine working with better solution


AxSpan draggable not implemented

It looks like PlottableAxSpan has draggable api, but not implemented.
Additionaly it will be usefull to have OnChanged(double newValue) events for both borders, which rises on end drag by user.

Thanks for mentioning this @StendProg! It looks like there is not an easy fix for this because all my draggable code was made to drag a single line (axis line), not two edges of a span... so it is difficult to get this working with a simple fix.
This difficulty indicates to me that I should refactor how all dragging is handled. I think it is time to create an IDraggable interface. It might take me a few days to work this out! Thanks again for pointing this issue out.

This now works in FormsPlot and WpfPlot
New draggables (draggable plottables) will be easy to create with IDraggable
https://github.com/swharden/ScottPlot/blob/dff32dd829b44fd2f25b21015de64495c3dd6ce5/src/ScottPlot/plottables/IDraggable.cs#L7-L17
The plot module now has two new public methods:
https://github.com/swharden/ScottPlot/blob/dff32dd829b44fd2f25b21015de64495c3dd6ce5/src/ScottPlot/Plot.cs#L696-L705
https://github.com/swharden/ScottPlot/blob/dff32dd829b44fd2f25b21015de64495c3dd6ce5/src/ScottPlot/Plot.cs#L707-L717

Hi @swharden.
Thanks for this big amout of work.
I checked this, have some ideas that to add and refactor. Try to make this soon.
There are one thing i really can't solve. Dragging axises or spans looks much more laggy then paning. Check the code, it have the same math complexity. Profiled, also nothing specal. But dragging goes like 3 fps, when pan or zoom goes smooth.

Dragging axes or spans looks much more laggy then panning

Maybe anti-aliasing isn't turned off while dragging portables?

Maybe anti-aliasing isn't turned off while dragging portables?

I tryed that too, the same result.

Found that,
https://github.com/swharden/ScottPlot/blob/334f93dec027cd8d950bc63561f0925612d7e3c1/src/ScottPlot.WinForms/FormsPlot.cs#L57
shoud be
if (isPanningOrZooming || isMovingDraggable)

Spent few hours try to find that....

Maybe anti-aliasing isn't turned off while dragging portables?

I tryed that too, the same result.

We should properly alias while dragging
https://github.com/swharden/ScottPlot/blob/334f93dec027cd8d950bc63561f0925612d7e3c1/src/ScottPlot.WinForms/FormsPlot.cs#L216
Like we do while panning
https://github.com/swharden/ScottPlot/blob/334f93dec027cd8d950bc63561f0925612d7e3c1/src/ScottPlot.WinForms/FormsPlot.cs#L207


Add crossOrigin to L.icon

When writing a PWA, I found that the _createImage function in createIcon was not able to add a crossOrigin of anonymous which causes the images to cache as opaque.
Suggestion is to add crossOrigin to the L.icon options and wherever a createElement("img") occurs.
Hope that makes sense.
Thanks
Karl

Sounds reasonable, since Leaflet has crossOrigin options for tilelayers and imageoverlays.
Would you be willing to try and send a PR implementing this?

Sorry beyond my skills to do a clean version of it

Hi. I'm new to open-source contributions but I think I can help.
Sending the PR soon.

How do I get started with this

#7298

PR created for this @IvanSanchez please review and merge.
https://github.com/Leaflet/Leaflet/pull/7298


Update distrib support in RoadRunner

Andrew you migth want to look at this issues, talk to Kiri to get up to speed on the problem.
Consider this simple model, it only has a single statement that samples from a unifrom distribution:
import tellurium as te
import roadrunner
import pylab
r = te.loada("""
val := uniform (1, 1)
""")
m = r.simulate (0, 10.1, 400, ['time', 'val'])
The simulation returns NAN in 2.0.18 and the following error message in, 2.1.0:
RuntimeError: Unsupported distribution: , at ?loadSymbolValue@DistribFunctionResolver@rrllvm@@QEAAPEAVValue@llvm@@PEBVFunctionDefinition@libsbml@@PEBVDistribFunctionDefinitionPlugin@6@AEBV?$ArrayRef@PEAVValue@llvm@@@4@@Z

I should mention that I am very close to releasing a new, simplified version of the 'distrib' spec which would change the way distributions are encoded in SBML entirely.  This would leave (basically) two different versions of SBML models that encode distributions out there: one where a function definition was overridden by an annotation, and a second one where each distribution had its own MathML 'csymbol'.
The last few versions of Antimony have supported distributions as both the 'function definition overridden by an annotation' version, as well as the proposed 'UncertML-like' 'function definition overridden by distrib'.  But if we go the csymbol route, the second version of that will go away, so don't waste any time trying to support it.
Hmm, that was a bit confusing.  A summary:

A function definition overridden by an annotation:  an old tradition, with many existing models.  Antimony supports this, and roadrunner probably should, too.
A function definition overridden by 'UncertML':  Obsolete as of March or so; don't bother supporting.  Antimony used to support this.
A function definition overridden by UncertML-like objects:  Obsolete as of next month, probably; don't bother supporting.  Antimony currently supports this.
New MathML csymbols:  Due in the next 'distrib' proposal.  Likely to be accepted, especially if roadrunner implements support for it, but no libsbml support yet (still in the works).  Worth supporting when new version of libsbml comes out.

We could probably keep the current annotation method to remina compatible
with other simulators and then put in the new MathML csymbols once libsbml
is ready.
Herbert
On Wed, Aug 8, 2018 at 2:07 PM, Lucian Smith<EMAIL_ADDRESS>wrote:

I should mention that I am very close to releasing a new, simplified
version of the 'distrib' spec which would change the way distributions are
encoded in SBML entirely. This would leave (basically) two different
versions of SBML models that encode distributions out there: one where a
function definition was overridden by an annotation, and a second one where
each distribution had its own MathML 'csymbol'.
The last few versions of Antimony have supported distributions as both
the 'function definition overridden by an annotation' version, as well as
the proposed 'UncertML-like' 'function definition overridden by distrib'.
But if we go the csymbol route, the second version of that will go away, so
don't waste any time trying to support it.
Hmm, that was a bit confusing. A summary:

A function definition overridden by an annotation: an old tradition,
with many existing models. Antimony supports this, and roadrunner probably
should, too.
A function definition overridden by 'UncertML': Obsolete as of March
or so; don't bother supporting. Antimony used to support this.
A function definition overridden by UncertML-like objects: Obsolete
as of next month, probably; don't bother supporting. Antimony currently
supports this.
New MathML csymbols: Due in the next 'distrib' proposal. Likely to
be accepted, especially if roadrunner implements support for it, but no
libsbml support yet (still in the works). Worth supporting when new version
of libsbml comes out.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/sys-bio/tellurium/issues/391#issuecomment-411552723,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABAZDr1KxP69FVKWF-qrbKdSPGBQmiBoks5uO1MhgaJpZM4V0pT4
.

--
Herbert Sauro, Associate Professor
University of Washington, Bioengineering
206-685-2119, www.sys-bio.org
<EMAIL_ADDRESS>Books: http://books.analogmachine.org/

Version 2.1.0 issues are due to roadrunner on PyPI not compiled with distrib package. The nan issue, however, is a valid concern.

Don't quite understand, this used to work in roadrunner, James Galzier used
the feature when he taught modeling last year and needs it again in a few
weeks. So what has changed? Isn't it a bug?
Herbert
On Wed, Aug 8, 2018 at 2:22 PM, Lucian Smith<EMAIL_ADDRESS>wrote:

The issue with NaN is not actually a bug! The function definition in
question has two sets of math: the bit that gets overridden by distrib, and
the bit contributed by distrib. And, as it happens, the bit that is
supposed to get overridden says 'return NaN' to make sure that people don't
accidentally use it.
So the solution to both problems is just 'compile with distrib'.
(However, as noted, if it's using actual distrib objects, those are going
away soon, due to popular un-demand.)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/sys-bio/tellurium/issues/391#issuecomment-411556919,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABAZDqDxYgDsIyxlByX5r9O5i4KIMCFgks5uO1aqgaJpZM4V0pT4
.

--
Herbert Sauro, Associate Professor
University of Washington, Bioengineering
206-685-2119, www.sys-bio.org
<EMAIL_ADDRESS>Books: http://books.analogmachine.org/

Not sure I understand it either. I am testing on roadrunner compiled with distrib and I am still getting NaN. Is this non-issue?

Kiri said:  "Version 2.1.0 issues are due to roadrunner on PyPI not compiled with distrib package."  A version of rr with that change would, by design, return NaN.
However, Kiri says that rr compiled with distrib still returns NaN, so that means there's some other problem also going on.
Part of the problem is that I don't actually know how distrib support was added in roadrunner: I had kind of assumed it was through the annotation scheme, but it sounds like it was through 'distrib'?
If rr support worked through distrib, that means that rr will need to be changed, since distrib itself changed, and is about to change again.  One way to change it that will work today is to ignore the 'distrib' things entirely, and instead look at the annotation.  This will maintain backwards compatibility, since Antimony would output SBML files that used both the annotation and the (now obsolete) 'distrib' scheme.
My guess is that rr and Antimony are currently using different versions of 'distrib', both of which are being obsoleted!  So your best bet is to drop all the old distrib code, and instead look at the annotation (which is consistent and will still work on these models in the future).  Then when distrib changes yet again to the csymbol approach, implement support for that.
If need be, I can walk over and we can talk about this in person ;-)

My guess is that rr and Antimony are currently using different versions of 'distrib'
That is highly plausible.

If this turns out to be the case, a quick fix is to revert Antimony.

Update from @luciansmith

Hi, everyone!  I have just now checked into Kyle's 'miriam' branch for Antimony a version of Antimony that uses the new version of 'distrib'.  In short, in this version, all distributions are given their own ASTNode type (like AST_DISTRIB_FUNCTION_NORMAL), and that's it.  There are no longer overridden FunctionDefinitions with new contents: it's all just ASTNodes.
There is also a converter in libsbml (used by libAntimony) that converts the 'wikipedia definition URL' version of FunctionDefinitions and converts them to the new ASTNodes, too, so libroadrunner need only support a single version of distrib, while still being able to read in versions of SBML files from Copasi or older versions of Antimony that our users may have lying around.  Basically, you would just run the converter on import, and go from there.
This does mean that all distributions that were defined by Frank for the 'wikipedia URL' annotation scheme are currently implemented, which is seven more distributions than we had previously.  If for some reason we don't want to implement support for one or more of them, and nobody else does either, we can take them out of the 'distrib' spec itself.  Conversely, if there are any distributions anyone feels we should support that are not in the current list, now is the time to add them: I can put them in libsbml and Antimony, and then we can support them with roadrunner.
The full list of distributions is:
AST_DISTRIB_FUNCTION_NORMAL
AST_DISTRIB_FUNCTION_UNIFORM
AST_DISTRIB_FUNCTION_BERNOULLI
AST_DISTRIB_FUNCTION_BINOMIAL
AST_DISTRIB_FUNCTION_CAUCHY
AST_DISTRIB_FUNCTION_CHISQUARE
AST_DISTRIB_FUNCTION_EXPONENTIAL
AST_DISTRIB_FUNCTION_GAMMA
AST_DISTRIB_FUNCTION_LAPLACE
AST_DISTRIB_FUNCTION_LOGNORMAL
AST_DISTRIB_FUNCTION_POISSON
AST_DISTRIB_FUNCTION_RAYLEIGH
(The ones previously supported by Antimony and roadrunner were normal, uniform, exponential, gamma, and poisson.)
Note also that there are 'truncated' versions of many of the above distributions as well, which are distinguishable only by the number of arguments to the function:  normal(0,1) is a standard gaussian with mean of 0 and a standard deviation of 1, and normal(0, 1, -3, 3) truncates that distribution to values between -3 and 3.
In related news, as part of this change, we updated libsbml itself to only support the 'legacy math' version of its AST support, which was the 'faster' version, as requested by Andy and the Copasi team.  As part of folding things into only one type of math support, some AST operations are a little slower than they were (though still much faster than the 'non-legacy' version that Andy and others complained about back in the day).
Sarah is willing to work to make things faster than they currently are, but at this point, all the obvious things have been done.  If we can run some speed tests on roadrunner using the new system, if there are any situations that are noticeably slower, we can send those to Sarah to see if she can eke out faster ways to handle those situations.
Let me know if you have any questions!
-Lucian

Commit bd70cdb04c8ccb9ea677e43132d26484554edc12 restores roadrunners distrib support. Hooray!
However, I noticed that roadrunner currently only supports normal and uniform distributions. Do we want some other ones?

I definitely need lognormal and exponential, poisson. It should not be to difficult to support all of them.

Commit https://github.com/sys-bio/roadrunner/commit/f991e30f0d79b8bfd34ed76131d2201add96e9b9 adds support for exponential, poisson, and lognormal distributions. Keep in mind this is for legacy models only (pre-AST_DISTRIB). This also means that the antimony version that supports this change (2.9.4) does not support lognormal unfortunately. SBML files should be readable though.
While working to implement AST_DISTRIB nodes I realized that the roadrunner handles distrib through functions definitions and it is hard to separate it out. It might take some time to actually support new AST nodes.

@kirichoi Thanks for all the work. Let me know when the AST_DISTRIB is supported. I implemented the reading and writing of distrib models in my tools with extended math, but would need a simulator to test and simulate the models.

I have starting working on this issue again, only to be reminded of the problem I faced earlier. Basically, for distrib functions to work, a pointer to random field is required. However, defining this pointer is non-trivial in the scope of ASTNodeCodeGen because none of the higher level roadrunner objects necessary to construct a Random object are passed.
Right now, I am thinking of workarounds, so that distribution function does not require Random object, e.g., from
double distrib_uniform(Random *random, double _min, double _max)
{
    Log(Logger::LOG_DEBUG) << "distrib_uniform("
            << static_cast<void*>(random)
            << ", " << _min << ", " << _max << ")";

#ifdef CXX11_RANDOM
    cxx11_ns::uniform_real_distribution<double> dist(_min, _max);
#else
    cxx11_ns::uniform_real<double> dist(_min, _max);
#endif
    return dist(*random);
}

to
double distrib_uniform_ast(double _min, double _max)
{
    std::random_device rd;
    cxx11_ns::mt19937 engine(rd());
    Log(Logger::LOG_DEBUG) << "Test11";
    Log(Logger::LOG_DEBUG) << "distrib_uniform_ast("
        << static_cast<void*>(&engine)
        << ", " << _min << ", " << _max << ")";

#ifdef CXX11_RANDOM
    cxx11_ns::uniform_real_distribution<double> dist(_min, _max);
#else
    cxx11_ns::uniform_real<double> dist(_min, _max);
#endif
    return dist(engine);
}

This works, except you can't explicitly set a seed which is a big problem.
Anyway, I wanted to share this to get ideas on other potential approaches. Any thoughts?

BTW, is it even possible to set seed for distrib in SBML or SEDML? If not, the issue with distrib is a non-issue because there is no standardized way to exchanging the info.

You can set a seed in SED-ML, but not SBML, but only for the simulation experiment as a whole, not for individual calls.  As long as you can get identical results from a simulation on subsequent runs if you want to, (and setting the seed from time() or something if not), that's all that's required for that.  I personally don't think it'd be a huge issue if you couldn't let the user set a seed; the main thing you need it for is debugging: sometimes if an odd thing happens in a stochastic environment, you want to set the seed so it'll happen again so you can figure out what the problem is.
I'm not sure what the architecture of libroadrunner is here, so I'm not sure I can be any help for your other problem: in general, I'd see if ASTNodeCodeGen function has access to a parent, perhaps?  Or perhaps there's some existing global object you could attach 'Random' to?

In that case, my current solution might be acceptable. The problem is ASTNodeCodeGen doesn't have access to the parent and will require refactoring to do so. Probably that will be the best solution for the long term but for now, I will push my changes so that people can at least use models with AST_DISTRIB.

It should be possible to set a seed for the simulation. This currently is possible for stochastic simulations by setting the seed as an integrator setting (see https://sys-bio.github.io/roadrunner/python_docs/stochastic.html).
One could imagine the same mechanism for distrib, i.e. setting the seed for the integrator which is used as seed for the random_number engine.

Distrib spec says nothing about how a seed should be set so technically, my solution is in accordance to the specification. However, I also thought being able to set seed is important so I refactored the code to take necessary classes to build Random object through commit https://github.com/sys-bio/roadrunner/commit/fa21f864c6250252e4029813a3d12c82d86af57e. Now you can set a seed for distributions using a global seed, e.g.:
roadrunner.Config.setValue(roadrunner.Config.RANDOM_SEED, 123)
which is shared with all other randomly generated things, e.g. stochastic simulations.
Hopefully, nothing breaks even though everything seems to be working. The branch is failing in Travis but the issue seems to be stemming from something else.
@0u812 Do you remember which version of libSBML we are using in libroadrunner-deps_2.0.8?
@luciansmith I also remember you talking about truncated versions of distributions. Could you remind me which distributions support them? Currently, we support normal, uniform, lognormal, exponential, and poission distributions.

All of them can be truncated, actually.  Well, not uniform, since the bounds are the truncations there.
'min' is always inclusive, that is, a value of 'min' is always allowed.  For the continuous distributions (all of yours except 'poisson'), 'max' is not inclusive: a value of 'max' may not be returned.  For 'poisson' both min and max are inclusive; either may be returned.
(However, if this turns out to be difficult to implement, let me know, and we might change the spec!)
In the SBML, both 'min' and 'max' will always be included.  However, one of them may be -INF, 0, or INF, which may be the natural bound of the function.  If your underlying implementation has the ability to define only one bound, you might check the other to see if it's one of those, depending on the function.

Is partial truncation also allowed? For example, defining either minimum or maximum.

I guess this case might be one with setting -INF or INF.

All features are implemented. Only need to figure out why Travis is failing. Anyway, below is what we got currently. Distributions are truncated within -1 to 1:

Do you have some examples of this working, I could add it to my blog.
Herbert
On Mon, Jul 29, 2019 at 4:52 PM Kiri Choi<EMAIL_ADDRESS>wrote:

All features are implemented. Only need to figure out why Travis is
failing. Anyway, below is what we got currently. Distributions are
truncated within -1 to 1:
[image: image]
https://user-images.githubusercontent.com/7672320/62090247-f9bb2580-b220-11e9-96fe-86a2e3904ec0.png
[image: image]
https://user-images.githubusercontent.com/7672320/62090250-fd4eac80-b220-11e9-901a-395064401853.png
[image: image]
https://user-images.githubusercontent.com/7672320/62090251-fe7fd980-b220-11e9-8960-8b5ea6881eea.png
[image: image]
https://user-images.githubusercontent.com/7672320/62090254-00e23380-b221-11e9-8eab-562470c38e18.png
[image: image]
https://user-images.githubusercontent.com/7672320/62090256-02abf700-b221-11e9-8110-4188b0415d07.png
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/sys-bio/tellurium/issues/391?email_source=notifications&email_token=AAIBSDT2LAZP3GFPAJSVKX3QB57CDA5CNFSM4FOSST4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3CKQUA#issuecomment-516204624,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIBSDXTAYW2YNHLEJRYEDLQB57CDANCNFSM4FOSST4A
.

When using the initial implementation, e.g.:
double distrib_uniform_ast(double _min, double _max)
{
    std::random_device rd;
    cxx11_ns::mt19937 engine(rd());
 #ifdef CXX11_RANDOM
    cxx11_ns::uniform_real_distribution<double> dist(_min, _max);
#else
    cxx11_ns::uniform_real<double> dist(_min, _max);
#endif
    return dist(engine);
}

I get the following histogram:

which seems okay.
However, when I use Random object, e.g.:
double distrib_uniform(Random *random, double _min, double _max)
{
    Log(Logger::LOG_DEBUG) << "distrib_uniform("
            << static_cast<void*>(random)
            << ", " << _min << ", " << _max << ")";

#ifdef CXX11_RANDOM
    cxx11_ns::uniform_real_distribution<double> dist(_min, _max);
#else
    cxx11_ns::uniform_real<double> dist(_min, _max);
#endif
    return dist(*random);
}

I get this:

As I said, this behavior is observed even in older versions of libRoadRunner. There is some serious flaw with how distrib was implemented I think.

I need to think of some real examples. Lucian, you can answer this, do we
have any real examples where these can be used?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/sys-bio/tellurium/issues/391?email_source=notifications&email_token=AAIBSDXQYGKFRCFMVT3CSEDQB6EEJA5CNFSM4FOSST4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3CMREY#issuecomment-516212883,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIBSDWZY26IAQ53ALIDIATQB6EEJANCNFSM4FOSST4A
.

--
Herbert Sauro, Associate Professor
University of Washington, Bioengineering
206-685-2119, www.sys-bio.org
<EMAIL_ADDRESS>Books: http://books.analogmachine.org/

A couple examples:

Priorities in petri nets:  any time two events might fire stochastically, determining which one fires via the Priority object works well.  Chris does this a lot.
Modeling random feeding times.  If food shows up stochastically, one can model this with distributions.
Distributed initial conditions: if you know the error for your initial conditions, you can encode this into your model, and then run it several times to see if the expected behavior still happens, or when it doesn't.  (i.e. test whether oscillation happens).

Those are off the top of my head--obviously, James has situations where he uses distributions regularly, too.  My guess is that he uses it when he's implementing a multicellular network, and wants to initialize each cell randomly.

@kirichoi : There are tests at https://github.com/luciansmith/stochastic-distrib-test-suite, which it would be great if you could run through roadrunner to see if you get the same things I predicted--all the results are based on what I believe should be the correct answers, but no simulator has yet confirmed this.

I have been going down the rabbit hole a bit, but the code is very confusing. I will open a new issue because the new issue is with Random object not distrib related functions. Once libroadrunner-deps is updated with the latest libSBML, we can merge ast-distrib branch. All the component in the branch should be functional.

@kirichoi As far as I can tell you have to reuse your random engine throughout the simulation/sampling. Only within one engine can be guaranteed that the numbers will be pseudo-random.
I assume the way you do it right now is to have a new engine on every sample. The individual engines are hereby initialized/seeded with some pseudo-randomness which depends on the engine. Some use more elaborate things like content of arbitrary memory locations, but most often this is simply time. If you now generate a lot of new engines iteratively (with very similar time differences) the time could introduce correlation between the randomness.
Only speculating here, but my strong feeling is:

only generate a random engine once (with the seed provided by the user)
reuse the engine for all samples


requests Read timed out when handle two same header in http response

I use requests's get method to request a url,I found It always timeout,I use wireshark capture the response, the server has response the data,but why requests's get method timeout?,the response as flows
GET /onvif/device_service HTTP/1.1
Host: <IP_ADDRESS>
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.18.4

HTTP/1.1 401 Unauthorized
Date: Tue, 26 Dec 2017 03:24:12 GMT
Server: DNVRS-Webs
Cache-Control: no-cache
Content-Type: text/html
Connection: keep-alive
Keep-Alive: timeout=60, max=99
WWW-Authenticate: Digest realm="DVRNVRDVS", domain="::", qop="auth", nonce="6f43ba833ff06ae8b7b36bd2dfb9704c:1514258652870", opaque="", algorithm="MD5", stale="FALSE"
WWW-Authenticate: Basic realm="DVRNVRDVS"

test urls:http://<IP_ADDRESS>/onvif/device_service

Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use StackOverflow for general usage questions instead and only report defects here.

I would point out that my browser and cURL both exhibit the same behaviour as requests. The reason is that the server doesn't provide a Content-Length header to indicate there is no actual body. As a result, all 3 user agents expect a body that is sent as a chunked response (i.e., as if the server had sent Transfer-Encoding: chunked as a header). As a result, Requests waits for any data to come and we eventually timeout.


Crash when launch app

FATAL EXCEPTION: main                                                    Process: vn.sonice.SoniceApp.Sonice, PID: 28614                                                    java.lang.NoSuchMethodError: No static method zzb(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzab; or its super classes (declaration of 'com.google.android.gms.common.internal.zzab' appears in /data/app/vn.sonice.SoniceApp.Sonice-1/base.apk)                                                        at com.google.firebase.provider.FirebaseInitProvider.zza(Unknown Source)                                                        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)                                                        at android.app.ActivityThread.installProvider(ActivityThread.java:4964)                                                        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4559)                                                        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4499)                                                        at android.app.ActivityThread.access$1500(ActivityThread.java:144)                                                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)                                                        at android.os.Handler.dispatchMessage(Handler.java:102)                                                        at android.os.Looper.loop(Looper.java:135)                                                        at android.app.ActivityThread.main(ActivityThread.java:5221)                                                        at java.lang.reflect.Method.invoke(Native Method)                                                        at java.lang.reflect.Method.invoke(Method.java:372)                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Here is the log crash when I launch app after link device info. Could you please to show me solution. Thanks

+1

I had the same problem, check if any other RN plugin using com.google.android.gms:play-services. In my case I update react-native-firestack and there is now compile 'com.google.android.gms:play-services-base:9.8.0' in build.gradle file, so I change version in react-native-device-info to compile 'com.google.android.gms:play-services-gcm:9.8.0'.
Hope that will help you :)

Do this steps:
Go to your project -> node_modules -> react-native-device-info -> android
Open build.gradle file
change this line
compile 'com.google.android.gms:play-services-gcm:+'
to
compile 'com.google.android.gms:play-services-gcm:10.2.4'
In the future if you add more package with com.google.android lines in its build.gradle files change the version to whatever version is used by react-native-maps in your project.
You can see the version of react-native-maps in node_modules/react-native-maps/lib/android/build.gradle

Documented how to disable com.google.android.gms in the troubleshooting section.
Will probably be dropped with next BC breaking release.


[Feature] Support Python API for Paimon

Search before asking

[X] I searched in the issues and found nothing similar.

Motivation
Hope to implement a set of python api to support reading and writing paimon tables like iceberg.
Solution
No response
Anything else?
More convenient for ai engineers
Are you willing to submit a PR?

[ ] I'm willing to submit a PR!

Good idea. Waiting for some responses.

Looking forward to it.

Looking forward to it.
A reference is https://github.com/apache/iceberg-python .
besides, could paimon stores and loads data in order. e.g in time order or write order when ingesting data.

I believe that paimon-python could be built on top of paimon-rust, as discussed in https://github.com/apache/paimon/issues/3674. By sharing the same core, we can avoid implementing the same specifications twice.


Add Impulse Switches and Position Sensor

This adds impulse switches and position sensors.
Please test thoroughly, if this does not break other switches/plugs.

Additional linebreaks were added by vscode automatically on saving...

Thanks for the PR. I am unable to test this because I am not a homee user anymore. However, the changes look good to me. If there are any problems, it is still possible to roll back to an earlier version, so no worries.

Actually, I just realized, we might need to make sure the latest version of pymee is included.

For me, HA installed the latest version on reboot.

I just bumped pymee in the manifest to the latest version so should be all good now: 90a037e

Great thanks.
When working on the code, I noticed some Deprecation notices from HA.
Is it ok, If I address these in a next step?
Don't want to work too much in your code without your approval...

Feel free to do whatever you want. This is open source for a reason. I don't really have any stakes in this project anymore. I will keep passively maintaining if it is not too much work. If you however are planning to make major changes that would require a lot of work to test/review I would probably encourage you to fork the project, since I won't invest too much time in this here anymore.


File-log says permission denied when trying to log to /dev/stdout.

Is there an existing issue for this?

[X] I have searched the existing issues

Kong version ($ kong version)
2.4.1
Current Behavior
I am running Kong on Kubernetes as a docker container, and I want the logs generated by file-log to be shown in the stdout of the docker container.
Currently, it is being logged onto a file and not to the container logs, as a result, my default Graylog is not able to scrape those logs easily. Any ideas on how to do this?
I went through the file-log official documentation. It says You can also specify streams (for example, /dev/stdout and /dev/stderr), which is especially useful when running Kong in Kubernetes. , but the exact process is not specified.
Currently, I am logging into /usr/local/kong/logs/requestDetails.log after chmod 777 on this file.
I tried doing the same for the path /dev/stdout but after the API call, file-log gives me the error permission denied again (I think chmod is not working here as it is not a proper file).
Any help will be highly appreciated.
Expected Behavior
No response
Steps To Reproduce
Enable the file-log plugin with the parameter path = /dev/stdout while running Kong in a docker container. You will get a permission denied error in your container logs.

Anything else?
No response

Maybe related to https://github.com/Kong/kong/issues/6778. What user is your Kong workers running as and what's the permission on /dev/stdout?

Hey @dndx, this is the permission on /dev/stdout -
lrwxrwxrwx    1 root     root            15 Nov 10 13:16 /dev/stdout -> /proc/self/fd/1

What's the permission on /proc/self/fd/1 like?


Add years to production dates for all 260 and 264

This is for subfield $c: Date of publication, distribution, etc for both MARC fields.
https://www.loc.gov/marc/bibliographic/bd260.html
https://www.loc.gov/marc/bibliographic/bd264.html

Interestingly when I search the production.dates.label for [0-9]{4} I get 1039991 of 1262588(82%).


Yii2 listview with masonry

hi,
i am using trying to use this Extension with Listview from Yii2 then the issues are {summery} and {pagination} are not rendered correct ... because of the positions ... they are in background..
maybe u can implement this extension for yii2 listview also.
Thank you

I'll combine this extension with the listview ajaxscroll extension which dynamically loads new tiles... I'll write an example..:)

amazing :D

kop/yii2-scroll-pager
Just put the listview inside the begin and end and change the template


Add function to create/delete multiple resources in a single file

Add a function that will create or delete all Kubernetes resources defined in a given file. These newly created resources cannot be uniquely identified by only filename, so other Kubedog steps will not be able to target them. The function splits up large Kubernetes files by loading the entire file into memory, then calling string.Split() on it. The separator used is "\n---". The largest file I've tested this on is 14k lines long.

It would be good to log what resources are being created/deleted, I tested it and saw no logs.
godog
Feature: Kubedog
INFO[0000] [KUBEDOG] Credentials: arn:aws:sts::663374536332:assumed-role/PowerUser/IntuitOlympus-agaro-50002266530-1628196094463

  Scenario: Test                             # features/test.feature:3
    Given valid AWS Credentials              # aws.go:142 -> *Client
    And a Kubernetes cluster                 # kube.go:67 -> *Client
    * create resources in argo-rollouts.yaml # kube.go:135 -> *Client

1 scenarios (1 passed)
3 steps (3 passed)
2m13.189667665s

I added logging of resource creation/deletion.

@Kyle-Wong Sorry, I was trying to suggest logging when the resources are already created/deleted but accidentally committed the changes directly to the PR. Let me know if you are ok with that, if not feel free to revert them.

It's fine. Logging resources that are already created/deleted is useful; I just didn't add that because there was no logging prior to my code and I'm not quite clear on how much logging should occur during these cucumber tests.


Adding school sacre coeur

School official website: https://www.styves-sacrecoeurlasalle.bzh/
Page where formation are displayed: https://www.styves-sacrecoeurlasalle.bzh/documents-a-telecharger/organigramme_2021.pdf
In fact multiple formation have computer science in it.
Proof of the domain: From the contact page of the website : https://www.styves-sacrecoeurlasalle.bzh/contacts and also from the following government website : https://www.education.gouv.fr/annuaire/22003/saint-brieuc/lycee/0220117h/lycee-polyvalent-sacre-coeur-la-salle.html

@dersyp First stage of verification passed, official domain is styves-sacrecoeurlasalle.bzh as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision. Proof of domain ownership: https://www.styves-sacrecoeurlasalle.bzh/

Pull request merged. Thank you!


Fix typo

Description
I have corrected tiny typos.
General Checklist:
Please ensure the following points are checked:

[x] My code follows the coding style
[x] I have reviewed file licenses
[x] I have updated the header Copyright to reflect the current year (CI build will fail if Copyright is out of date)
[x] I have commented any added functions (in line with Doxygen)
[x] I have commented any code that could be hard to understand
[x] My changes do not add any new compiler warnings
[x] My changes do not add any new validation layer errors or warnings
[x] I have used existing framework/helper functions where possible
[x] My changes build on Windows, Linux, macOS and Android. Otherwise I have documented any exceptions
[x] My changes do not add any regressions
[x] I have tested every sample to ensure everything runs correctly
[x] This PR describes the scope and expected impact of the changes I am making

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

I have resolved the conflict for a new commit to main. Sorry for canceling the approval. Could you check it again? @tomadamatkinson @SaschaWillems @gpx1000

Merging on three approvals. This should not clash with the Markdown fixes in previous PRs


Selecting using mouse doesn't work on some lines with transform: scale

monaco-editor version: latest on Playground
Browser: Edgium
OS: Windows
Playground code that reproduces the issue:
JS:
monaco.editor.create(document.getElementById("container"), {
	value: `using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;`,
	language: "csharp"
});

CSS:
body {
    transform: scale(0.8);
}

With the above CSS, selecting some lines of code using the mouse does not work. Specifically, it happens for me for line 8 in the above code.

I faced the same issue. The cursor position is also not aligned properly. This is the monaco editor playground code I used to recreate the issue.
HTML

JS
monaco.editor.create(document.getElementById("container"), {
	value: "console.log('hello')",
	language: "javascript"
});

I have the same issue in my app.  Would anyone with knowledge of the VS code internals be interested in a bug bounty for this?
I think the issue occurs with any CSS transform rule, so it appears to be the same issue as https://github.com/microsoft/monaco-editor/issues/531 which contains a tip from @alexdima on where to start.

Hitting the same issue as we are using zoom-pan-pinch to allow the user to zoom in and out.
Currently there are severe issues with cursor and selection positioning within the editor when the CSS scale is not 1

This is related to https://github.com/microsoft/vscode/issues/139281 and related PR https://github.com/microsoft/vscode/pull/139282. It fixes the rendering of decorations, carets etc in a scaled element.


bezier_patch_degenerate & vnf_tri_array

These functions are hiding in rounding.scad right now.  They enable triangular sampling for degenerate quadrilateral bezier patches.  Do we want to expose and document these (presumably in beziers.scad) or make them "officially" hidden.

Made these public.


fix/update documents

✨ fix README.md

add shortcuts for showing the status on GitHub Actions and Packagist

add reference link for Composer

remove redundant description on installation because the default value for the SSL setting is true already
https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/README.md?plain=1#L31

add Jump To shortcuts for each part of README

🎈  fix .github/CONTRIBUTING.md

fix the wrong command for generating the coverage report in HTML format
https://github.com/amadeus4dev/amadeus-php/blob/324073f3ea3a57499b5bb0a15addfdce2f30eb95/.github/CONTRIBUTING.md?plain=1#L23

add the option command for generating the coverage report in text format vendor/bin/phpunit --coverage-text

🤣 fix composer.json

remove the redundant namespace registration on autoload-dev part

Thanks @xianqiliu  :)


[com.google.fonts/check/soft_hyphen] improve rationale

Observed behaviour
⚠ WARN: Does the font contain a soft hyphen? (com.google.fonts/check/soft_hyphen)
⚠ WARN This font has a 'Soft Hyphen' character. [code: softhyphen]
Expected behaviour
The check doesn't say what should be done with the soft hyphen. I would propose:
"The softhyphen is sometimes designed empty with no width (such as a control character), sometimes the same as the traditional hyphen, sometimes double encoded with the hyphen. That being said, it is recommended to not include it in the font at all, because discretionary hyphenation should be handled at the level of the shaping engine, not the font. Also, even if present, the software would no display that character. More discussion here https://typedrawers.com/discussion/2046/special-dash-things-softhyphen-horizontalbar and here https://github.com/googlefonts/fontbakery/issues/3486"
cc @vv-monsalve @twardoch thumbs up if you agree

Also, is it your intent to always report it as a WARN if it simply exists? Seems to me that the report should be:

INFO: if u00AD is present and is at zero width with no outlines, as expected
WARN: if u00AD is present but there is an outline or it is double encoded to u002D (hyphen)
FAIL: if not present

@RosaWagner and others, what do you think aobut what @glenda-tn just said?

@felipesanches maybe there was a confusion from my part between rationale/message; I would have liked to make the message about what to do when rationale are not displayed in report (such as in GF repo)
⚠ WARN This font has a 'Soft Hyphen' character. [code: softhyphen] Please consider removing it from the font.
@glenda-tn, we don't want soft hyphen to be present. If the soft hyphen is not present, then it is a PASS.

@glenda-tn, are you OK with the approach that Rosalie proposed in her last message?

oooh! I didn't realize Google actually wants the char to be removed.
At TN, we are following the Unicode definition as I had posted in #4046 and repeat here:

Unlike U+2010 HYPHEN, which always has a visible rendition, the character U+00AD SOFT HYPHEN (SHY) is an invisible format character that merely indicates a preferred intraword line break position. If the line is broken at that point, then whatever mechanism is appropriate for intraword line breaks should be invoked, just as if the line break had been triggered by another hyphenation mechanism, such as a dictionary lookup. Depending on the language and the word, that may produce different visible results…

At Type Network, a year ago we actually had to add uni00AD to a typeface for a client because:

Due to problems with hyphenation in printing (Office 365) documents a developer found out that the [TypeNetwork fonts] do not support soft hyphen characters ((unicode: \u00AD)

I apologize, I had misunderstood your intent with the check. Now I get that you don't actually want it in the font. That said, then your rationale is fine and clarifying. At TN, we will continue to require it, but at 0 width, with no outlines.
Thanks for your attention to this.

@felipesanches To keep the check Universal, I would think that following the Unicode spec is the correct thing to do and use the INFO, WARN, FAIL results that I posted above. The original rationale was fine though I might cross out the last sentence.

This font has a 'Soft Hyphen' character (codepoint 0x00AD) which is supposed to be zero-width and invisible, and is used to mark a hyphenation possibility within a word in the absence of or overriding dictionary hyphenation. It is mostly an obsolete mechanism now, and the character is only included in fonts for legacy codepage coverage. [code: softhyphen]

To have more clout, I might add the quote from Unicode page to the above. (quote copy is in my previous comment)

Another thing to keep in mind is the fact that the checks in the universal profile are things that go beyond what the OpenType spec dictates.
So, we have checks in the opentype profile for things that the spec requires or recommends, and then the universal profile is for additional aspects that are not covered by the spec but that are generally established as good practices in the type design community.

I once made a font which had a glyph associated with the soft hyphen Unicode. The glyph looked like hyphen but had a negative sidebearing so that the hyphen would stick out a bit at the hyphenation point.
I observed that most implementations ignored that glyph and displayed the actual hyphen glyph at the end of the line, but at least one app* did display the glyph associated with the soft hyphen Unicode — which is what I actually wanted. But I did not test what would happen if the font did not include a glyph there. But my conclusion was that it was safer if the soft hyphen Unicode is supported by the font cmap — be it as a separate glyph or as an additional mapping to the hyphen glyph.
*) Unfortunately I longer remember which app it was

Great! It sounds like we're reaching consensus on this for the universal profile then!
I'll incorporate these proposed changes. Thanks!

@RosaWagner I do not know anything further about the client usage... this was over a year ago and we simply made it a point that going forward, we would require the code point.
I agree with @twardoch's earlier comment upthread in that the code point, 00AD, should be present in fonts. There are likely many existing documents that use it. While some apps/browsers may ignore it, there are probably some out there that don't and so there is risk of the .notdef showing up if the code point is missing from a font.
Another point to note is that the softhyphen is used in other languages and connected scripts, like Arabic. From the same Unicode link I've been referring to but written further down the page is this:

Hyphenation, and therefore the SHY, can be used with the Arabic script. If the rendering system breaks at that point, the display—including shaping—should be what is appropriate for the given language. For example, sometimes a hyphen-like mark is placed on the end of the line. This mark looks like a kashida, but is not connected to the letter preceding it. Instead, the appearance of the mark is as if it had been placed—and the line divided—after the contextual shapes for the line have been determined. For more information on shaping, see [UAX9] and Section 9.2, Arabic, of [Unicode].

That said, I do not think the absent code point should be a PASS, but rather, a FAIL.

PASS if soft hyphen is absent
PASS if soft hyphen is present with 0-width and no outline
FAIL if softhyphen is present with contour with suggestion to either remove it for recent environments or leave it but invisible for backward compatibility.

From our previous tests and the new ones Rosalie has performed, I would support this.
However, since we are discussing a Universal profile check, I would like to hear from @tiroj, who provided the first argument we take for the previous issue.

I think I would be inclined to go with

WARN or INFO if soft hyphen is absent
PASS if soft hyphen is present with 0-width and no outline
FAIL if softhyphen is present with contour with suggestion to either remove it for recent environments or leave it but invisible for backward compatibility

While soft hyphen not being present is likely to be fine in most instances, there are edge cases where it could be either desired or recommended for accurate Windows codepage coverage.
There are a lot of fonts in the wild that have visible soft-hyphen glyphs, or that dual-map the /hyphen glyph to U+00AD, since many people are confused about the purpose of the character. I made a few myself before Khaled set me right a few years ago.

There are a lot of fonts in the wild that have visible soft-hyphen glyphs, or that dual-map the /hyphen glyph to U+00AD, since many people are confused about the purpose of the character.

This. Noto, Roboto and RobotoFlex, Segoe, SF Symbols, and so many other Google fonts all have a visible contour or are dble-encoded. I have looked at so many. I only know of SF Pro that completely omits the code point.
I would be fine eith @tiroj's rationale for the Universal profile.

Another point to note is that the softhyphen is used in other languages and connected scripts, like Arabic. From the same Unicode link I've been referring to but written further down the page is this:

Hyphenation, and therefore the SHY, can be used with the Arabic script. If the rendering system breaks at that point, the display—including shaping—should be what is appropriate for the given language. For example, sometimes a hyphen-like mark is placed on the end of the line.

This is true, in theory: the Uyghur language, at least, uses the Arabic script and supports hyphenation. But I am not sure that it is true in practice. I don't think that any layout system correctly implements hyphenation for Arabic. (Apart from my own SILE typesetter. ;-)


<script/binary>: print more information when building

remove all old binary, put new binary in $GOROOT/bin, print more informations when building

@andresmgot Now I put all binary under GOBIN.

@andresmgot
# Build binary
go install \
    "${BUILD_FLAGS[@]}" \
    github.com/kubeless/kubeless/cmd/...

i notice this command will build kubelss,kafka-trigger-controller,kubeless-controller-manager,nats-trigger-controller. before build,i remove all old binary.
In my computer, I fould all binary would be put under GOBIN.So i got a little confused.

@andresmgot
I wiil rewrite this script make sure all binary put under GOPATH

I see, in any case the binaries will be always overwritten. Thanks for your contribution.


[FEATURE] Support DvP Contract

Is your feature request related to a problem? Please describe.

https://github.com/BoostryJP/ibet-SmartContract/issues/428

Describe the solution you'd like

Support DvP Contract

API Specifications
DVP Delivery Agent Management

GET: /dvp/agent/accounts

This is an endpoint to list all delivery agent accounts.

POST: /dvp/agent/accounts

This is an endpoint to create an agent accounts.

GET: /dvp/agent/account/{account_address}

This is an endpoint to retrieve the agent accounts.

DELETE: /dvp/agent/account/{account_address}

This is an endpoint to delete the agent accounts.

POST: /dvp/agent/account/{account_address}/eoa_password

This is an endpoint to change the EOA password of the account.

DVP Delivery Operation

GET: /dvp/{exchange_address}/deliveries

This is an endpoint to list all deliveries on the DVP contract.

POST: /dvp/{exchange_address}/deliveries

This is an endpoint to create new delivery.
This would be called from Issuer.

GET: /dvp/{exchange_address}/delivery/{delivery_id}

This is an endpoint to retrieve the delivery of given delivery id

POST: /dvp/{exchange_address}/delivery/{delivery_id}

This is an endpoint to Cancel, Finish, Abort the delivery of given delivery id.
This would be called from issuer when the delivery is to be canceled, and from agent when the delivery is to be finished or aborted.


Constant integers do not overflow for larger values

Description:
$title. This happens only when we initialize constants with expressions.
Steps to reproduce:
import ballerina/io;

const int X = int:MAX_VALUE + 2;

public function main() {
    io:println(X); // current output: -9223372036854775807
}

Affected Versions:
SL Beta6 RC1

Related to https://github.com/ballerina-platform/ballerina-lang/issues/36538


identity: deflake test TestGetIdentity

Currently, the test TestGetIdentity fails with the following error.
--- FAIL: TestGetIdentity (0.85s)
    --- FAIL: TestGetIdentity/Multiple_identities (0.26s)
        identity_test.go:226: Identity not found in the store

The reason is that the addition of the test identities might not be reflected in the backend - even if we wait for some time in a wait loop.
Therefore, this commit introduces a proper wait with a sync.WaitGroup before starting to check the identities in the backend.
Follow up of: #29720
Fixes: #23856

/test


curl: 8.1.2 -> 8.2.0

Description of changes
https://curl.se/changes.html#8_2_0
Fixes CVE-2023-32001

Things done

Built on platform(s)

[x] x86_64-linux
[x] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

23.05 is on curl 8.0.1 and we only backport security patches, not full releases, for it.

Appiled the patch instead for 23.05: #244475

Successfully built most of passthru.tests on macos 10.15 (only limited by time)

@Izorkin: curlHTTP3 broke.  I suspect it will need some tweaks around ngtcp2 and nghttp3 versions.
https://hydra.nixos.org/build/229854064/nixlog/2/tail
https://github.com/curl/curl/commit/993b14900ac1b6b6c153003ffc5cbccb39eef2ea
I hope these breakages will improve after the soon-to-come ngtcp2 1.0.

@vcunat needed this PR - https://github.com/NixOS/nixpkgs/pull/236613


Elekta iCom-Vx - need to test ways to automatically push files from the linac to the network

Help pls...

is it .trf file?

Can we put it manually?
Did you try this: https://github.com/pymedphys/pymedphys/issues/849

https://docs.pymedphys.com/en/latest/users/ref/cli/icom.html

Yes, but not in this version, I can add them in... They are currently disabled. I wrote a standalone application that maybe more useful that lets you manually load the Elekta log files so I will finish that and upload it this week
…
________________________________ From: zism @.> Sent: Friday, April 12, 2024 8:06:10 AM To: IsoAnalytica/Sentinel-Public @.> Cc: Leon Dunn @.>; Author @.> Subject: Re: [IsoAnalytica/Sentinel-Public] Elekta iCom-Vx - need to test ways to automatically push files from the linac to the network (Issue #1) Can we put it manually? Did you try this: pymedphys/pymedphys#849<pymedphys/pymedphys#849> — Reply to this email directly, view it on GitHub<#1 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYGWY34UHUFFEUR3XCYAAMDY44CNFAVCNFSM6AAAAABDNRU3AOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJQGYZTMOJYGI. You are receiving this because you authored the thread.Message ID: @.***>

I'm interested to test it and give you feed back.

I'm working on trf file actually. I do not try iCom connectivity yet. So it'll be the next step

24_03_24 14_34_26 Z A_Arc1.zip

Did you succeed? I'm waiting your return


[Event Request] codeunit 5895 (Inventory Adjustment)

Dear ALAppExtensions team,
There are situations when we need to limit the execution time of the report 795 (Adjust Cost - Item Entries). To do this, please add an integration event to the MakeSingleLevelAdjmt function in codeunit 5895 (Inventory Adjustment) with the ability to pass additional parameter (for example, run duration or stop time).
In C/AL it looks like this:

Can you please be more specific and provide event definition, list of parameters and location in the code?

I see such implementation:

In the codeunit 5895 add global variable StopTime (datetime)
At the end of local procedure InitializeAdjmt (cu5895) add integration event OnAfterInitializeAdjmt(var StopTime :datetime)  and we will be able to initialize new variable
At the local procedure MakeSingleLevelAdjmt (cu5895) add integration event
OnAfterItemAdjmt(var Item : Record «Item»)

In this way we can interrupt processing and not wait for processing all items.

Hi,
i would suggest an additional parameter for the suggested event "OnAfterItemAdjmt" - please consider the Boolean "IsOnlineAdjmt".
Thanks

Hi,
I think an additional parameter is always useful. Thank you for your response.


Handle nil return from TF_TensorData

With some memory allocators, attempting to allocate 0 bytes will return
a null pointer. This specifically happens when building tensorflow with
mkl support. If TF_TensorData returns null, the go code to create a
slice from the data leads to a null pointer exception. This fixes the
issue by checking for the nil return and returning a slice zero value to
(nil) to the caller. Fixes #13764.

Can one of the admins verify this patch?

To clarify, the null pointer is created by the memory allocator in TF_AllocateTensor, but it is returned to the go side via TF_TensorData

Jenkins, test this please


tache3 [1075]

Migrated from https://hub.jazz.net/ccm44/resource/itemName/com.ibm.team.workitem.WorkItem/1075