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

[WIP] Add packages for packagekit and polkit #2631

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 15 additions & 13 deletions lib/spack/spack/build_systems/autotools.py
Expand Up @@ -91,8 +91,6 @@ class AutotoolsPackage(PackageBase):

#: Set to true to force the autoreconf step even if configure is present
force_autoreconf = False
#: Options to be passed to autoreconf when using the default implementation
autoreconf_extra_args = []

def _do_patch_config_guess(self):
"""Some packages ship with an older config.guess and need to have
Expand Down Expand Up @@ -205,27 +203,31 @@ def autoreconf(self, spec, prefix):
if missing:
msg = 'Cannot generate configure: missing dependencies {0}'
raise RuntimeError(msg.format(missing))

tty.msg('Configure script not found: trying to generate it')
tty.warn('*********************************************************')
tty.warn('* If the default procedure fails, consider implementing *')
tty.warn('* a custom AUTORECONF phase in the package *')
tty.warn('*********************************************************')

with working_dir(self.configure_directory):
m = inspect.getmodule(self)
# This part should be redundant in principle, but
# won't hurt
m.libtoolize()
m.aclocal()
# This line is what is needed most of the time
# --install, --verbose, --force
autoreconf_args = ['-ivf']
m4_includes = []
if 'pkg-config' in spec:
autoreconf_args += [
m4_includes += [
'-I',
join_path(spec['pkg-config'].prefix, 'share', 'aclocal'),
]
autoreconf_args += self.autoreconf_extra_args
m.autoreconf(*autoreconf_args)
if 'gettext' in spec:
m4_includes += [
'-I',
join_path(spec['gettext'].prefix, 'share', 'aclocal'),
]

m = inspect.getmodule(self)

m.libtoolize()
m.aclocal(*m4_includes)
m.autoreconf('--install', '--verbose', '--force', *m4_includes)

@run_after('autoreconf')
def set_configure_or_die(self):
Expand Down
62 changes: 62 additions & 0 deletions var/spack/repos/builtin/packages/glibc/package.py
@@ -0,0 +1,62 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *


class Glibc(AutotoolsPackage):
"""The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system. It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system."""

homepage = "https://www.gnu.org/software/libc/"
url = "http://open-source-box.org/glibc/glibc-2.25.tar.gz"

version('2.25', '0c9f827298841dbf3bff3060f3d7f19c')

depends_on('linux-headers@3.2.0:')
depends_on('binutils@2.22:')

# TODO: Add a 'test' deptype
# depends_on('python@2.7.6:2.8,3.4.3:', type='test')
# depends_on('py-pexpect@4.0', type='test')
# depends_on('gdb@7.8:', type='test')

build_directory = 'spack-build'

def configure_args(self):
spec = self.spec
return [
'--disable-debug',
'--disable-dependency-tracking',
'--disable-silent-rules',
'--enable-obsolete-rpc',
# Fix error: selinux/selinux.h: No such file or directory
'--without-selinux',
'--enable-kernel={0}'.format(spec['linux-headers'].version),
'--with-binutils={0}'.format(spec['binutils'].prefix.bin),
'--with-headers={0}'.format(spec['linux-headers'].prefix.include),
]
4 changes: 1 addition & 3 deletions var/spack/repos/builtin/packages/mesa/package.py
Expand Up @@ -50,12 +50,10 @@ class Mesa(AutotoolsPackage):
depends_on('libxext')
depends_on('libxdamage')
depends_on('libxfixes')
depends_on('systemd')

depends_on('glproto@1.4.14:', type='build')
depends_on('dri2proto@2.6:', type='build')
depends_on('dri3proto@1.0:', type='build')
depends_on('presentproto@1.0:', type='build')
depends_on('pkg-config@0.9.0:', type='build')

# TODO: Add package for systemd, provides libudev
# Using the system package manager to install systemd didn't work for me
64 changes: 64 additions & 0 deletions var/spack/repos/builtin/packages/packagekit/package.py
@@ -0,0 +1,64 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *


class Packagekit(AutotoolsPackage):
"""PackageKit is a system designed to make installing and updating
software on your computer easier."""

homepage = "https://www.freedesktop.org/software/PackageKit/"
url = "https://www.freedesktop.org/software/PackageKit/releases/PackageKit-1.1.4.tar.xz"

version('1.1.4', 'd1a000a33c7c935522af7a01dea012bf')

variant('gtk', default=False, description='Build GTK+-3 module functionality')

depends_on('glib@2.46.0:')
depends_on('sqlite')
depends_on('polkit@0.98:')
depends_on('systemd')
depends_on('gobject-introspection')
depends_on('bash-completion@2.0:')
depends_on('gtkplus', when='+gtk')

depends_on('pkg-config@0.9.0:', type='build')
depends_on('intltool@0.35.0:', type='build')
depends_on('gettext', type='build')
depends_on('msgpack-c', type='build')
depends_on('python@2.7:', type='build')

# requires XML::Parser perl module
# depends_on('perl@5.8.1:', type='build')

def configure_args(self):
args = []

if '+gtk' in self.spec:
args.append('--enable-gtk-module')
else:
args.append('--disable-gtk-module')

return args
43 changes: 43 additions & 0 deletions var/spack/repos/builtin/packages/polkit/package.py
@@ -0,0 +1,43 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *


class Polkit(AutotoolsPackage):
"""polkit is a toolkit for defining and handling authorizations. It is used
for allowing unprivileged processes to speak to privileged processes."""

homepage = "https://www.freedesktop.org/wiki/Software/polkit/"
url = "https://www.freedesktop.org/software/polkit/releases/polkit-0.113.tar.gz"

version('master', git='git://anongit.freedesktop.org/git/polkit')
version('0.113', '4b77776c9e4f897dcfe03b2c34198edf')

depends_on('expat')
depends_on('mozjs@24.2.0', when='@master')
depends_on('mozjs@1.8.5,17.0.0', when='@0.113')
depends_on('pkg-config@0.9.0:', type='build')
depends_on('glib@2.30.0:', type='build')
depends_on('systemd')
62 changes: 62 additions & 0 deletions var/spack/repos/builtin/packages/systemd/package.py
@@ -0,0 +1,62 @@
##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *


class Systemd(AutotoolsPackage):
"""systemd is a suite of basic building blocks for a Linux system.
It provides a system and service manager that runs as PID 1 and starts
the rest of the system."""

homepage = "https://www.freedesktop.org/wiki/Software/systemd/"
url = "https://github.com/systemd/systemd/archive/v232.tar.gz"

version('232', '3e3a0b14050eff62e68be72142181730')

depends_on('glibc@2.16:')
depends_on('libcap')
depends_on('util-linux@2.27.1:')

depends_on('pkg-config@0.9.0:', type='build')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
depends_on('libtool', type='build')
depends_on('m4', type='build')
depends_on('intltool@0.40.0:', type='build')
depends_on('gettext', type='build')
depends_on('coreutils', type='build')
depends_on('python', type='build')

# requires XML::Parser perl module
# depends_on('perl@5.8.1:', type='build')

def autoreconf(self, spec, prefix):
libtoolize()
intltoolize('--force', '--automake')
autoreconf(
'--force', '--install', '--symlink',
'-I', join_path(spec['pkg-config'].prefix, 'share', 'aclocal'),
'-I', join_path(spec['gettext'].prefix, 'share', 'aclocal')
)