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

po4a build stuck in busyloop with services.sssd.enable #71296

Closed
ethorsoe opened this issue Oct 17, 2019 · 11 comments · Fixed by #72170
Closed

po4a build stuck in busyloop with services.sssd.enable #71296

ethorsoe opened this issue Oct 17, 2019 · 11 comments · Fixed by #72170

Comments

@ethorsoe
Copy link

Describe the bug
A clear and concise description of what the bug is.
when doing
nixos-rebuild build -I nixos-config=./nix-vmhost.nix -I nixpkgs=/mnt/vmpool/jkarlson/repos/nixpkgs
po4a-0.55 build gets stuck in a busyloop in command
perl po4a --previous --no-translations --msgid-bugs-address devel@lists.po4a.org --package-name po4a --package-version 0.55 po/pod.cfg

This dependency is caused by enabling services.sssd.enable = true;

To Reproduce
Steps to reproduce the behavior:

  1. checkout master or release-19.09 to nixpkgs path
  2. get attached config
  3. run nixos-rebuild build -I nixos-config=./nix-vmhost.nix -I nixpkgs=/path/to/nixpkgs

Expected behavior
build to complete

Additional context
Installing po4a as a normal package just fetches the binary cache, I am not sure where this package actually builds.

Metadata

  • system: "x86_64-linux"
  • host os: Linux 4.19.76, NixOS, 19.09beta606.3ba0d9f75cc (Loris)
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.3
  • channels(root): "nixos-19.09.840.8bf142e001b"
  • channels(jkarlson): "nixos-19.09beta277.21be1354d29"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
po4a
# a list of nixos modules affected by the problem
module:
services.sssd
@ethorsoe
Copy link
Author

nix-vmhost.nix.txt
The config in question.

@Gonzih
Copy link
Contributor

Gonzih commented Oct 17, 2019

I have exactly the same problem on 19.09 due to autofs being enabled on my system (which has sssd as a build dependency).

Based on a command i see in ps it is exactly the same version of po4a: perl po4a --previous --no-translations --msgid-bugs-address devel@lists.po4a.org --package-name po4a --package-version 0.55 po/pod.cfg

@Gonzih
Copy link
Contributor

Gonzih commented Oct 17, 2019

Here is inlined config that @jKarlson posted above

{ pkgs, lib, ... }:
{
  imports = [ /etc/nixos/hardware-configuration.nix ];
  services.sssd.enable = true;
  boot.loader.grub = {
    enable = true;
    version = 2;
    devices = ["/dev/disk/by-id/ata-WDC_WD2003FYYS-02W0B0_WD-WMAY00609086"];
  };
  system.stateVersion = "19.03";
}

@Gonzih
Copy link
Contributor

Gonzih commented Oct 20, 2019

Problem still exists on latest https://nixos.org/channels/nixos-19.09 channel.

@e-user cc you in to this as an original package maintainer, maybe you have some ideas on why this is happening.

@Gonzih
Copy link
Contributor

Gonzih commented Oct 24, 2019

Problem still persists sadly :( Not sure what possible solutions to this would be. Any help on this is appreciated.

@ethorsoe
Copy link
Author

One can apparently just remove Po4a from sssd build inputs, not sure what we would be missing this way.

@c0bw3b
Copy link
Contributor

c0bw3b commented Oct 25, 2019

It's used at build time to produce the documentation in all available languages

@Gonzih
Copy link
Contributor

Gonzih commented Oct 25, 2019

Yeah, maybe that would be a good temporary solution. Having working package beats the lacking documentation I think.

@Gonzih
Copy link
Contributor

Gonzih commented Oct 27, 2019

I solved this on my system by dropping po4a from list of dependencies for sssd:

My overrides:

{ config, pkgs, lib, ... }:

{
  nixpkgs.config = {
    packageOverrides = super:
    let pkgs_ = super.pkgs;
    in rec {
      sssd = pkgs.callPackage ./sssd {
        inherit (pkgs_.python27Packages) ldap;
      };
    };
  };
}

sssd/default.nix:

{ stdenv, fetchurl, glibc, augeas, dnsutils, c-ares, curl,
  cyrus_sasl, ding-libs, libnl, libunistring, nss, samba, nfs-utils, doxygen,
  python, python3, pam, popt, talloc, tdb, tevent, pkgconfig, ldb, openldap,
  pcre, kerberos, cifs-utils, glib, keyutils, dbus, fakeroot, libxslt, libxml2,
  libuuid, ldap, systemd, nspr, check, cmocka, uid_wrapper,
  nss_wrapper, ncurses, http-parser, jansson,
  docbook_xsl, docbook_xml_dtd_44,
  withSudo ? false }:

let
  docbookFiles = "${docbook_xsl}/share/xml/docbook-xsl/catalog.xml:${docbook_xml_dtd_44}/xml/dtd/docbook/catalog.xml";
in
stdenv.mkDerivation rec {
  pname = "sssd";
  version = "1.16.4";

  src = fetchurl {
    url = "https://fedorahosted.org/released/sssd/${pname}-${version}.tar.gz";
    sha256 = "0ngr7cgimyjc6flqkm7psxagp1m4jlzpqkn28pliifbmdg6i5ckb";
  };

  # Something is looking for <libxml/foo.h> instead of <libxml2/libxml/foo.h>
  NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2";

  preConfigure = ''
    export SGML_CATALOG_FILES="${docbookFiles}"
    export PYTHONPATH=${ldap}/lib/python2.7/site-packages
    export PATH=$PATH:${openldap}/libexec

    configureFlagsArray=(
      --prefix=$out
      --sysconfdir=/etc
      --localstatedir=/var
      --enable-pammoddir=$out/lib/security
      --with-os=fedora
      --with-pid-path=/run
      --with-python2-bindings
      --with-python3-bindings
      --with-syslog=journald
      --without-selinux
      --without-semanage
      --with-xml-catalog-path=''${SGML_CATALOG_FILES%%:*}
      --with-ldb-lib-dir=$out/modules/ldb
      --with-nscd=${glibc.bin}/sbin/nscd
    )
  '' + stdenv.lib.optionalString withSudo ''
    configureFlagsArray+=("--with-sudo")
  '';

  enableParallelBuilding = true;
  buildInputs = [ augeas dnsutils c-ares curl cyrus_sasl ding-libs libnl libunistring nss
                  samba nfs-utils doxygen python python3 popt
                  talloc tdb tevent pkgconfig ldb pam openldap pcre kerberos
                  cifs-utils glib keyutils dbus fakeroot libxslt libxml2
                  libuuid ldap systemd nspr check cmocka uid_wrapper
                  nss_wrapper ncurses http-parser jansson ];

  makeFlags = [
    "SGML_CATALOG_FILES=${docbookFiles}"
  ];

  installFlags = [
     "sysconfdir=$(out)/etc"
     "localstatedir=$(out)/var"
     "pidpath=$(out)/run"
     "sss_statedir=$(out)/var/lib/sss"
     "logpath=$(out)/var/log/sssd"
     "pubconfpath=$(out)/var/lib/sss/pubconf"
     "dbpath=$(out)/var/lib/sss/db"
     "mcpath=$(out)/var/lib/sss/mc"
     "pipepath=$(out)/var/lib/sss/pipes"
     "gpocachepath=$(out)/var/lib/sss/gpo_cache"
     "secdbpath=$(out)/var/lib/sss/secrets"
     "initdir=$(out)/rc.d/init"
  ];

  postInstall = ''
    rm -rf "$out"/run
    rm -rf "$out"/rc.d
    rm -f "$out"/modules/ldb/memberof.la
    find "$out" -depth -type d -exec rmdir --ignore-fail-on-non-empty {} \;
  '';

  meta = with stdenv.lib; {
    description = "System Security Services Daemon";
    homepage = https://fedorahosted.org/sssd/;
    license = licenses.gpl3;
    platforms = platforms.linux;
    maintainers = [ maintainers.e-user ];
  };
}

@ethorsoe
Copy link
Author

ethorsoe commented Oct 28, 2019

since you asked (between the lines) whether there was more hacky but shorter way to do this. As Po4a is only used as buildInputs, you can feed it whatever you want without touching sssd files.

  nixpkgs.config = {
    packageOverrides = super:
    let pkgs_ = super.pkgs;
    in rec {
      sssd = pkgs.callPackage <nixpkgs/pkgs/os-specific/linux/sssd> {
        inherit (pkgs_.python27Packages) ldap;
	Po4a = super.pkgs.mbuffer;
      };
    };
  };

c0bw3b added a commit to c0bw3b/nixpkgs that referenced this issue Oct 28, 2019
Fixes NixOS#71296

Term::ReadKey is an optional dependency. From upstream:
> This module is used to retrieve the terminal's line width.
> If it is not present, the line width can be specified with the COLUMN environment variable.
@Gonzih
Copy link
Contributor

Gonzih commented Oct 28, 2019

Oh did not think about that, pretty clever! Will use this instead.

c0bw3b added a commit that referenced this issue Oct 28, 2019
Fixes #71296 (Po4a build get stuck in a loop)

Term::ReadKey is an optional dependency. From upstream:
> This module is used to retrieve the terminal's line width.
> If it is not present, the line width can be specified with the COLUMN environment variable.
@c0bw3b c0bw3b self-assigned this Oct 28, 2019
c0bw3b added a commit that referenced this issue Oct 28, 2019
Backport of #72170
Related issue: #71296 (Po4a build get stuck in a loop)

Term::ReadKey is an optional dependency. From upstream:
> This module is used to retrieve the terminal's line width.
> If it is not present, the line width can be specified with the COLUMN environment variable.
c0bw3b added a commit that referenced this issue Oct 28, 2019
Backport of #72170
Related issue: #71296 (Po4a build get stuck in a loop)

Term::ReadKey is an optional dependency. From upstream:
> This module is used to retrieve the terminal's line width.
> If it is not present, the line width can be specified with the COLUMN environment variable.
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this issue Nov 20, 2019
Fixes NixOS#71296 (Po4a build get stuck in a loop)

Term::ReadKey is an optional dependency. From upstream:
> This module is used to retrieve the terminal's line width.
> If it is not present, the line width can be specified with the COLUMN environment variable.

(cherry picked from commit 97a5c41)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants