diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 351 |
1 files changed, 200 insertions, 151 deletions
@@ -9,145 +9,185 @@ pkgname=(python-ipalib freeipa-common freeipa-client-common freeipa-client) -pkgver=4.4.3 +pkgver=4.5.3 pkgrel=1 pkgdesc='The Identity, Policy and Audit system' arch=('i686' 'x86_64') url='http://www.freeipa.org/' license=('GPL3') -makedepends=('nspr' - 'nss' - 'openssl' - 'openldap' - 'krb5>=1.13' - 'libutil-linux' - 'curl>7.21.7' +makedepends=('openldap' + 'krb5>=1.15.1' 'xmlrpc-c>=1.27.4' 'popt' + 'gettext' 'python' + 'python-setuptools' 'python2' - 'python2-ldap' 'python2-setuptools' + 'nspr' + 'nss' + 'openssl' + 'ding-libs' + 'libsasl' + 'python2-ldap' 'python2-nss' - 'python2-cryptography>=0.9' - 'python2-netaddr' - 'python2-gssapi>=1.1.2' - 'python2-memcached' - 'sssd>=1.14.0' - 'python2-lxml' - 'python2-pyasn1>=0.0.9a' - 'python2-qrcode' - 'python2-dnspython>=1.11.1' - 'systemd' - 'libunistring' - 'python2-yubico>=1.2.3' + 'python2-netaddr>=0.7.16' + 'python2-pyasn1' + 'python2-pyasn1-modules' + 'python2-dnspython' 'python2-six' - 'ding-libs>=0.5.0' - 'python2-dbus' - 'python2-netifaces') -source=("http://freeipa.org/downloads/src/freeipa-$pkgver.tar.gz" - 0001-platform-add-Arch-Linux-platform.patch - 0002-dogtag-vault-do-not-import-pki-in-makeapi.patch - 0003-client-install-do-not-assume-etc-krb5.conf.d-exists.patch) -sha256sums=('7ab844e16ba23dff9c71d47f59f105a8b2fdb6c407a56326c32528e8e7bb0773' - '73bff9f3677b98c09ff45dd8e2aae7080e0f93218956b978d07346005dab7b6b' - 'e797910b18f7ed3063a9a454b261960fda2ab133f79ee070bee16e4745489d03' - 'bc095e230652a8b421bfd1adb546aa4e720bfe8d15f6a9d6872eccac79b3dcbc') + 'sssd>=1.13.0' + 'python2-cffi' + 'python-jinja' + 'python-pyasn1-modules' + 'python2-jinja') +options=(emptydirs) +source=("https://releases.pagure.org/freeipa/freeipa-${pkgver}.tar.gz" + 0001-install-do-not-assume-etc-krb5.conf.d-exists.patch + 0002-platform-add-Arch-Linux-platform.patch + freeipa-client-update-sshd_config + freeipa-client-update-sshd_config.hook) +sha256sums=('94c18793cd4f0b008879afabb69ac52f2d9abad71d8ff3c89260ab5af116b81b' + 'ffdd4de12728fca3732e0782352a046d6317508c68eca0cc048c80cdb9cc4b3e' + 'f30985cdc09070da6c935bc8e3b1f0d870f91766bf6ecdef41815386beccb369' + '9fbac49fa4bc23afe0c4d575ea2795f1da435399289dbd04c5a3ac47580e2a0d' + '1e73f394d276357dcd578df7a349b1f381c9edc7b1c053ecf65f7a9255c0490d') prepare() { - cd "${pkgbase}-${pkgver}" + cd freeipa-${pkgver} - rm -rf ipaplatform/archlinux + rm -rf ipaplatform/arch - patch -p1 <"$srcdir"/0001-platform-add-Arch-Linux-platform.patch - patch -p1 <"$srcdir"/0002-dogtag-vault-do-not-import-pki-in-makeapi.patch - patch -p1 <"$srcdir"/0003-client-install-do-not-assume-etc-krb5.conf.d-exists.patch + patch -p1 -i"$srcdir"/0001-install-do-not-assume-etc-krb5.conf.d-exists.patch + patch -p1 -i"$srcdir"/0002-platform-add-Arch-Linux-platform.patch + + # Workaround: We want to build Python things twice. To be sure we do not mess + # up something, do two separate builds in separate directories. + cp -r ../freeipa-${pkgver} ../freeipa-${pkgver}-python3 } build() { - cd "${pkgbase}-${pkgver}" + cd freeipa-${pkgver} - # Arch specific export PYTHON=/usr/bin/python2 - mkdir -p _install - - export SUPPORTED_PLATFORM=archlinux - - # Force re-generate of platform support - export IPA_VENDOR_VERSION_SUFFIX=-$pkgrel - rm -f ipapython/version.py - rm -f ipaplatform/services.py - rm -f ipaplatform/tasks.py - rm -f ipaplatform/paths.py - rm -f ipaplatform/constants.py - make version-update - cd client; ../autogen.sh --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin; cd .. - - make IPA_VERSION_IS_GIT_SNAPSHOT=no client - - make client-install DESTDIR="$PWD"/_install - - (cd ipalib && make PYTHON=/usr/bin/python3 IPA_VERSION_IS_GIT_SNAPSHOT=no DESTDIR=../_install install) - (cd ipapython && make PYTHON=/usr/bin/python3 IPA_VERSION_IS_GIT_SNAPSHOT=no DESTDIR=../_install install) - (cd ipaplatform && /usr/bin/python3 setup.py install --root ../_install) - (cd ipaclient && /usr/bin/python3 setup.py install --root ../_install) - - # Switch shebang of /usr/bin/ipa - # XXX: ipa cli is not stable enough for enabling py3 support, keep it in py2 - # in any case - sed -i -e'1s/python\(3\|$\)/python2/' _install/usr/bin/ipa - - mkdir -p _install/usr/share/ipa - - mkdir -p _install/etc/ipa/ - mkdir -p _install/etc/ipa/nssdb - mkdir -p _install/var/lib/ipa-client/sysrestore - mkdir -p _install/etc/bash_completion.d - install -pm 644 contrib/completion/ipa.bash_completion _install/etc/bash_completion.d/ipa + # Workaround: make sure all shebangs are pointing to Python 2 + # This should be solved properly using setuptools + # and this hack should be removed. + find \ + ! -name '*.pyc' -a \ + ! -name '*.pyo' -a \ + -type f -exec grep -qsm1 '^#!.*\bpython' {} \; \ + -exec sed -i -e '1 s|^#!.*\bpython[^ ]*|#!/usr/bin/python2|' {} \; + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --sbindir=/usr/bin \ + --with-vendor-suffix=-arch-${pkgrel} \ + --disable-server \ + --without-ipatests \ + --disable-pylint --without-jslint + + make + + pushd ../freeipa-${pkgver}-python3 + export PYTHON=/usr/bin/python3 + # Workaround: make sure all shebangs are pointing to Python 3 + # This should be solved properly using setuptools + # and this hack should be removed. + find \ + ! -name '*.pyc' -a \ + ! -name '*.pyo' -a \ + -type f -exec grep -qsm1 '^#!.*\bpython' {} \; \ + -exec sed -i -e '1 s|^#!.*\bpython[^ ]*|#!/usr/bin/python3|' {} \; + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --sbindir=/usr/bin \ + --with-vendor-suffix=-arch-${pkgrel} \ + --disable-server \ + --without-ipatests \ + --disable-pylint --without-jslint + popd + + mkdir -p ../install + + # Please put as much logic as possible into make install. It allows: + # - easier porting to other distributions + # - rapid devel & install cycle using make install + # (instead of full RPM build and installation each time) + # + # All files and directories created by spec install should be marked as ghost. + # (These are typically configuration files created by IPA installer.) + # All other artifacts should be created by make install. + # + # Exception to this rule are test programs which where want to install + # Python2/3 versions at the same time so we need to rename them. Yuck. + + # Python 3 installation needs to be done first. Subsequent Python 2 install + # will overwrite /usr/bin/ipa and other scripts with variants using + # python2 shebang. + pushd ../freeipa-${pkgver}-python3 + (cd ipaclient && make install DESTDIR=../../install) + (cd ipalib && make install DESTDIR=../../install) + (cd ipaplatform && make install DESTDIR=../../install) + (cd ipapython && make install DESTDIR=../../install) + popd + + # Python 2 installation + make install DESTDIR="$PWD"/../install + + # remove files which are useful only for make uninstall + find ../install -wholename '*/site-packages/*/install_files.txt' -exec rm {} \; + + /bin/touch ../install/etc/ipa/default.conf + /bin/touch ../install/etc/ipa/ca.crt + + mkdir -p ../install/etc/ipa/ + mkdir -p ../install/etc/ipa/nssdb + mkdir -p ../install/var/lib/ipa-client/pki + mkdir -p ../install/var/lib/ipa-client/sysrestore } package_python-ipalib() { pkgdesc='Python libraries used by IPA' arch=('any') depends=("freeipa-common=$pkgver-$pkgrel" - 'python-gssapi>=1.1.2' + 'python-gssapi>=1.2.0' 'gnupg' 'keyutils' 'python-nss>=0.16' - 'python-cryptography>=0.9' - 'python-lxml' - 'python-netaddr' + 'python-cryptography>=1.4' + 'python-netaddr>=0.7.16' 'sssd' 'python-qrcode>=5.0.0' 'python-pyasn1' + 'python-pyasn1-modules' 'python-dateutil' 'python-yubico>=1.2.3' 'python-dbus' 'python-setuptools' 'python-six' 'python-pyldap>=2.4.15' - 'python-dnspython>=1.11.1' + 'python-dnspython>=1.15' 'python-netifaces>=0.10.4' 'python-pyusb') provides=("python-ipapython=$pkgver-$pkgrel" "python-ipaplatform=$pkgver-$pkgrel") - cd "${pkgbase}-${pkgver}" + cd freeipa-${pkgver} - install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README \ + install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README.md \ Contributors.txt local _file - for _file in _install/usr/lib/python3.*/site-packages/ipapython \ - _install/usr/lib/python3.*/site-packages/ipalib \ - _install/usr/lib/python3.*/site-packages/ipaplatform \ - _install/usr/lib/python3.*/site-packages/ipapython-*.egg-info \ - _install/usr/lib/python3.*/site-packages/ipalib-*.egg-info \ - _install/usr/lib/python3.*/site-packages/ipaplatform-*.egg-info + for _file in ../install/usr/lib/python3.*/site-packages/ipapython \ + ../install/usr/lib/python3.*/site-packages/ipalib \ + ../install/usr/lib/python3.*/site-packages/ipaplatform \ + ../install/usr/lib/python3.*/site-packages/ipapython-*.egg-info \ + ../install/usr/lib/python3.*/site-packages/ipalib-*.egg-info \ + ../install/usr/lib/python3.*/site-packages/ipaplatform-*.egg-info do - _file="${_file#_install/}" + _file="${_file#../install/}" mkdir -p "$pkgdir"/"${_file%/*}" - mv _install/"$_file" "$pkgdir"/"$_file" + mv ../install/"$_file" "$pkgdir"/"$_file" done } @@ -157,20 +197,21 @@ package_python-ipaclient() { depends=("freeipa-client-common=$pkgver-$pkgrel" "freeipa-common=$pkgver-$pkgrel" "python-ipalib=$pkgver-$pkgrel" - 'python-dnspython>=1.11.1') + 'python-dnspython>=1.15' + 'python-jinja') - cd "${pkgbase}-${pkgver}" + cd freeipa-${pkgver} - install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README \ + install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README.md \ Contributors.txt local _file - for _file in _install/usr/lib/python3.*/site-packages/ipaclient \ - _install/usr/lib/python3.*/site-packages/ipaclient-*.egg-info + for _file in ../install/usr/lib/python3.*/site-packages/ipaclient \ + ../install/usr/lib/python3.*/site-packages/ipaclient-*.egg-info do - _file="${_file#_install/}" + _file="${_file#../install/}" mkdir -p "$pkgdir"/"${_file%/*}" - mv _install/"$_file" "$pkgdir"/"$_file" + mv ../install/"$_file" "$pkgdir"/"$_file" done } @@ -178,23 +219,25 @@ package_python2-ipalib() { pkgdesc='Python libraries used by IPA' arch=('any') depends=("freeipa-common=$pkgver-$pkgrel" - 'python2-gssapi>=1.1.2' + 'python2-gssapi>=1.2.0' 'gnupg' 'keyutils' + 'python2>=2.7.9' 'python2-nss>=0.16' - 'python2-cryptography>=0.9' - 'python2-lxml' - 'python2-netaddr' + 'python2-cryptography>=1.4' + 'python2-netaddr>=0.7.16' 'sssd' 'python2-qrcode>=5.0.0' 'python2-pyasn1' + 'python2-pyasn1-modules' 'python2-dateutil' 'python2-yubico>=1.2.3' 'python2-dbus' 'python2-setuptools' 'python2-six' 'python2-ldap>=2.4.15' - 'python2-dnspython>=1.11.1' + 'python2-dnspython>=1.15' + 'python2-enum34' 'python2-netifaces>=0.10.4' 'python2-pyusb') provides=("python2-ipapython=$pkgver-$pkgrel" @@ -202,22 +245,22 @@ package_python2-ipalib() { conflicts=('freeipa-python') replaces=('freeipa-python') - cd "${pkgbase}-${pkgver}" + cd freeipa-${pkgver} - install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README \ + install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README.md \ Contributors.txt local _file - for _file in _install/usr/lib/python2.*/site-packages/ipapython \ - _install/usr/lib/python2.*/site-packages/ipalib \ - _install/usr/lib/python2.*/site-packages/ipaplatform \ - _install/usr/lib/python2.*/site-packages/ipapython-*.egg-info \ - _install/usr/lib/python2.*/site-packages/ipalib-*.egg-info \ - _install/usr/lib/python2.*/site-packages/ipaplatform-*.egg-info + for _file in ../install/usr/lib/python2.*/site-packages/ipapython \ + ../install/usr/lib/python2.*/site-packages/ipalib \ + ../install/usr/lib/python2.*/site-packages/ipaplatform \ + ../install/usr/lib/python2.*/site-packages/ipapython-*.egg-info \ + ../install/usr/lib/python2.*/site-packages/ipalib-*.egg-info \ + ../install/usr/lib/python2.*/site-packages/ipaplatform-*.egg-info do - _file="${_file#_install/}" + _file="${_file#../install/}" mkdir -p "$pkgdir"/"${_file%/*}" - mv _install/"$_file" "$pkgdir"/"$_file" + mv ../install/"$_file" "$pkgdir"/"$_file" done } @@ -227,20 +270,21 @@ package_python2-ipaclient() { depends=("freeipa-client-common=$pkgver-$pkgrel" "freeipa-common=$pkgver-$pkgrel" "python2-ipalib=$pkgver-$pkgrel" - 'python2-dnspython>=1.11.1') + 'python2-dnspython>=1.15' + 'python2-jinja') - cd "${pkgbase}-${pkgver}" + cd freeipa-${pkgver} - install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README \ + install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README.md \ Contributors.txt local _file - for _file in _install/usr/lib/python2.*/site-packages/ipaclient \ - _install/usr/lib/python2.*/site-packages/ipaclient-*.egg-info + for _file in ../install/usr/lib/python2.*/site-packages/ipaclient \ + ../install/usr/lib/python2.*/site-packages/ipaclient-*.egg-info do - _file="${_file#_install/}" + _file="${_file#../install/}" mkdir -p "$pkgdir"/"${_file%/*}" - mv _install/"$_file" "$pkgdir"/"$_file" + mv ../install/"$_file" "$pkgdir"/"$_file" done } @@ -250,17 +294,17 @@ package_freeipa-common() { conflicts=('freeipa-python') replaces=('freeipa-python') - cd "${pkgbase}-${pkgver}" + cd freeipa-${pkgver} - install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README \ + install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README.md \ Contributors.txt local _file - for _file in _install/usr/share/locale/*/*/ipa.mo + for _file in ../install/usr/share/locale/*/*/ipa.mo do - _file="${_file#_install/}" + _file="${_file#../install/}" mkdir -p "$pkgdir"/"${_file%/*}" - mv _install/"$_file" "$pkgdir"/"$_file" + mv ../install/"$_file" "$pkgdir"/"$_file" done } @@ -268,20 +312,20 @@ package_freeipa-client-common() { pkgdesc='Common files used by IPA client' arch=('any') - cd "${pkgbase}-${pkgver}" + cd freeipa-${pkgver} - install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README \ + install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README.md \ Contributors.txt local _file - for _file in _install/etc/ipa/nssdb \ - _install/usr/share/ipa \ - _install/var/lib/ipa-client/sysrestore \ - _install/usr/share/man/man5/default.conf.5.gz + for _file in ../install/etc/ipa/nssdb \ + ../install/var/lib/ipa-client/pki \ + ../install/var/lib/ipa-client/sysrestore \ + ../install/usr/share/man/man5/default.conf.5* do - _file="${_file#_install/}" + _file="${_file#../install/}" mkdir -p "$pkgdir"/"${_file%/*}" - mv _install/"$_file" "$pkgdir"/"$_file" + mv ../install/"$_file" "$pkgdir"/"$_file" done } @@ -304,7 +348,7 @@ package_freeipa-client() { 'nss' 'bind-tools' 'oddjob' - 'python2-gssapi>=1.1.2' + 'python2-gssapi>=1.2.0' 'autofs' 'nfsidmap' 'nfs-utils') @@ -312,30 +356,35 @@ package_freeipa-client() { replaces=('freeipa-admintools') install=freeipa-client.install - cd "${pkgbase}-${pkgver}" + cd freeipa-${pkgver} + + install -D -t"$pkgdir"/usr/share/libalpm/scripts \ + "$srcdir"/freeipa-client-update-sshd_config + install -D -m644 -t"$pkgdir"/usr/share/libalpm/hooks \ + "$srcdir"/freeipa-client-update-sshd_config.hook \ - install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README \ + install -D -m644 -t"$pkgdir"/usr/share/doc/$pkgname README.md \ Contributors.txt local _file - for _file in _install/etc/bash_completion.d \ - _install/usr/bin/ipa \ - _install/usr/bin/ipa-client-install \ - _install/usr/bin/ipa-client-automount \ - _install/usr/bin/ipa-certupdate \ - _install/usr/bin/ipa-getkeytab \ - _install/usr/bin/ipa-rmkeytab \ - _install/usr/bin/ipa-join \ - _install/usr/share/man/man1/ipa.1 \ - _install/usr/share/man/man1/ipa-getkeytab.1.gz \ - _install/usr/share/man/man1/ipa-rmkeytab.1.gz \ - _install/usr/share/man/man1/ipa-client-install.1.gz \ - _install/usr/share/man/man1/ipa-client-automount.1.gz \ - _install/usr/share/man/man1/ipa-certupdate.1.gz \ - _install/usr/share/man/man1/ipa-join.1.gz + for _file in ../install/etc/bash_completion.d \ + ../install/usr/bin/ipa \ + ../install/usr/bin/ipa-client-install \ + ../install/usr/bin/ipa-client-automount \ + ../install/usr/bin/ipa-certupdate \ + ../install/usr/bin/ipa-getkeytab \ + ../install/usr/bin/ipa-rmkeytab \ + ../install/usr/bin/ipa-join \ + ../install/usr/share/man/man1/ipa.1 \ + ../install/usr/share/man/man1/ipa-getkeytab.1* \ + ../install/usr/share/man/man1/ipa-rmkeytab.1* \ + ../install/usr/share/man/man1/ipa-client-install.1* \ + ../install/usr/share/man/man1/ipa-client-automount.1* \ + ../install/usr/share/man/man1/ipa-certupdate.1* \ + ../install/usr/share/man/man1/ipa-join.1* do - _file="${_file#_install/}" + _file="${_file#../install/}" mkdir -p "$pkgdir"/"${_file%/*}" - mv _install/"$_file" "$pkgdir"/"$_file" + mv ../install/"$_file" "$pkgdir"/"$_file" done } |