Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite: Raising max variable number and max expr depth values #36293

Closed
wants to merge 182 commits into from
Closed

sqlite: Raising max variable number and max expr depth values #36293

wants to merge 182 commits into from

Conversation

sjau
Copy link

@sjau sjau commented Mar 4, 2018

Motivation for this change

I've been having troubles with Flexget and it seems (one of) the problems is that SQLite does have a rather low number of max variables. Having a look at Arch, they have a significantly higher value for maximum variables. Default is 1000 and in arch they have 250 000: https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/sqlite#n36

At the same time it also seems a good idea to also raise the max expr depth to the same value as Arch.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

MERCIER Michael and others added 30 commits September 13, 2017 10:59
This factors out the functionality in nixos-install for running a
command inside a NixOS installation (nixos-install --chroot).
The use of Nix 2.0 significantly simplifies the installer, since we
can just pass a different store URI (--store /mnt) - it's no longer
needed to set up a chroot environment for the build, and to bootstrap
Nix into the chroot.

Also, commands that need to run in the installation (namely boot
loader installation and setting a root password) are now executed
using nixos-enter.

This also removes the need for nixos-prepare-root since any required
initialisation is done by Nix or by the activation script.
It requires the existence of /proc.
The activation script already does this.
...so it appears in a new installation before rebooting the system.
the new version brings a new panel in IPsec settings which allows to
reenable old algorithms for IPsec phases 1/2 (dropped in recent libreswan/strongswan etc).

Also updates the homepage with the new one.
l2tp saves its secrets into /etc/ipsec.d but strongswan would not read
them. l2tp checks for /etc/ipsec.secrets includes /etc/ipsec.d and if
not tries to write into it.

Solution:
Have the strongswan module create /etc/ipsec.d and /etc/ipsec.secrets
when networkmanager_l2tp is installed.
Include /etc/ipsec.secrets in
/nix/store/hash-strongswan/etc/ipsec.secrets so that it can find l2tp
secrets.

Also when the ppp 'nopeerdns' option is used, the DNS resolver tries to
write into an alternate file /etc/ppp/resolv.conf. This fails when
/etc/ppp does not exist so the module creates it by default.
The boot test now runs "nix verify" to ensure that all hashes are
correct.
E.g.

  nixos-install --root /tmp/mnt/ --no-bootloader --no-root-passwd

now works for non-root users.
This is already provided by devtmpfs.
Of course, you'll get a bunch of warnings from the activation script:

  $ nixos-enter --root /tmp/mnt/
  setting up /etc...
  mount: /dev: permission denied.
  mount: /dev/pts: permission denied.
  mount: /dev/shm: permission denied.
  mount: /sys: permission denied.
  /nix/var/nix/profiles/system/activate: line 74: /proc/sys/kernel/modprobe: Permission denied
  chown: changing ownership of '/run/wrappers/wrappers.0pKlU8JsvV/dbus-daemon-launch-helper': Invalid argument
  NOTE: Under Linux, effective file capabilities must either be empty, or
        exactly match the union of selected permitted and inheritable bits.
  Failed to set capabilities on file `/run/wrappers/wrappers.0pKlU8JsvV/ping' (Operation not permitted)
  chown: changing ownership of '/run/wrappers/wrappers.0pKlU8JsvV/unix_chkpwd': Invalid argument

  [root@nixos:/]#
This is useful in tests where we don't have network access. Passing
--substituters "" prevents wasting time by checking cache.nixos.org.
Since nixos-install doesn't require any special privileges anymore,
this Just Works. No more need for fakeroot / nixos-prepare-root.
This is no longer needed thanks to Nix 2.0 magic.
protocol really is a "buildPythonApplication" rather than a
buildPythonPackage".
Copy link
Member

@Mic92 Mic92 left a comment

Choose a reason for hiding this comment

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

should go to the staging branch first though.

@sjau
Copy link
Author

sjau commented Mar 5, 2018

What do you mean by staging branch?

Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

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

Other distributions like Debian are doing the same.

@fpletz
Copy link
Member

fpletz commented Mar 5, 2018

@sjau We have a branch called staging that is used for mass rebuilds before pushing them to master. Hydra has a jobset for staging. When we merge staging into master all packages are already built. You just need to rebase your commit onto staging and change the target branch of this PR (below the title).

@sjau
Copy link
Author

sjau commented Mar 5, 2018

And how to do that?

Mic92 pushed a commit that referenced this pull request Mar 5, 2018
@Mic92
Copy link
Member

Mic92 commented Mar 5, 2018

There is an edit button next to the pull request title. I have pushed the commit now to staging myself and this pull request will be closed automatically once the commit is merged back into staging.

@sjau
Copy link
Author

sjau commented Mar 5, 2018

No idea why now errors appear....

@sjau sjau closed this Mar 5, 2018
@sjau
Copy link
Author

sjau commented Mar 6, 2018

Why did suddenly so many other things come in here? It was just a simple PR with some SQLite compile settings altered....

@Mic92
Copy link
Member

Mic92 commented Mar 6, 2018

you changed the base without rebasing locally. This means you attempt, you pushed all commits from master to staging.

@sjau
Copy link
Author

sjau commented Mar 6, 2018

<-- https://xkcd.com/1597/

andir pushed a commit to andir/nixpkgs that referenced this pull request May 12, 2018
@teto teto mentioned this pull request Jul 31, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet