From c86f4cfde475bb58fd27ce5d5a419d1447b59a45 Mon Sep 17 00:00:00 2001 From: Alexandre Ellert Date: Wed, 31 Jan 2018 13:57:05 +0200 Subject: [PATCH] Imported Debian patch 4.6.2-4~numeezy --- debian/README.source | 7 + debian/TODO | 3 + debian/changelog | 440 + debian/compat | 1 + debian/control | 372 + debian/copyright | 347 + debian/freeipa-admintools.install | 3 + debian/freeipa-admintools.lintian-overrides | 2 + debian/freeipa-client.dirs | 6 + debian/freeipa-client.install | 13 + debian/freeipa-client.lintian-overrides | 3 + debian/freeipa-client.postinst | 17 + debian/freeipa-client.postrm | 22 + debian/freeipa-client.tmpfile | 1 + debian/freeipa-common.install | 1 + debian/freeipa-server-dns.install | 3 + debian/freeipa-server-dns.lintian-overrides | 3 + debian/freeipa-server-trust-ad.install | 7 + .../freeipa-server-trust-ad.lintian-overrides | 2 + debian/freeipa-server.dirs | 3 + debian/freeipa-server.docs | 1 + debian/freeipa-server.install | 104 + debian/freeipa-server.links | 8 + debian/freeipa-server.lintian-overrides | 9 + debian/freeipa-server.postinst | 81 + debian/freeipa-server.postrm | 56 + debian/freeipa-server.prerm | 26 + debian/freeipa-tests.install | 6 + debian/freeipa-tests.lintian-overrides | 2 + .../missing-sources/bootstrap-datepicker.js | 1798 ++++ debian/missing-sources/bootstrap.js | 1951 ++++ debian/missing-sources/d3.js | 9504 +++++++++++++++++ debian/missing-sources/dojo/Deferred.js | 320 + debian/missing-sources/dojo/Evented.js | 35 + debian/missing-sources/dojo/NodeList-dom.js | 514 + debian/missing-sources/dojo/Stateful.js | 213 + debian/missing-sources/dojo/_base/Deferred.js | 383 + debian/missing-sources/dojo/_base/array.js | 350 + debian/missing-sources/dojo/_base/config.js | 193 + debian/missing-sources/dojo/_base/connect.js | 374 + debian/missing-sources/dojo/_base/declare.js | 1089 ++ debian/missing-sources/dojo/_base/event.js | 59 + debian/missing-sources/dojo/_base/kernel.js | 299 + debian/missing-sources/dojo/_base/lang.js | 605 ++ debian/missing-sources/dojo/_base/sniff.js | 93 + debian/missing-sources/dojo/_base/window.js | 134 + debian/missing-sources/dojo/aspect.js | 223 + debian/missing-sources/dojo/dojo.js | 1997 ++++ debian/missing-sources/dojo/dom-attr.js | 220 + debian/missing-sources/dojo/dom-class.js | 326 + debian/missing-sources/dojo/dom-construct.js | 360 + debian/missing-sources/dojo/dom-geometry.js | 605 ++ debian/missing-sources/dojo/dom-prop.js | 180 + debian/missing-sources/dojo/dom-style.js | 312 + debian/missing-sources/dojo/dom.js | 185 + debian/missing-sources/dojo/domReady.js | 124 + .../dojo/errors/CancelError.js | 13 + debian/missing-sources/dojo/errors/create.js | 41 + debian/missing-sources/dojo/has.js | 173 + debian/missing-sources/dojo/hash.js | 256 + debian/missing-sources/dojo/io-query.js | 97 + debian/missing-sources/dojo/keys.js | 77 + debian/missing-sources/dojo/mouse.js | 171 + debian/missing-sources/dojo/on.js | 531 + .../missing-sources/dojo/promise/Promise.js | 133 + debian/missing-sources/dojo/promise/all.js | 76 + .../dojo/promise/instrumentation.js | 105 + debian/missing-sources/dojo/promise/tracer.js | 85 + debian/missing-sources/dojo/query.js | 705 ++ debian/missing-sources/dojo/ready.js | 153 + debian/missing-sources/dojo/router.js | 28 + .../missing-sources/dojo/router/RouterBase.js | 376 + debian/missing-sources/dojo/sniff.js | 80 + debian/missing-sources/dojo/store/Memory.js | 164 + .../missing-sources/dojo/store/Observable.js | 187 + .../dojo/store/util/QueryResults.js | 63 + .../dojo/store/util/SimpleQueryEngine.js | 110 + debian/missing-sources/dojo/string.js | 162 + debian/missing-sources/dojo/topic.js | 38 + debian/missing-sources/dojo/when.js | 55 + debian/missing-sources/jquery-2.0.3.js | 8829 +++++++++++++++ debian/missing-sources/patternfly.js | 212 + debian/missing-sources/qrcode.js | 614 ++ debian/patches/create-sysconfig-ods.diff | 12 + .../patches/enable-mod-nss-during-setup.diff | 19 + debian/patches/fix-ipa-conf.diff | 41 + debian/patches/fix-named-conf-template.diff | 46 + debian/patches/fix-opendnssec-setup.diff | 81 + debian/patches/fix-replicainstall.diff | 11 + debian/patches/hack-libarch.diff | 14 + debian/patches/series | 13 + debian/patches/support-kdb-dal-7.0.diff | 90 + debian/python-ipaclient.install | 9 + debian/python-ipalib.install | 7 + debian/python-ipaserver.install | 45 + debian/python-ipatests.install | 2 + debian/python-ipatests.lintian-overrides | 2 + debian/rules | 78 + debian/source/format | 2 + debian/source/lintian-overrides | 14 + debian/tests/control | 7 + debian/tests/server-install | 39 + debian/watch | 3 + 103 files changed, 38064 insertions(+) create mode 100644 debian/README.source create mode 100644 debian/TODO create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/freeipa-admintools.install create mode 100644 debian/freeipa-admintools.lintian-overrides create mode 100644 debian/freeipa-client.dirs create mode 100644 debian/freeipa-client.install create mode 100644 debian/freeipa-client.lintian-overrides create mode 100644 debian/freeipa-client.postinst create mode 100644 debian/freeipa-client.postrm create mode 100644 debian/freeipa-client.tmpfile create mode 100644 debian/freeipa-common.install create mode 100644 debian/freeipa-server-dns.install create mode 100644 debian/freeipa-server-dns.lintian-overrides create mode 100644 debian/freeipa-server-trust-ad.install create mode 100644 debian/freeipa-server-trust-ad.lintian-overrides create mode 100644 debian/freeipa-server.dirs create mode 100644 debian/freeipa-server.docs create mode 100644 debian/freeipa-server.install create mode 100644 debian/freeipa-server.links create mode 100644 debian/freeipa-server.lintian-overrides create mode 100644 debian/freeipa-server.postinst create mode 100644 debian/freeipa-server.postrm create mode 100644 debian/freeipa-server.prerm create mode 100644 debian/freeipa-tests.install create mode 100644 debian/freeipa-tests.lintian-overrides create mode 100644 debian/missing-sources/bootstrap-datepicker.js create mode 100644 debian/missing-sources/bootstrap.js create mode 100644 debian/missing-sources/d3.js create mode 100644 debian/missing-sources/dojo/Deferred.js create mode 100644 debian/missing-sources/dojo/Evented.js create mode 100644 debian/missing-sources/dojo/NodeList-dom.js create mode 100644 debian/missing-sources/dojo/Stateful.js create mode 100644 debian/missing-sources/dojo/_base/Deferred.js create mode 100644 debian/missing-sources/dojo/_base/array.js create mode 100644 debian/missing-sources/dojo/_base/config.js create mode 100644 debian/missing-sources/dojo/_base/connect.js create mode 100644 debian/missing-sources/dojo/_base/declare.js create mode 100644 debian/missing-sources/dojo/_base/event.js create mode 100644 debian/missing-sources/dojo/_base/kernel.js create mode 100644 debian/missing-sources/dojo/_base/lang.js create mode 100644 debian/missing-sources/dojo/_base/sniff.js create mode 100644 debian/missing-sources/dojo/_base/window.js create mode 100644 debian/missing-sources/dojo/aspect.js create mode 100644 debian/missing-sources/dojo/dojo.js create mode 100644 debian/missing-sources/dojo/dom-attr.js create mode 100644 debian/missing-sources/dojo/dom-class.js create mode 100644 debian/missing-sources/dojo/dom-construct.js create mode 100644 debian/missing-sources/dojo/dom-geometry.js create mode 100644 debian/missing-sources/dojo/dom-prop.js create mode 100644 debian/missing-sources/dojo/dom-style.js create mode 100644 debian/missing-sources/dojo/dom.js create mode 100644 debian/missing-sources/dojo/domReady.js create mode 100644 debian/missing-sources/dojo/errors/CancelError.js create mode 100644 debian/missing-sources/dojo/errors/create.js create mode 100644 debian/missing-sources/dojo/has.js create mode 100644 debian/missing-sources/dojo/hash.js create mode 100644 debian/missing-sources/dojo/io-query.js create mode 100644 debian/missing-sources/dojo/keys.js create mode 100644 debian/missing-sources/dojo/mouse.js create mode 100644 debian/missing-sources/dojo/on.js create mode 100644 debian/missing-sources/dojo/promise/Promise.js create mode 100644 debian/missing-sources/dojo/promise/all.js create mode 100644 debian/missing-sources/dojo/promise/instrumentation.js create mode 100644 debian/missing-sources/dojo/promise/tracer.js create mode 100644 debian/missing-sources/dojo/query.js create mode 100644 debian/missing-sources/dojo/ready.js create mode 100644 debian/missing-sources/dojo/router.js create mode 100644 debian/missing-sources/dojo/router/RouterBase.js create mode 100644 debian/missing-sources/dojo/sniff.js create mode 100644 debian/missing-sources/dojo/store/Memory.js create mode 100644 debian/missing-sources/dojo/store/Observable.js create mode 100644 debian/missing-sources/dojo/store/util/QueryResults.js create mode 100644 debian/missing-sources/dojo/store/util/SimpleQueryEngine.js create mode 100644 debian/missing-sources/dojo/string.js create mode 100644 debian/missing-sources/dojo/topic.js create mode 100644 debian/missing-sources/dojo/when.js create mode 100644 debian/missing-sources/jquery-2.0.3.js create mode 100644 debian/missing-sources/patternfly.js create mode 100644 debian/missing-sources/qrcode.js create mode 100644 debian/patches/create-sysconfig-ods.diff create mode 100644 debian/patches/enable-mod-nss-during-setup.diff create mode 100644 debian/patches/fix-ipa-conf.diff create mode 100644 debian/patches/fix-named-conf-template.diff create mode 100644 debian/patches/fix-opendnssec-setup.diff create mode 100644 debian/patches/fix-replicainstall.diff create mode 100644 debian/patches/hack-libarch.diff create mode 100644 debian/patches/series create mode 100644 debian/patches/support-kdb-dal-7.0.diff create mode 100644 debian/python-ipaclient.install create mode 100644 debian/python-ipalib.install create mode 100644 debian/python-ipaserver.install create mode 100644 debian/python-ipatests.install create mode 100644 debian/python-ipatests.lintian-overrides create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/lintian-overrides create mode 100644 debian/tests/control create mode 100644 debian/tests/server-install create mode 100644 debian/watch diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..4bb9e0e --- /dev/null +++ b/debian/README.source @@ -0,0 +1,7 @@ +freeipa + +Upstream does not ship unminified copies of various javascript files, so we must ship them +in debian/missing-sources. Minified build.js, dojo.js and freeipa/{app,core}.js +are built with a certain set of modules, so those bits are under missing-sources/{build,dojo}. +The list of modules needed for the build are taken from install/ui/src/build.profile.js, +install/ui/src/dojo.profile.js and install/ui/src/webui.profile.js. diff --git a/debian/TODO b/debian/TODO new file mode 100644 index 0000000..8d04d8b --- /dev/null +++ b/debian/TODO @@ -0,0 +1,3 @@ +TODO + +- Bundle OpenSans fonts? Fallback works fine though diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..28397db --- /dev/null +++ b/debian/changelog @@ -0,0 +1,440 @@ +freeipa (4.6.2-4~numeezy) stretch; urgency=medium + + * Fix missing dir /var/lib/ipa-client/pki. + * client.postinst: Migrate from old nssdb only if it exists. + + -- Alexandre Ellert Wed, 31 Jan 2018 13:57:05 +0200 + +freeipa (4.6.2-3~numeezy) stretch; urgency=medium + + * Backport to stretch. + + -- Alexandre Ellert Mon, 29 Jan 2018 18:53:42 +0200 + +freeipa (4.6.2-3) unstable; urgency=medium + + * tests: Add some debug info, and fail properly. + + -- Timo Aaltonen Mon, 29 Jan 2018 13:17:25 +0200 + +freeipa (4.6.2-2) unstable; urgency=medium + + * server.postinst: Fix output redirection. + + -- Timo Aaltonen Sat, 20 Jan 2018 21:33:26 +0200 + +freeipa (4.6.2-1) unstable; urgency=medium + + * New upstream release. + - Remove upstreamed patches: + add-debian-platform.diff, + ipa-kdb-support-dal-version-5-and-6.diff, + purge-firefox-extension.diff, + fix-ipa-otpd-install.diff, + fix-ipa-otpd-service.diff, + purge-firefox-extension.diff, + prefix.patch, + fix-kdcproxy-path.diff, + fix-is-running.diff, + fix-pkcs11-helper.diff, + fix-dnssec-services.diff + - Remove obsolete patches: fix-memcached.diff, + fix-oddjobs.diff, + fix-kdcproxy-paths.diff + - Refresh rest of the patches + * control et al: Memcached is not used anymore. + * control, server.install: Depend on gssproxy. + * control: Build-depend on python-jinja2, add CSR files to python- + ipaclient. + * *.install: Updated. + * client.postinst: Fix update_ipa_nssdb import. + * rules, autoreconf: Refactor the build to match current upstream, + drop d/autoreconf. + * local-options: Ignore some files not on tarballs. + * rules: Migrate to dh_missing. + * Drop server tmpfile, ship upstream one, and create ipaapi/kdcproxy + users/groups on install and add www-data to ipaapi group. + * control: Add python-sss to python-ipaserver depends. + * rules: Disable building on a builddirectory, it's broken upstream + for now. + * control: Drop libcurl4-nss-dev from build-depends, bump libkrb5-dev + build-dependency. + * control: Bump dependency on bind9 and bind9-dyndb-ldap. + * control: add libapache2-mod-lookup-identity to server dependencies, + enable/disable it in postinst/postrm. + * control: Depend on newer custodia, move dep on python-custodia to + python-ipaserver. + * control: Add python-sss to client depends. + * Add support for krb 1.16. (Closes: #887814) + + -- Timo Aaltonen Sat, 20 Jan 2018 12:41:28 +0200 + +freeipa (4.4.4-4) unstable; urgency=medium + + [ Timo Aaltonen ] + * fix-opendnssec-setup.diff: Use /usr/sbin prefix for ods binaries. + * samba-4.7-fix-*: Add backported commits to allow building against + samba 4.7. (Closes: #880841) + + [ Steve Langasek ] + * Fix autopkgtest to be robust in the face of changed iproute2 output. + + -- Timo Aaltonen Sat, 16 Dec 2017 09:15:37 +0200 + +freeipa (4.4.4-3) unstable; urgency=medium + + * fix-opendnssec-setup.diff: Fix a typo. (Closes: #878095) + + -- Timo Aaltonen Mon, 09 Oct 2017 23:51:56 +0300 + +freeipa (4.4.4-2) unstable; urgency=medium + + * control: Add a dependency on fonts-open-sans. (LP: #1656236) + * fix-opendnssec-install.diff: Updated for opendnssec 2.1.x. (LP: + #1703836) + + -- Timo Aaltonen Mon, 09 Oct 2017 10:41:55 +0300 + +freeipa (4.4.4-1) unstable; urgency=medium + + * Upload to unstable. (Closes: #862846) + * New upstream release. + - CVE-2017-2590 + - ipa-kdb-support-dal-version-5-and-6.diff: Dropped, upstream. + - purge-firefox-extension.diff: Refreshed. + * fix-is-running.diff: Add a third argument to is_running() in + ipaplatform/debian/services.py. (Closes: #856533) + * fix-kdcproxy-path.diff: Update debian/paths.py to use correct path + for ipa-httpd-kdcproxy. + * client.dirs: Ship /etc/krb5.conf.d, because not having that breaks + the installer when krb5.conf tries to include that. + * copyright, watch: Update source/release location. + * control, ipaserver: Move adtrustinstance python files to python- + ipaserver, and add samba-common to python-ipaserver depends so that + uninstall works. + * fix-pkcs11-helper.diff: Fix ipa-dnskeysyncd setup which was broken + by softhsm 2.2. + * fix-opendnssec-setup.diff: Opendnssec 2.0.x broke DNSSEC setup, fix + it. + + -- Timo Aaltonen Wed, 17 May 2017 21:19:22 +0300 + +freeipa (4.4.3-3) experimental; urgency=medium + + * client.postinst: Fix logfile location. + + -- Timo Aaltonen Thu, 16 Feb 2017 11:26:08 +0200 + +freeipa (4.4.3-2) experimental; urgency=medium + + * control: Fix python-ipatests to depend on python-sss instead of + python-sssdconfig. + + -- Timo Aaltonen Sat, 28 Jan 2017 00:15:53 +0200 + +freeipa (4.4.3-1) experimental; urgency=medium + + * New upstream release. (Closes: #848762) + * configure-apache-from-installer.diff: Dropped, upstream. + * fix-cve-2016-5404.diff: Dropped, upstream. + * patches: Refreshed. + * work-around-apache-fail.diff: Dropped, apache supports systemd now + so this should not be needed. + * watch: Use https url. + * client.postinst: Use update_ipa_nssdb(), which also removes remnants + from /etc/pki/nssdb. + * control: Bump depends on slapi-nis to 0.56.1. + * control: Add python-custodia and python-requests to ipalib depends. + * control: Use python-netifaces instead of iproute. + * control: Add python-sssdconfig to python-ipatests depends. + * control: Bump depends on 389-ds-base to 1.3.5.6, upstream #5396 + #2008. + * control: Bump bind9-dyndb-ldap depends to 10, upstream #2008. + * control: Add python-libsss-nss-idmap to build-depends. + * control: Bump depends on sssd to 1.14.0. + * install: Updated. + * platform: + - drop variables that were commented out + - add some comments to tasks.py + - migrate some services to use systemd + - add & update some paths + - add some stub services (LP: #1653245) + * control: Add krb5-otp to server depends. (LP: #1640732) + * control: Demote ntp to Recommends so that lxc containers can be + enrolled without it. (LP: #1630911) + + -- Timo Aaltonen Sat, 14 Jan 2017 15:29:25 +0200 + +freeipa (4.3.2-5) unstable; urgency=medium + + * fix-cve-2016-5404.diff: Fix permission check bypass (Closes: #835131) + - CVE-2016-5404 + * ipa-kdb-support-dal-version-5-and-6.diff: Support mit-krb5 1.15. + (Closes: #844114) + + -- Timo Aaltonen Sat, 03 Dec 2016 01:02:40 +0200 + +freeipa (4.3.2-4) unstable; urgency=medium + + * freeipa-client.post*: Use /var/log/ipaclient-upgrade.log instead of + ipaupgrade.log, and remove it on purge. (Closes: #842071) + * control: Bump dependency on libapache2-mod-auth-gssapi to verify + upstream bug #5653 is resolved. + * platform: Add Debian mapping for rpcgssd and rpcidmapd service + files. (LP: #1645201) + + -- Timo Aaltonen Thu, 01 Dec 2016 08:12:27 +0200 + +freeipa (4.3.2-3) unstable; urgency=medium + + * rules: Add a check to override_dh_fixperms so that chmod is not run + on arch-indep build where the targets don't exist. (Closes: #839844) + + -- Timo Aaltonen Thu, 06 Oct 2016 01:22:13 +0300 + +freeipa (4.3.2-2) unstable; urgency=medium + + * copyright: Since ffb9a09a0d all original code should be GPL-3+, so + drop some exceptions. + * control: Add libnss-sss, libpam-sss and libsss-sudo to client depends + to ensure they get installed. (LP: #1600513) + * fix-ipa-otpd-service.diff: Use correct path for ipa-otpd. (LP: + #1628884) + * add-debian-platform.diff: Fix libsofthsm2.so install path. + * control: Bump dep on softhsm2 due to changed lib install path. + * tests: Add simple autopkgtest to check that ipa-server-install + works. + + -- Timo Aaltonen Wed, 05 Oct 2016 00:35:51 +0300 + +freeipa (4.3.2-1) experimental; urgency=medium + + * New upstream release. + * copyright, missing-sources, README.source: Exclude minified javascript + that the runtime does not need. Add unminified versions of others, + update copyright to match. (Closes: #787593) + * source/lintian-overrides: Document minified javascript issues. + + -- Timo Aaltonen Wed, 14 Sep 2016 13:03:54 +0300 + +freeipa (4.3.1-2) experimental; urgency=medium + + * control: python-ipalib can be arch:all now. + + -- Timo Aaltonen Mon, 25 Jul 2016 22:22:52 +0300 + +freeipa (4.3.1-1) unstable; urgency=medium + + * New upstream release. (Closes: #781607, #786411) (LP: #1449304) + - drop no-test-lang.diff, obsolete + * fix-match-hostname.diff, control: Drop the patch and python-openssl + deps, not needed anymore + * rules, platform, server.dirs, server.install: + Add support for DNSSEC. + * control, rules: Add support for kdcproxy. + * control, server: Migrate to mod-auth-gssapi. + * control, rules, fix-ipa-conf.diff: Add support for custodia. + * control: + - Add python-cryptography to build-deps and python-freeipa deps. + - Add libp11-kit-dev to build-deps, p11-kit to server deps. + - Depend on python-gssapi instead of python-kerberos/-krbV. + - Add libini-config-dev and python-dbus to build-deps, replace wget + with curl. + - Bump libkrb5-dev build-dep. + - Add pki-base to build-deps and pki-kra to server deps, bump pki-ca + version. + - Drop python-m2crypto from deps, obsolete. + - Bump sssd deps to 1.13.1. + - Add python-six to build-deps and python-freeipa deps. + - Split python stuff from server, client, tests to python- + ipa{server,client,tests}, rename python-freeipa to match and move + translations to freeipa-common. Mark them Arch:all where possible, + and add Breaks/Replaces. + - Add oddjob to server and oddjob-mkhomedir to client deps. + - Add python-setuptools to python-ipalib deps. + - Bump 389-ds-base* deps. + - Bump server and python-ipaserver dependency on python-ldap to 2.4.22 + to fix a bug on ipa-server-upgrade. + - Add pki-tools to python-ipaserver deps. + - Add zip to python-ipaserver depends. + - Add python-systemd to server depends. + - Add opendnssec to freeipa-server-dns depends. + - Add python-cffi to python-ipalib depends. + - Bump dep on bind9-dyndb-ldap. + - Bump certmonger dependency to version that has helpers in the correct + place. + * patches: + - prefix.patch: Fix ipalib install too. + - Drop bits of platform.diff and other patches that are now upstream. + - fix-kdcproxy-paths.diff: Fix paths in kdcproxy configs. + - fix-oddjobs.diff: Fix paths and uids in oddjob configs. + - fix-replicainstall.diff: Use ldap instead of ldaps for conncheck. + - fix-dnssec-services.diff: Debianize ipa-dnskeysyncd & ipa-ods- + exporter units. + - create-sysconfig-ods.diff: Create an empty file for opendnssec + daemons, until opendnssec itself is fixed. + - purge-firefox-extension.diff: Clean obsolete kerberosauth.xpi. + - enable-mod-nss-during-setup.diff: Split from platform.diff, call + a2enmod/a2dismod from httpinstance.py. + - fix-memcached.diff: Split from platform.diff, debianize memcached + conf & unit. + - hack-libarch.diff: Don't use fedora libpaths. + * add-debian-platform.diff: + - Update paths.py to include all variables, comment out ones we don't + modify. + - Use systemwide certificate store; put ipa-ca.crt in + /usr/local/share/ca-certificates, and run update-ca-certificates + - Map smb service to smbd (LP: #1543230) + - Don't ship /var/cache/bind/data, fix named.conf a bit. + - Use DebianNoService() for dbus. (LP: #1564981) + - Add more constants + * Split freeipa-server-dns from freeipa-server, add -dns to -server + Recommends. + * server.postinst: Use ipa-server-upgrade. + * admintools: Use the new location for bash completions. + * rules: Remove obsolete configure.jar, preferences.html. + * platform: Fix ipautil.run stdout handling, add support for systemd. + * server.postinst, tmpfile: Create state directories for + mod_auth_gssapi. + * rules, server.install: Install scripts under /usr/lib instead of + multiarch path to avoid hacking the code too much. + * fix-ipa-otpd-install.diff, rules, server.install: Put ipa-otpd in + /usr/lib/ipa instead of directly under multiarch lib path. + * control, server*.install: Move dirsrv plugins from server-trust-ad + to server, needed on upgrades even if trust-ad isn't set up. + * server: Enable mod_proxy_ajp and mod_proxy_http on postinst, disable + on postrm. + * rules: Add SKIP_API_VERSION_CHECK, and adjust directories to clean. + * rules: Don't enable systemd units on install. + * client: Don't create /etc/pki/nssdb on postinst, it's not used + anymore. + * platform.diff, rules, server.install: Drop generate-rndc-key.sh, bind + already generates the keyfile. + + -- Timo Aaltonen Mon, 18 Apr 2016 17:40:32 +0300 + +freeipa (4.1.4-1) experimental; urgency=medium + + * New upstream release. (LP: #1492226) + - Refresh patches + - platform-support.diff: Added NAMED_VAR_DIR. + - fix-bind-conf.diff: Dropped, obsolete with above. + - disable-dnssec-support.patch: Disable DNSSEC-support as we're + missing the dependencies for now. + * control: Add python-usb to build-depends and to python-freeipa + depends. + * control: Bump SSSD dependencies. + * control: Add libsofthsm2-dev to build-depends and softhsm2 to server + depends. + * freeipa-{server,client}.install: Add new files. + * control: Bump Depends on slapi-nis for CVE fixes. + * control: Bump 389-ds-base, pki-ca depends. + * control: Drop dogtag-pki-server-theme from server depends, it's not + needed. + * control: Server needs newer python-ldap, bump build-dep too. + * control: Bump certmonger depends. + * control: Bump python-nss depends. + * freeipa-client: Add /etc/ipa/nssdb, rework /etc/pki/nssdb handling. + * platform: Add DebianNamedService. + * platform, disable-dnssec-support.patch: Fix named.conf template. + * server.postinst: Run ipa-ldap-updater and ipa-upgradeconfig on + postinst. + * Revert DNSSEC changes to schema and ACI, makes upgrade tools fail. + * server.postrm: Clean logs on purge and disable apache modules on + remove/purge. + + -- Timo Aaltonen Fri, 25 Sep 2015 14:07:40 +0300 + +freeipa (4.0.5-6) unstable; urgency=medium + + * control Add gnupg-agent to python-freeipa depends, and change gnupg + to gnupg2. (LP: #1492184) + * Rebuild against current krb5, there was an abi break which broke at + least the setup phase. + + -- Timo Aaltonen Thu, 24 Sep 2015 23:22:24 +0300 + +freeipa (4.0.5-5) unstable; urgency=medium + + * control: Drop selinux-policy-dev from build-depends, not needed + anymore. + * client.dirs,postrm: Drop removing /etc/pki/nssdb from postrm and let + dpkg handle it. (Closes: #781114) + + -- Timo Aaltonen Thu, 09 Apr 2015 17:16:37 +0300 + +freeipa (4.0.5-4) unstable; urgency=medium + + * control: Fix freeipa-tests depends. + * control: Add systemd-sysv to server depends. (Closes: #780386) + * freeipa-client.postrm: Purge /etc/pki if empty. (Closes: #781114) + * add-a-clear-openssl-exception.diff: Add a clear OpenSSL exception. + (Closes: #772136) + * control: Add systemd to build-depends. + * dont-check-for-systemd-pc.diff: Dropped, not needed anymore. + + -- Timo Aaltonen Thu, 02 Apr 2015 10:53:55 +0300 + +freeipa (4.0.5-3) unstable; urgency=medium + + * rules: Set JAVA_STACK_SIZE to hopefully avoid FTBFS on exotic archs. + * freeipa-client.postrm: Remove nssdb files on purge. (Closes: + #775387) + * freeipa-client.postinst: Fix bashism with echo. (Closes: #772242) + + -- Timo Aaltonen Wed, 04 Mar 2015 14:51:35 +0200 + +freeipa (4.0.5-2) unstable; urgency=medium + + * Team upload. + * Let python-freeipa depend on python-pyasn1, because pyasn1 is imported + by ipalib/pkcs10.py and ipalib/plugins/cert.py. + * debian/copyright: Drop unused PD license section + * debian/copyright: Fix paths of Javascript files + + -- Benjamin Drung Mon, 24 Nov 2014 12:32:36 +0100 + +freeipa (4.0.5-1) unstable; urgency=medium + + * New upstream release + - Fix CVE-2014-7828. (Closes: #768294) + * control: Update my email address. + * fix-bind-conf.diff, add-debian-platform.diff: Fix bind config + template to use Debian specific paths, and replace named.conf not + named.conf.local. (Closes: #768122) + * rules, -server.postinst: Create /var/cache/bind/data owned by bind + user. + * rules: Fix /var/lib/ipa/backup permissions. + * Add non-standard-dir-perm to server lintian overrides. + * copyright: Fix a typo. + * control: Bump dependency on bind9-dyndb-ldap to 6.0-4~. + * control: Move dependency on python-qrcode and python-yubico from + server to python-freeipa and drop python-selinux which belongs to + pki-server. + * control: Relax libxmlrpc-core-c3-dev buil-dep and 389-ds-base dep + for easier backporting. + * control: Add python-dateutils to server, and python-dbus and python- + memcache to python-freeipa dependencies. (Closes: #768187) + * platform: Handle /etc/default/nfs-common and /etc/default/autofs, + drop NSS_DB_DIR since it's inherited already. (Closes: #769037) + * control: Bump policy to 3.9.6, no changes. + + -- Timo Aaltonen Tue, 11 Nov 2014 10:38:52 +0200 + +freeipa (4.0.4-2) unstable; urgency=medium + + * control: Add python-qrcode, python-selinux, python-yubico + to freeipa-server dependencies. (Closes: #767427) + * freeipa-server.postinst: Enable mod_authz_user and mod_deflate too, + but since they should be part of the default apache2 install, don't + disable them on uninstall like the other modules. (Closes: #767425) + * control: Bump server dependency on -mod-nss to 1.0.10-2 which + doesn't enable the module by default. + + -- Timo Aaltonen Fri, 31 Oct 2014 11:36:51 +0200 + +freeipa (4.0.4-1) unstable; urgency=medium + + * Initial release (Closes: #734703) + + -- Timo Aaltonen Sat, 25 Oct 2014 02:43:59 +0300 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..0db99c2 --- /dev/null +++ b/debian/control @@ -0,0 +1,372 @@ +Source: freeipa +Section: net +Priority: extra +Maintainer: Debian FreeIPA Team +Uploaders: Timo Aaltonen +Build-Depends: + 389-ds-base-dev (>= 1.3.5.6), + check, + debhelper (>= 9), + dh-autoreconf, + dh-python, + dh-systemd, + gettext, + krb5-user, + libcmocka-dev, + libini-config-dev, + libkrad-dev, + libkrb5-dev (>= 1.15), + libldap2-dev, + libnspr4-dev, + libnss3-dev, + libpopt-dev, + librhino-java, + libsasl2-dev, + libssl-dev, + libsss-idmap-dev, + libsss-nss-idmap-dev (>= 1.14.0), + libsvrcore-dev, + libtalloc-dev, + libtevent-dev, + libunistring-dev, + libverto-dev, + libxmlrpc-core-c3-dev (>= 1.33.06), + pki-base (>= 10.3.5-6), + python-all-dev, + python-cryptography, + python-dbus, + python-dnspython (>= 1.11.1), + python-gssapi, + python-jinja2, + python-kdcproxy, + python-ldap (>= 2.4.15), + python-lesscpy, + python-libipa-hbac, + python-libsss-nss-idmap, + python-lxml, + python-netaddr, + python-netifaces (>= 0.10.4), + python-nose, + python-nss (>= 0.16.0), + python-polib, + python-pyasn1, + python-qrcode (>= 5.0.0), + python-setuptools, + python-six, + python-sss (>= 1.14.0), + python-usb (>= 1.0.0~b2), + python-yubico, + rhino, + samba-dev, + systemd, + uuid-dev +Standards-Version: 3.9.6 +Vcs-Git: https://anonscm.debian.org/git/pkg-freeipa/freeipa.git +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-freeipa/freeipa.git +Homepage: http://www.freeipa.org + +Package: freeipa-server +Architecture: any +Breaks: freeipa-server-trust-ad (<< 4.3.0-1) +Replaces: freeipa-server-trust-ad (<< 4.3.0-1) +Depends: + 389-ds-base (>= 1.3.5.6), + acl, + apache2, + certmonger (>= 0.78.6-3), + custodia (>= 0.5.0), + fonts-font-awesome, + fonts-open-sans, + freeipa-admintools (= ${source:Version}), + freeipa-client (= ${binary:Version}), + freeipa-common (= ${source:Version}), + gssproxy (>= 0.7.0), + krb5-admin-server, + krb5-kdc, + krb5-kdc-ldap, + krb5-otp, + krb5-pkinit, + ldap-utils, + libapache2-mod-auth-gssapi (>= 1.5.0), + libapache2-mod-lookup-identity (>= 1.0.0), + libapache2-mod-nss (>= 1.0.10-2~), + libapache2-mod-wsgi, + libjs-dojo-core, + libjs-jquery, + libnss3-tools, + libsasl2-modules-gssapi-mit, + ntp, + oddjob (>= 0.34.3-2), + p11-kit, + pki-ca (>= 10.3.5-6), + pki-kra (>= 10.3.5-6), + python-dateutil, + python-ipaserver (= ${source:Version}), + python-gssapi, + python-ldap (>= 2.4.22), + python-systemd, + slapi-nis (>= 0.56.1), + softhsm2 (>= 2.1.0-2), + systemd-sysv, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Recommends: + freeipa-server-dns, +Description: FreeIPA centralized identity framework -- server + FreeIPA is an integrated solution to provide centrally managed Identity + (machine, user, virtual machines, groups, authentication credentials), Policy + (configuration settings, access control information) and Audit (events, + logs, analysis thereof). + . + This is the server package. + +Package: freeipa-server-dns +Architecture: all +Breaks: freeipa-server (<< 4.3.0-1) +Replaces: freeipa-server (<< 4.3.0-1) +Depends: + freeipa-server (>= ${source:Version}), + bind9 (>= 1:9.11), + bind9-dyndb-ldap (>= 11), + opendnssec (>= 1:1.4.9-2), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: FreeIPA centralized identity framework -- IPA DNS integration + FreeIPA is an integrated solution to provide centrally managed Identity + (machine, user, virtual machines, groups, authentication credentials), Policy + (configuration settings, access control information) and Audit (events, + logs, analysis thereof). + . + This package adds DNS integration with BIND 9. + +Package: freeipa-server-trust-ad +Architecture: any +Depends: + freeipa-common (= ${source:Version}), + freeipa-server (= ${binary:Version}), + python-ipaserver (= ${source:Version}), + python-samba, + samba, + winbind, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: FreeIPA centralized identity framework -- AD trust installer + FreeIPA is an integrated solution to provide centrally managed Identity + (machine, user, virtual machines, groups, authentication credentials), Policy + (configuration settings, access control information) and Audit (events, + logs, analysis thereof). + . + Cross-realm trusts with Active Directory in IPA require working Samba 4 + installation. This package is provided for convenience to install all required + dependencies at once. + +Package: freeipa-common +Architecture: all +Breaks: python-freeipa +Replaces: python-freeipa +Depends: + ${misc:Depends}, +Description: FreeIPA centralized identity framework -- common files + FreeIPA is an integrated solution to provide centrally managed Identity + (machine, user, virtual machines, groups, authentication credentials), Policy + (configuration settings, access control information) and Audit (events, + logs, analysis thereof). + . + This package includes common files. + +Package: freeipa-client +Architecture: any +Depends: + bind9utils, + certmonger (>= 0.78.6-3), + curl, + dnsutils, + freeipa-common (= ${source:Version}), + krb5-user, + libcurl3 (>= 7.22.0), + libnss3-tools, + libnss-sss, + libpam-sss, + libsasl2-modules-gssapi-mit, + libsss-sudo, + libxmlrpc-core-c3 (>= 1.16.33-3.1ubuntu5), + oddjob-mkhomedir, + python-dnspython, + python-ipaclient (= ${source:Version}), + python-gssapi, + python-ldap, + python-sss, + sssd (>= 1.14.0), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Recommends: + ntp, +Suggests: + libpam-krb5, +Description: FreeIPA centralized identity framework -- client + FreeIPA is an integrated solution to provide centrally managed Identity + (machine, user, virtual machines, groups, authentication credentials), Policy + (configuration settings, access control information) and Audit (events, + logs, analysis thereof). + . + This is the client package. + +Package: freeipa-admintools +Architecture: all +Depends: + freeipa-client (>= ${source:Version}), + python-ipalib (>= ${source:Version}), + python-gssapi, + python-ldap, + ${misc:Depends}, + ${python:Depends}, +Description: FreeIPA centralized identity framework -- admintools + FreeIPA is an integrated solution to provide centrally managed Identity + (machine, user, virtual machines, groups, authentication credentials), Policy + (configuration settings, access control information) and Audit (events, + logs, analysis thereof). + . + This package contains some tools for administrators. + +Package: freeipa-tests +Architecture: all +Depends: + freeipa-client (>= ${source:Version}), + python-ipalib (>= ${source:Version}), + python-ipatests (>= ${source:Version}), + python-pytest, + ${misc:Depends}, + ${python:Depends} +Recommends: python-yaml +Description: FreeIPA centralized identity framework -- tests + FreeIPA is an integrated solution to provide centrally managed Identity + (machine, user, virtual machines, groups, authentication credentials), Policy + (configuration settings, access control information) and Audit (events, + logs, analysis thereof). + . + This package contains tests that verify IPA functionality. + +Package: python-ipaclient +Architecture: all +Section: python +Breaks: freeipa-client (<< 4.3.0-1) +Replaces: freeipa-client (<< 4.3.0-1) +Depends: + freeipa-common (= ${binary:Version}), + python-dnspython, + python-ipalib (>= ${source:Version}), + python-jinja2, + ${misc:Depends}, + ${python:Depends}, +Description: FreeIPA centralized identity framework -- Python modules for ipaclient + FreeIPA is an integrated solution to provide centrally managed Identity + (machine, user, virtual machines, groups, authentication credentials), Policy + (configuration settings, access control information) and Audit (events, + logs, analysis thereof). + . + This Python module is used by FreeIPA client. + +Package: python-ipalib +Architecture: all +Section: python +Breaks: python-freeipa +Replaces: python-freeipa +Depends: + freeipa-common (= ${source:Version}), + gnupg2, + gnupg-agent, + keyutils, + python-cffi, + python-cryptography, + python-dbus, + python-dnspython, + python-gssapi, + python-jwcrypto, + python-ldap, + python-libipa-hbac, + python-lxml, + python-netaddr, + python-netifaces (>= 0.10.4), + python-nss (>= 0.16.0), + python-pyasn1, + python-qrcode (>= 5.0.0), + python-requests, + python-setuptools, + python-six, + python-usb (>= 1.0.0~b2), + python-yubico, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends}, +Description: FreeIPA centralized identity framework -- shared Python modules + FreeIPA is an integrated solution to provide centrally managed Identity + (machine, user, virtual machines, groups, authentication credentials), Policy + (configuration settings, access control information) and Audit (events, + logs, analysis thereof). + . + This Python module is used by other FreeIPA packages. + +Package: python-ipaserver +Architecture: all +Section: python +Breaks: freeipa-server (<< 4.3.0-1), + freeipa-server-trust-ad (<< 4.4.4-1), +Replaces: freeipa-server (<< 4.3.0-1), + freeipa-server-trust-ad (<< 4.4.4-1), +Depends: + freeipa-common (= ${binary:Version}), + pki-tools (>= 10.2.6-3), + python-custodia (>= 0.5.0), + python-dbus, + python-dnspython, + python-gssapi, + python-ipaclient (= ${binary:Version}), + python-ipalib (>= ${source:Version}), + python-kdcproxy, + python-ldap (>= 2.4.22), + python-libsss-nss-idmap, + python-pyasn1, + python-sss, + samba-common, + zip, + ${misc:Depends}, + ${python:Depends}, +Description: FreeIPA centralized identity framework -- Python modules for server + FreeIPA is an integrated solution to provide centrally managed Identity + (machine, user, virtual machines, groups, authentication credentials), Policy + (configuration settings, access control information) and Audit (events, + logs, analysis thereof). + . + This Python module is used by FreeIPA server. + +Package: python-ipatests +Architecture: all +Section: python +Breaks: freeipa-tests (<< 4.3.0-1) +Replaces: freeipa-tests (<< 4.3.0-1) +Depends: + libnss3-tools, + python-coverage, + python-ipalib (>= ${source:Version}), + python-nose, + python-paramiko, + python-paste, + python-polib, + python-pytest-multihost, + python-pytest-sourceorder, + python-sss, + xz-utils, + ${misc:Depends}, + ${python:Depends} +Recommends: python-yaml +Description: FreeIPA centralized identity framework -- Python modules for tests + FreeIPA is an integrated solution to provide centrally managed Identity + (machine, user, virtual machines, groups, authentication credentials), Policy + (configuration settings, access control information) and Audit (events, + logs, analysis thereof). + . + This Python module is used by FreeIPA tests. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..989fbb0 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,347 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-name: freeipa +Source: http://releases.pagure.org/freeipa + +Files: * +Copyright: 1999-2011 Red Hat, Inc. +License: GPL-3+ + +Files: daemons/ipa-slapi-plugins/*/*.c + daemons/ipa-slapi-plugins/*/*.h +Copyright: 2005-2010 Red Hat, Inc. +License: GPL-3+ with OpenSSL exception + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + 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 + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + Additional permission under GPLv3 section 7: + . + In the following paragraph, "GPL" means the GNU General Public + License, version 3 or any later version, and "Non-GPL Code" means + code that is governed neither by the GPL nor a license + compatible with the GPL. + . + You may link the code of this Program with Non-GPL Code and convey + linked combinations including the two, provided that such Non-GPL + Code only links to the code of this Program through those well + defined interfaces identified in the file named EXCEPTION found in + the source code files (the "Approved Interfaces"). The files of + Non-GPL Code may instantiate templates or use macros or inline + functions from the Approved Interfaces without causing the resulting + work to be covered by the GPL. Only the copyright holders of this + Program may make changes or additions to the list of Approved + Interfaces. + +Files: install/ui/css/patternfly.css +Copyright: Nicolas Gallagher + Jonathan Neal +License: MIT + +Files: install/ui/src/libs/bootstrap.js + debian/missing-sources/bootstrap*.js +Copyright: 2011-2014 Twitter, Inc. +License: MIT + +Files: install/ui/src/libs/d3.js + debian/missing-sources/d3.js +Copyright: 2010-2015, Michael Bostock +License: BSD-3-clause + +Files: install/ui/src/libs/jquery.js + debian/missing-sources/jquery-2.0.3.js +Copyright: 2005, 2013 jQuery Foundation, Inc. +License: MIT + +Files: install/ui/src/libs/json2.js +Copyright: None +License: public-domain + Public Domain. + +Files: install/ui/src/libs/patternfly.js + debian/missing-sources/patternfly.js +Copyright: 2013, Red Hat +License: Apache-2.0 + +Files: install/ui/src/libs/qrcode.js + debian/missing-sources/qrcode.js +Copyright: 2012, Shim Sangmin +License: MIT + +Files: install/ui/less/font-awesome/* +Copyright: 2012-2013, Dave Gandy +License: MIT + +Files: install/ui/util/uglifyjs/lib/consolidator.js +Copyright: 2012, Robert Gust-Bardon +License: BSD-2-clause + +Files: install/ui/util/uglifyjs/lib/parse-js.js + install/ui/util/uglifyjs/lib/process.js + install/ui/util/uglifyjs/lib/squeeze-more.js +Copyright: 2010, Mihai Bazon +License: BSD-2-clause + +Files: install/ui/util/build/build.js + install/ui/util/build/_base/configRhino.js + install/ui/build/dojo/dojo.js + debian/missing-sources/dojo +Copyright: 2004-2012, The Dojo Foundation +License: BSD-3-clause or AFL-2.1 + +Files: install/ui/test/qunit.css install/ui/test/qunit.js +Copyright: 2009, John Resig, Jörn Zaefferer +License: MIT or GPL-2 + +Files: install/ui/test/qunit.js +Copyright: 2009, John Resig, Jörn Zaefferer + 2008, Ariel Flesler +License: MIT or GPL-2 or BSD-2-clause + +Files: debian/* +Copyright: Michele Baldessari michele@pupazzo.org> + Timo Aaltonen +License: GPL-2+ + +License: GPL-2 + On Debian machines the full text of the GNU General Public License + version 2 can be found in the file /usr/share/common-licenses/GPL-2. + +License: GPL-2+ + On Debian machines the full text of the GNU General Public License + version 2 can be found in the file /usr/share/common-licenses/GPL-2. + +License: GPL-3+ + On Debian machines the full text of the GNU General Public License + version 3 can be found in the file /usr/share/common-licenses/GPL-3. + +License: BSD-2-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + . + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the Dojo Foundation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +License: AFL-2.1 + This Academic Free License (the "License") applies to any original work of + authorship (the "Original Work") whose owner (the "Licensor") has placed the + following notice immediately following the copyright notice for the Original + Work: + . + Licensed under the Academic Free License version 2.1 + . + 1) Grant of Copyright License. Licensor hereby grants You a world-wide, + royalty-free, non-exclusive, perpetual, sublicenseable license to do the + following: + . + a) to reproduce the Original Work in copies; + . + b) to prepare derivative works ("Derivative Works") based upon the Original + Work; + . + c) to distribute copies of the Original Work and Derivative Works to the + public; + . + d) to perform the Original Work publicly; and + . + e) to display the Original Work publicly. + . + 2) Grant of Patent License. Licensor hereby grants You a world-wide, + royalty-free, non-exclusive, perpetual, sublicenseable license, under patent + claims owned or controlled by the Licensor that are embodied in the Original + Work as furnished by the Licensor, to make, use, sell and offer for sale the + Original Work and Derivative Works. + . + 3) Grant of Source Code License. The term "Source Code" means the preferred + form of the Original Work for making modifications to it and all available + documentation describing how to modify the Original Work. Licensor hereby + agrees to provide a machine-readable copy of the Source Code of the Original + Work along with each copy of the Original Work that Licensor distributes. + Licensor reserves the right to satisfy this obligation by placing a + machine-readable copy of the Source Code in an information repository + reasonably calculated to permit inexpensive and convenient access by You for as + long as Licensor continues to distribute the Original Work, and by publishing + the address of that information repository in a notice immediately following + the copyright notice that applies to the Original Work. + . + 4) Exclusions From License Grant. Neither the names of Licensor, nor the names + of any contributors to the Original Work, nor any of their trademarks or + service marks, may be used to endorse or promote products derived from this + Original Work without express prior written permission of the Licensor. Nothing + in this License shall be deemed to grant any rights to trademarks, copyrights, + patents, trade secrets or any other intellectual property of Licensor except as + expressly stated herein. No patent license is granted to make, use, sell or + offer to sell embodiments of any patent claims other than the licensed claims + defined in Section 2. No right is granted to the trademarks of Licensor even if + such marks are included in the Original Work. Nothing in this License shall be + interpreted to prohibit Licensor from licensing under different terms from this + License any Original Work that Licensor otherwise would have a right to + license. + . + 5) This section intentionally omitted. + . + 6) Attribution Rights. You must retain, in the Source Code of any Derivative + Works that You create, all copyright, patent or trademark notices from the + Source Code of the Original Work, as well as any notices of licensing and any + descriptive text identified therein as an "Attribution Notice." You must cause + the Source Code for any Derivative Works that You create to carry a prominent + Attribution Notice reasonably calculated to inform recipients that You have + modified the Original Work. + . + 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that + the copyright in and to the Original Work and the patent rights granted herein + by Licensor are owned by the Licensor or are sublicensed to You under the terms + of this License with the permission of the contributor(s) of those copyrights + and patent rights. Except as expressly stated in the immediately proceeding + sentence, the Original Work is provided under this License on an "AS IS" BASIS + and WITHOUT WARRANTY, either express or implied, including, without limitation, + the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. + This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No + license to Original Work is granted hereunder except under this disclaimer. + . + 8) Limitation of Liability. Under no circumstances and under no legal theory, + whether in tort (including negligence), contract, or otherwise, shall the + Licensor be liable to any person for any direct, indirect, special, incidental, + or consequential damages of any character arising as a result of this License + or the use of the Original Work including, without limitation, damages for loss + of goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses. This limitation of liability shall not + apply to liability for death or personal injury resulting from Licensor's + negligence to the extent applicable law prohibits such limitation. Some + jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. + . + 9) Acceptance and Termination. If You distribute copies of the Original Work or + a Derivative Work, You must make a reasonable effort under the circumstances to + obtain the express assent of recipients to the terms of this License. Nothing + else but this License (or another written agreement between Licensor and You) + grants You permission to create Derivative Works based upon the Original Work + or to exercise any of the rights granted in Section 1 herein, and any attempt + to do so except under the terms of this License (or another written agreement + between Licensor and You) is expressly prohibited by U.S. copyright law, the + equivalent laws of other countries, and by international treaty. Therefore, by + exercising any of the rights granted to You in Section 1 herein, You indicate + Your acceptance of this License and all of its terms and conditions. + . + 10) Termination for Patent Action. This License shall terminate automatically + and You may no longer exercise any of the rights granted to You by this License + as of the date You commence an action, including a cross-claim or counterclaim, + against Licensor or any licensee alleging that the Original Work infringes a + patent. This termination provision shall not apply for an action alleging + patent infringement by combinations of the Original Work with other software or + hardware. + . + 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this + License may be brought only in the courts of a jurisdiction wherein the + Licensor resides or in which Licensor conducts its primary business, and under + the laws of that jurisdiction excluding its conflict-of-law provisions. The + application of the United Nations Convention on Contracts for the International + Sale of Goods is expressly excluded. Any use of the Original Work outside the + scope of this License or after its termination shall be subject to the + requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et + seq., the equivalent laws of other countries, and international treaty. This + section shall survive the termination of this License. + . + 12) Attorneys Fees. In any action to enforce the terms of this License or + seeking damages relating thereto, the prevailing party shall be entitled to + recover its costs and expenses, including, without limitation, reasonable + attorneys' fees and costs incurred in connection with such action, including + any appeal of such action. This section shall survive the termination of this + License. + . + 13) Miscellaneous. This License represents the complete agreement concerning + the subject matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent necessary to + make it enforceable. + . + 14) Definition of "You" in This License. "You" throughout this License, whether + in upper or lower case, means an individual or a legal entity exercising rights + under, and complying with all of the terms of, this License. For legal + entities, "You" includes any entity that controls, is controlled by, or is + under common control with you. For purposes of this definition, "control" means + (i) the power, direct or indirect, to cause the direction or management of such + entity, whether by contract or otherwise, or (ii) ownership of fifty percent + (50%) or more of the outstanding shares, or (iii) beneficial ownership of such + entity. + . + 15) Right to Use. You may use the Original Work in all ways not otherwise + restricted or conditioned by this License or by law, and Licensor promises not + to interfere with or be responsible for such uses by You. + . + This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. + Permission is hereby granted to copy and distribute this license without + modification. This license may not be modified without the express written + permission of its copyright owner. + +License: Apache-2.0 + On Debian machines the full text of the Apache License 2.0 can be found in the + file /usr/share/common-licenses/Apache-2.0. diff --git a/debian/freeipa-admintools.install b/debian/freeipa-admintools.install new file mode 100644 index 0000000..e185bdd --- /dev/null +++ b/debian/freeipa-admintools.install @@ -0,0 +1,3 @@ +usr/bin/ipa +usr/share/bash-completion/completions/ipa +usr/share/man/man1/ipa.1 diff --git a/debian/freeipa-admintools.lintian-overrides b/debian/freeipa-admintools.lintian-overrides new file mode 100644 index 0000000..6673d10 --- /dev/null +++ b/debian/freeipa-admintools.lintian-overrides @@ -0,0 +1,2 @@ +# lintian is lying +python-script-but-no-python-dep diff --git a/debian/freeipa-client.dirs b/debian/freeipa-client.dirs new file mode 100644 index 0000000..886e297 --- /dev/null +++ b/debian/freeipa-client.dirs @@ -0,0 +1,6 @@ +etc/ipa +etc/ipa/nssdb +etc/krb5.conf.d +etc/pki/nssdb +var/lib/ipa-client/sysrestore +var/lib/ipa-client/pki diff --git a/debian/freeipa-client.install b/debian/freeipa-client.install new file mode 100644 index 0000000..c1fac12 --- /dev/null +++ b/debian/freeipa-client.install @@ -0,0 +1,13 @@ +usr/sbin/ipa-certupdate +usr/sbin/ipa-client-automount +usr/sbin/ipa-client-install +usr/sbin/ipa-getkeytab +usr/sbin/ipa-join +usr/sbin/ipa-rmkeytab +usr/share/man/man1/ipa-certupdate.1* +usr/share/man/man1/ipa-client-automount.1* +usr/share/man/man1/ipa-client-install.1* +usr/share/man/man1/ipa-getkeytab.1* +usr/share/man/man1/ipa-join.1* +usr/share/man/man1/ipa-rmkeytab.1* +usr/share/man/man5/default.conf.5* diff --git a/debian/freeipa-client.lintian-overrides b/debian/freeipa-client.lintian-overrides new file mode 100644 index 0000000..fd934f5 --- /dev/null +++ b/debian/freeipa-client.lintian-overrides @@ -0,0 +1,3 @@ +# lintian is lying +python-script-but-no-python-dep +possible-bashism-in-maintainer-script diff --git a/debian/freeipa-client.postinst b/debian/freeipa-client.postinst new file mode 100644 index 0000000..de2fa60 --- /dev/null +++ b/debian/freeipa-client.postinst @@ -0,0 +1,17 @@ +#!/bin/sh +set -e + +LOGFILE=/var/log/ipaclient-upgrade.log + +if [ "$1" = configure ]; then + if [ -f /etc/ipa/nssdb/cert8.db ]; then + python2 -c 'from ipaclient.install.client import update_ipa_nssdb; update_ipa_nssdb()' \ + > $LOGFILE 2>&1 + fi +fi + +if [ ! -e /run/ipa ]; then + mkdir -m 0700 /run/ipa +fi + +#DEBHELPER# diff --git a/debian/freeipa-client.postrm b/debian/freeipa-client.postrm new file mode 100644 index 0000000..d7a9def --- /dev/null +++ b/debian/freeipa-client.postrm @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +if [ "$1" = purge ]; then + rm -f /etc/ipa/default.conf + rm -f /etc/pki/nssdb/cert8.db \ + /etc/pki/nssdb/key3.db \ + /etc/pki/nssdb/secmod.db + rm -f /etc/ipa/nssdb/cert8.db \ + /etc/ipa/nssdb/key3.db \ + /etc/ipa/nssdb/pwdfile.txt \ + /etc/ipa/nssdb/secmod.db \ + /etc/ipa/nssdb/*.orig + rmdir /etc/pki/nssdb || true + rmdir /etc/ipa/nssdb || true + rmdir /etc/ipa || true + rm -rf /var/lib/ipa-client + rm -f /var/log/ipaclient-upgrade.log +fi + +#DEBHELPER# + diff --git a/debian/freeipa-client.tmpfile b/debian/freeipa-client.tmpfile new file mode 100644 index 0000000..5d6759e --- /dev/null +++ b/debian/freeipa-client.tmpfile @@ -0,0 +1 @@ +d /var/run/ipa 0711 root root diff --git a/debian/freeipa-common.install b/debian/freeipa-common.install new file mode 100644 index 0000000..3635480 --- /dev/null +++ b/debian/freeipa-common.install @@ -0,0 +1 @@ +usr/share/locale diff --git a/debian/freeipa-server-dns.install b/debian/freeipa-server-dns.install new file mode 100644 index 0000000..d56bade --- /dev/null +++ b/debian/freeipa-server-dns.install @@ -0,0 +1,3 @@ +usr/sbin/ipa-dns-install +usr/share/man/man1/ipa-dns-install.1* + diff --git a/debian/freeipa-server-dns.lintian-overrides b/debian/freeipa-server-dns.lintian-overrides new file mode 100644 index 0000000..7a1cf29 --- /dev/null +++ b/debian/freeipa-server-dns.lintian-overrides @@ -0,0 +1,3 @@ +# lintian is lying +python-script-but-no-python-dep + diff --git a/debian/freeipa-server-trust-ad.install b/debian/freeipa-server-trust-ad.install new file mode 100644 index 0000000..5a5a68d --- /dev/null +++ b/debian/freeipa-server-trust-ad.install @@ -0,0 +1,7 @@ +etc/dbus-1/system.d/oddjob-ipa-trust.conf +etc/oddjobd.conf.d/oddjobd-ipa-trust.conf +usr/lib/*/samba/pdb/ipasam.so +usr/lib/ipa/oddjob/com.redhat.idm.trust-fetch-domains +usr/sbin/ipa-adtrust-install +usr/share/ipa/smb.conf.empty +usr/share/man/man1/ipa-adtrust-install.1* diff --git a/debian/freeipa-server-trust-ad.lintian-overrides b/debian/freeipa-server-trust-ad.lintian-overrides new file mode 100644 index 0000000..6673d10 --- /dev/null +++ b/debian/freeipa-server-trust-ad.lintian-overrides @@ -0,0 +1,2 @@ +# lintian is lying +python-script-but-no-python-dep diff --git a/debian/freeipa-server.dirs b/debian/freeipa-server.dirs new file mode 100644 index 0000000..3f6b8f6 --- /dev/null +++ b/debian/freeipa-server.dirs @@ -0,0 +1,3 @@ +etc/ipa/custodia +etc/ipa/dnssec +var/lib/ipa/backup diff --git a/debian/freeipa-server.docs b/debian/freeipa-server.docs new file mode 100644 index 0000000..b43bf86 --- /dev/null +++ b/debian/freeipa-server.docs @@ -0,0 +1 @@ +README.md diff --git a/debian/freeipa-server.install b/debian/freeipa-server.install new file mode 100644 index 0000000..9f0ee7d --- /dev/null +++ b/debian/freeipa-server.install @@ -0,0 +1,104 @@ +etc/default/ipa-dnskeysyncd +etc/default/ipa-ods-exporter +etc/ipa/html/* +etc/ipa/kdcproxy +etc/dbus-1/system.d/org.freeipa.server.conf +etc/oddjobd.conf.d/ipa-server.conf +lib/systemd/system/* +usr/lib/*/dirsrv/plugins/libipa_cldap.so +usr/lib/*/dirsrv/plugins/libipa_dns.so +usr/lib/*/dirsrv/plugins/libipa_enrollment_extop.so +usr/lib/*/dirsrv/plugins/libipa_extdom_extop.so +usr/lib/*/dirsrv/plugins/libipa_lockout.so +usr/lib/*/dirsrv/plugins/libipa_modrdn.so +usr/lib/*/dirsrv/plugins/libipa_otp_counter.so +usr/lib/*/dirsrv/plugins/libipa_otp_lasttoken.so +usr/lib/*/dirsrv/plugins/libipa_pwd_extop.so +usr/lib/*/dirsrv/plugins/libipa_range_check.so +usr/lib/*/dirsrv/plugins/libipa_repl_version.so +usr/lib/*/dirsrv/plugins/libipa_sidgen.so +usr/lib/*/dirsrv/plugins/libipa_sidgen_task.so +usr/lib/*/dirsrv/plugins/libipa_uuid.so +usr/lib/*/dirsrv/plugins/libipa_winsync.so +usr/lib/*/dirsrv/plugins/libtopology.so +usr/lib/*/krb5/plugins/kdb/*.so +usr/lib/certmonger/dogtag-ipa-ca-renew-agent-submit +usr/lib/certmonger/ipa-server-guard +usr/lib/ipa/certmonger/* +usr/lib/ipa/ipa-custodia +usr/lib/ipa/ipa-custodia-check +usr/lib/ipa/ipa-dnskeysync-replica +usr/lib/ipa/ipa-dnskeysyncd +usr/lib/ipa/ipa-httpd-kdcproxy +usr/lib/ipa/ipa-ods-exporter +usr/lib/ipa/ipa-otpd +usr/lib/ipa/ipa-pki-retrieve-key +usr/lib/ipa/oddjob/org.freeipa.server.conncheck +usr/lib/tmpfiles.d/ipa.conf +usr/sbin/ipa-advise +usr/sbin/ipa-backup +usr/sbin/ipa-ca-install +usr/sbin/ipa-cacert-manage +usr/sbin/ipa-compat-manage +usr/sbin/ipa-csreplica-manage +usr/sbin/ipa-kra-install +usr/sbin/ipa-ldap-updater +usr/sbin/ipa-managed-entries +usr/sbin/ipa-nis-manage +usr/sbin/ipa-otptoken-import +usr/sbin/ipa-pkinit-manage +usr/sbin/ipa-replica-conncheck +usr/sbin/ipa-replica-install +usr/sbin/ipa-replica-manage +usr/sbin/ipa-replica-prepare +usr/sbin/ipa-restore +usr/sbin/ipa-server-certinstall +usr/sbin/ipa-server-install +usr/sbin/ipa-server-upgrade +usr/sbin/ipa-winsync-migrate +usr/sbin/ipactl +usr/share/ipa/*.ldif +usr/share/ipa/*.template +usr/share/ipa/*.uldif +usr/share/ipa/advise/legacy/*.template +usr/share/ipa/gssapi.login +usr/share/ipa/html/* +usr/share/ipa/ipa-pki-proxy.conf +usr/share/ipa/ipa-rewrite.conf +usr/share/ipa/ipa.conf +usr/share/ipa/ipakrb5.aug +usr/share/ipa/kdcproxy.wsgi +usr/share/ipa/migration/* +usr/share/ipa/profiles/README +usr/share/ipa/profiles/*.cfg +usr/share/ipa/schema.d/* +usr/share/ipa/ui/* +usr/share/ipa/updates/* +usr/share/ipa/wsgi.py +usr/share/ipa/wsgi/* +usr/share/man/man1/ipa-advise.1* +usr/share/man/man1/ipa-backup.1* +usr/share/man/man1/ipa-ca-install.1* +usr/share/man/man1/ipa-cacert-manage.1* +usr/share/man/man1/ipa-compat-manage.1* +usr/share/man/man1/ipa-csreplica-manage.1* +usr/share/man/man1/ipa-kra-install.1* +usr/share/man/man1/ipa-ldap-updater.1* +usr/share/man/man1/ipa-managed-entries.1* +usr/share/man/man1/ipa-nis-manage.1* +usr/share/man/man1/ipa-otptoken-import.1* +usr/share/man/man1/ipa-pkinit-manage.1* +usr/share/man/man1/ipa-replica-conncheck.1* +usr/share/man/man1/ipa-replica-install.1* +usr/share/man/man1/ipa-replica-manage.1* +usr/share/man/man1/ipa-replica-prepare.1* +usr/share/man/man1/ipa-restore.1* +usr/share/man/man1/ipa-server-certinstall.1* +usr/share/man/man1/ipa-server-install.1* +usr/share/man/man1/ipa-server-upgrade.1* +usr/share/man/man1/ipa-winsync-migrate.1* +usr/share/man/man8/ipactl.8* +var/lib/ipa/pki-ca +var/lib/ipa/gssproxy +var/lib/ipa/sysrestore +var/lib/ipa/sysupgrade diff --git a/debian/freeipa-server.links b/debian/freeipa-server.links new file mode 100644 index 0000000..b9c0153 --- /dev/null +++ b/debian/freeipa-server.links @@ -0,0 +1,8 @@ +/etc/ipa/html/browserconfig.html usr/share/ipa/html/browserconfig.html +/etc/ipa/html/ffconfig.js usr/share/ipa/html/ffconfig.js +/etc/ipa/html/ffconfig_page.js usr/share/ipa/html/ffconfig_page.js +/etc/ipa/html/ssbrowser.html usr/share/ipa/html/ssbrowser.html +/etc/ipa/html/unauthorized.html usr/share/ipa/html/unauthorized.html +/usr/share/javascript/prototype/prototype.js /usr/share/ipa/ipagui/static/javascript/prototype.js +/usr/share/javascript/scriptaculous/effects.js /usr/share/ipa/ipagui/static/javascript/effects.js +/usr/share/javascript/scriptaculous/scriptaculous.js /usr/share/ipa/ipagui/static/javascript/scriptaculous.js diff --git a/debian/freeipa-server.lintian-overrides b/debian/freeipa-server.lintian-overrides new file mode 100644 index 0000000..9b4b31d --- /dev/null +++ b/debian/freeipa-server.lintian-overrides @@ -0,0 +1,9 @@ +# lintian is lying +python-script-but-no-python-dep +# we really need apache2 +web-application-should-not-depend-unconditionally-on-apache2 +# embedded versions used for better performance and function +embedded-javascript-library +# this is how we need them +non-standard-dir-perm var/cache/bind/data/ * +non-standard-dir-perm var/lib/ipa/backup/ * diff --git a/debian/freeipa-server.postinst b/debian/freeipa-server.postinst new file mode 100644 index 0000000..9a46221 --- /dev/null +++ b/debian/freeipa-server.postinst @@ -0,0 +1,81 @@ +#!/bin/sh +set -e + +OUT=/dev/null + +if [ "$1" = configure ]; then + if ! getent passwd kdcproxy > $OUT; then + adduser --quiet --system --home / \ + --shell /usr/sbin/nologin --group \ + --no-create-home --gecos "IPA KDC Proxy User" \ + kdcproxy > $OUT + fi + if ! getent passwd ipaapi > $OUT; then + adduser --quiet --system --home / \ + --shell /usr/sbin/nologin --group \ + --no-create-home --gecos "IPA Framework User" \ + ipaapi > $OUT + fi + + # add www-data to ipaapi group + if ! id -Gn www-data | grep '\bipaapi\b' >/dev/null; then + usermod www-data -a -G ipaapi + fi + + if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then + . /usr/share/apache2/apache2-maintscript-helper + if [ ! -e /etc/apache2/mods-enabled/auth_gssapi.load ]; then + apache2_invoke enmod auth_gssapi || exit $? + fi + if [ ! -e /etc/apache2/mods-enabled/authz_user.load ]; then + apache2_invoke enmod authz_user || exit $? + fi + if [ ! -e /etc/apache2/mods-enabled/deflate.load ]; then + apache2_invoke enmod deflate || exit $? + fi + if [ ! -e /etc/apache2/mods-enabled/expires.load ]; then + apache2_invoke enmod expires || exit $? + fi + if [ ! -e /etc/apache2/mods-enabled/headers.load ]; then + apache2_invoke enmod headers || exit $? + fi + if [ ! -e /etc/apache2/mods-enabled/lookup_identity.load ]; then + apache2_invoke enmod lookup_identity || exit $? + fi + if [ ! -e /etc/apache2/mods-enabled/proxy.load ]; then + apache2_invoke enmod proxy || exit $? + fi + if [ ! -e /etc/apache2/mods-enabled/proxy_ajp.load ]; then + apache2_invoke enmod proxy_ajp || exit $? + fi + if [ ! -e /etc/apache2/mods-enabled/proxy_http.load ]; then + apache2_invoke enmod proxy_http || exit $? + fi + if [ ! -e /etc/apache2/mods-enabled/rewrite.load ]; then + apache2_invoke enmod rewrite || exit $? + fi + fi + + # check if IPA is set up + is_configured=`python2 -c 'from ipaserver.install import installutils; print "yes" if installutils.is_ipa_configured() else "no";'` + if [ $is_configured = yes ]; then + echo "Running ipa-server-upgrade..." + ipa-server-upgrade --quiet >/dev/null + fi +fi + +if [ ! -e /run/apache2/ipa ]; then + mkdir -m 0700 /run/apache2/ipa + chown www-data:www-data /run/apache2/ipa + + if [ ! -e /run/apache2/ipa/clientcaches ]; then + mkdir -m 0700 /run/apache2/ipa/clientcaches + chown www-data:www-data /run/apache2/ipa/clientcaches + fi + if [ ! -e /run/apache2/ipa/krbcache ]; then + mkdir -m 0700 /run/apache2/ipa/krbcache + chown www-data:www-data /run/apache2/ipa/krbcache + fi +fi + +#DEBHELPER# diff --git a/debian/freeipa-server.postrm b/debian/freeipa-server.postrm new file mode 100644 index 0000000..3765846 --- /dev/null +++ b/debian/freeipa-server.postrm @@ -0,0 +1,56 @@ +#!/bin/sh +set -e + +case "$1" in + remove|purge) + if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then + . /usr/share/apache2/apache2-maintscript-helper + + if [ -e /etc/apache2/mods-enabled/auth_kerb.load ]; then + apache2_invoke dismod auth_kerb || exit $? + fi + if [ -e /etc/apache2/mods-enabled/auth_gssapi.load ]; then + apache2_invoke dismod auth_gssapi || exit $? + fi + if [ -e /etc/apache2/mods-enabled/authz_user.load ]; then + apache2_invoke dismod authz_user || exit $? + fi + if [ -e /etc/apache2/mods-enabled/deflate.load ]; then + apache2_invoke dismod deflate || exit $? + fi + if [ -e /etc/apache2/mods-enabled/expires.load ]; then + apache2_invoke dismod expires || exit $? + fi + if [ -e /etc/apache2/mods-enabled/headers.load ]; then + apache2_invoke dismod headers || exit $? + fi + if [ -e /etc/apache2/mods-enabled/lookup_identity.load ]; then + apache2_invoke dismod lookup_identity || exit $? + fi + if [ -e /etc/apache2/mods-enabled/proxy.load ]; then + apache2_invoke dismod proxy || exit $? + fi + if [ -e /etc/apache2/mods-enabled/proxy_ajp.load ]; then + apache2_invoke dismod proxy_ajp || exit $? + fi + if [ -e /etc/apache2/mods-enabled/proxy_http.load ]; then + apache2_invoke dismod proxy_http || exit $? + fi + if [ -e /etc/apache2/mods-enabled/rewrite.load ]; then + apache2_invoke dismod rewrite || exit $? + fi + fi + ;; +esac +case "$1" in + purge) + rm -f \ + /var/log/ipareplica-conncheck.log \ + /var/log/ipareplica-install.log \ + /var/log/ipaserver-install.log \ + /var/log/ipaserver-uninstall.log \ + /var/log/ipaupgrade.log + ;; +esac + +#DEBHELPER# diff --git a/debian/freeipa-server.prerm b/debian/freeipa-server.prerm new file mode 100644 index 0000000..23a60eb --- /dev/null +++ b/debian/freeipa-server.prerm @@ -0,0 +1,26 @@ +#!/bin/sh +set -e + +if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then + . /usr/share/apache2/apache2-maintscript-helper + if [ -e /etc/apache2/mods-enabled/auth_kerb ]; then + apache2_invoke dismod auth_kerb || exit $? + fi + if [ -e /etc/apache2/mods-enabled/auth_gssapi ]; then + apache2_invoke dismod auth_gssapi || exit $? + fi + if [ -e /etc/apache2/mods-enabled/expires ]; then + apache2_invoke dismod expires || exit $? + fi + if [ -e /etc/apache2/mods-enabled/headers ]; then + apache2_invoke dismod headers || exit $? + fi + if [ -e /etc/apache2/mods-enabled/proxy ]; then + apache2_invoke dismod proxy || exit $? + fi + if [ -e /etc/apache2/mods-enabled/rewrite ]; then + apache2_invoke dismod rewrite || exit $? + fi +fi + +#DEBHELPER# diff --git a/debian/freeipa-tests.install b/debian/freeipa-tests.install new file mode 100644 index 0000000..5b56371 --- /dev/null +++ b/debian/freeipa-tests.install @@ -0,0 +1,6 @@ +usr/bin/ipa-run-tests +usr/bin/ipa-test-config +usr/bin/ipa-test-task +usr/share/man/man1/ipa-run-tests.1* +usr/share/man/man1/ipa-test-config.1* +usr/share/man/man1/ipa-test-task.1* diff --git a/debian/freeipa-tests.lintian-overrides b/debian/freeipa-tests.lintian-overrides new file mode 100644 index 0000000..6204789 --- /dev/null +++ b/debian/freeipa-tests.lintian-overrides @@ -0,0 +1,2 @@ +# lintian is just wrong +freeipa-tests: python-script-but-no-python-dep diff --git a/debian/missing-sources/bootstrap-datepicker.js b/debian/missing-sources/bootstrap-datepicker.js new file mode 100644 index 0000000..50895f3 --- /dev/null +++ b/debian/missing-sources/bootstrap-datepicker.js @@ -0,0 +1,1798 @@ +/* ========================================================= + * bootstrap-datepicker.js + * Repo: https://github.com/eternicode/bootstrap-datepicker/ + * Demo: http://eternicode.github.io/bootstrap-datepicker/ + * Docs: http://bootstrap-datepicker.readthedocs.org/ + * Forked from http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Started by Stefan Petre; improvements by Andrew Rowls + contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= */ + +(function($, undefined){ + + function UTCDate(){ + return new Date(Date.UTC.apply(Date, arguments)); + } + function UTCToday(){ + var today = new Date(); + return UTCDate(today.getFullYear(), today.getMonth(), today.getDate()); + } + function isUTCEquals(date1, date2) { + return ( + date1.getUTCFullYear() === date2.getUTCFullYear() && + date1.getUTCMonth() === date2.getUTCMonth() && + date1.getUTCDate() === date2.getUTCDate() + ); + } + function alias(method){ + return function(){ + return this[method].apply(this, arguments); + }; + } + + var DateArray = (function(){ + var extras = { + get: function(i){ + return this.slice(i)[0]; + }, + contains: function(d){ + // Array.indexOf is not cross-browser; + // $.inArray doesn't work with Dates + var val = d && d.valueOf(); + for (var i=0, l=this.length; i < l; i++) + if (this[i].valueOf() === val) + return i; + return -1; + }, + remove: function(i){ + this.splice(i,1); + }, + replace: function(new_array){ + if (!new_array) + return; + if (!$.isArray(new_array)) + new_array = [new_array]; + this.clear(); + this.push.apply(this, new_array); + }, + clear: function(){ + this.length = 0; + }, + copy: function(){ + var a = new DateArray(); + a.replace(this); + return a; + } + }; + + return function(){ + var a = []; + a.push.apply(a, arguments); + $.extend(a, extras); + return a; + }; + })(); + + + // Picker object + + var Datepicker = function(element, options){ + this._process_options(options); + + this.dates = new DateArray(); + this.viewDate = this.o.defaultViewDate; + this.focusDate = null; + + this.element = $(element); + this.isInline = false; + this.isInput = this.element.is('input'); + this.component = this.element.hasClass('date') ? this.element.find('.add-on, .input-group-addon, .btn') : false; + this.hasInput = this.component && this.element.find('input').length; + if (this.component && this.component.length === 0) + this.component = false; + + this.picker = $(DPGlobal.template); + this._buildEvents(); + this._attachEvents(); + + if (this.isInline){ + this.picker.addClass('datepicker-inline').appendTo(this.element); + } + else { + this.picker.addClass('datepicker-dropdown dropdown-menu'); + } + + if (this.o.rtl){ + this.picker.addClass('datepicker-rtl'); + } + + this.viewMode = this.o.startView; + + if (this.o.calendarWeeks) + this.picker.find('tfoot .today, tfoot .clear') + .attr('colspan', function(i, val){ + return parseInt(val) + 1; + }); + + this._allow_update = false; + + this.setStartDate(this._o.startDate); + this.setEndDate(this._o.endDate); + this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled); + this.setDatesDisabled(this.o.datesDisabled); + + this.fillDow(); + this.fillMonths(); + + this._allow_update = true; + + this.update(); + this.showMode(); + + if (this.isInline){ + this.show(); + } + }; + + Datepicker.prototype = { + constructor: Datepicker, + + _process_options: function(opts){ + // Store raw options for reference + this._o = $.extend({}, this._o, opts); + // Processed options + var o = this.o = $.extend({}, this._o); + + // Check if "de-DE" style date is available, if not language should + // fallback to 2 letter code eg "de" + var lang = o.language; + if (!dates[lang]){ + lang = lang.split('-')[0]; + if (!dates[lang]) + lang = defaults.language; + } + o.language = lang; + + switch (o.startView){ + case 2: + case 'decade': + o.startView = 2; + break; + case 1: + case 'year': + o.startView = 1; + break; + default: + o.startView = 0; + } + + switch (o.minViewMode){ + case 1: + case 'months': + o.minViewMode = 1; + break; + case 2: + case 'years': + o.minViewMode = 2; + break; + default: + o.minViewMode = 0; + } + + o.startView = Math.max(o.startView, o.minViewMode); + + // true, false, or Number > 0 + if (o.multidate !== true){ + o.multidate = Number(o.multidate) || false; + if (o.multidate !== false) + o.multidate = Math.max(0, o.multidate); + } + o.multidateSeparator = String(o.multidateSeparator); + + o.weekStart %= 7; + o.weekEnd = ((o.weekStart + 6) % 7); + + var format = DPGlobal.parseFormat(o.format); + if (o.startDate !== -Infinity){ + if (!!o.startDate){ + if (o.startDate instanceof Date) + o.startDate = this._local_to_utc(this._zero_time(o.startDate)); + else + o.startDate = DPGlobal.parseDate(o.startDate, format, o.language); + } + else { + o.startDate = -Infinity; + } + } + if (o.endDate !== Infinity){ + if (!!o.endDate){ + if (o.endDate instanceof Date) + o.endDate = this._local_to_utc(this._zero_time(o.endDate)); + else + o.endDate = DPGlobal.parseDate(o.endDate, format, o.language); + } + else { + o.endDate = Infinity; + } + } + + o.daysOfWeekDisabled = o.daysOfWeekDisabled||[]; + if (!$.isArray(o.daysOfWeekDisabled)) + o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/); + o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function(d){ + return parseInt(d, 10); + }); + + o.datesDisabled = o.datesDisabled||[]; + if (!$.isArray(o.datesDisabled)) { + var datesDisabled = []; + datesDisabled.push(DPGlobal.parseDate(o.datesDisabled, format, o.language)); + o.datesDisabled = datesDisabled; + } + o.datesDisabled = $.map(o.datesDisabled,function(d){ + return DPGlobal.parseDate(d, format, o.language); + }); + + var plc = String(o.orientation).toLowerCase().split(/\s+/g), + _plc = o.orientation.toLowerCase(); + plc = $.grep(plc, function(word){ + return /^auto|left|right|top|bottom$/.test(word); + }); + o.orientation = {x: 'auto', y: 'auto'}; + if (!_plc || _plc === 'auto') + ; // no action + else if (plc.length === 1){ + switch (plc[0]){ + case 'top': + case 'bottom': + o.orientation.y = plc[0]; + break; + case 'left': + case 'right': + o.orientation.x = plc[0]; + break; + } + } + else { + _plc = $.grep(plc, function(word){ + return /^left|right$/.test(word); + }); + o.orientation.x = _plc[0] || 'auto'; + + _plc = $.grep(plc, function(word){ + return /^top|bottom$/.test(word); + }); + o.orientation.y = _plc[0] || 'auto'; + } + if (o.defaultViewDate) { + var year = o.defaultViewDate.year || new Date().getFullYear(); + var month = o.defaultViewDate.month || 0; + var day = o.defaultViewDate.day || 1; + o.defaultViewDate = UTCDate(year, month, day); + } else { + o.defaultViewDate = UTCToday(); + } + o.showOnFocus = o.showOnFocus !== undefined ? o.showOnFocus : true; + }, + _events: [], + _secondaryEvents: [], + _applyEvents: function(evs){ + for (var i=0, el, ch, ev; i < evs.length; i++){ + el = evs[i][0]; + if (evs[i].length === 2){ + ch = undefined; + ev = evs[i][1]; + } + else if (evs[i].length === 3){ + ch = evs[i][1]; + ev = evs[i][2]; + } + el.on(ev, ch); + } + }, + _unapplyEvents: function(evs){ + for (var i=0, el, ev, ch; i < evs.length; i++){ + el = evs[i][0]; + if (evs[i].length === 2){ + ch = undefined; + ev = evs[i][1]; + } + else if (evs[i].length === 3){ + ch = evs[i][1]; + ev = evs[i][2]; + } + el.off(ev, ch); + } + }, + _buildEvents: function(){ + var events = { + keyup: $.proxy(function(e){ + if ($.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) === -1) + this.update(); + }, this), + keydown: $.proxy(this.keydown, this) + }; + + if (this.o.showOnFocus === true) { + events.focus = $.proxy(this.show, this); + } + + if (this.isInput) { // single input + this._events = [ + [this.element, events] + ]; + } + else if (this.component && this.hasInput) { // component: input + button + this._events = [ + // For components that are not readonly, allow keyboard nav + [this.element.find('input'), events], + [this.component, { + click: $.proxy(this.show, this) + }] + ]; + } + else if (this.element.is('div')){ // inline datepicker + this.isInline = true; + } + else { + this._events = [ + [this.element, { + click: $.proxy(this.show, this) + }] + ]; + } + this._events.push( + // Component: listen for blur on element descendants + [this.element, '*', { + blur: $.proxy(function(e){ + this._focused_from = e.target; + }, this) + }], + // Input: listen for blur on element + [this.element, { + blur: $.proxy(function(e){ + this._focused_from = e.target; + }, this) + }] + ); + + this._secondaryEvents = [ + [this.picker, { + click: $.proxy(this.click, this) + }], + [$(window), { + resize: $.proxy(this.place, this) + }], + [$(document), { + 'mousedown touchstart': $.proxy(function(e){ + // Clicked outside the datepicker, hide it + if (!( + this.element.is(e.target) || + this.element.find(e.target).length || + this.picker.is(e.target) || + this.picker.find(e.target).length + )){ + this.hide(); + } + }, this) + }] + ]; + }, + _attachEvents: function(){ + this._detachEvents(); + this._applyEvents(this._events); + }, + _detachEvents: function(){ + this._unapplyEvents(this._events); + }, + _attachSecondaryEvents: function(){ + this._detachSecondaryEvents(); + this._applyEvents(this._secondaryEvents); + }, + _detachSecondaryEvents: function(){ + this._unapplyEvents(this._secondaryEvents); + }, + _trigger: function(event, altdate){ + var date = altdate || this.dates.get(-1), + local_date = this._utc_to_local(date); + + this.element.trigger({ + type: event, + date: local_date, + dates: $.map(this.dates, this._utc_to_local), + format: $.proxy(function(ix, format){ + if (arguments.length === 0){ + ix = this.dates.length - 1; + format = this.o.format; + } + else if (typeof ix === 'string'){ + format = ix; + ix = this.dates.length - 1; + } + format = format || this.o.format; + var date = this.dates.get(ix); + return DPGlobal.formatDate(date, format, this.o.language); + }, this) + }); + }, + + show: function(){ + if (this.element.attr('readonly') && this.o.enableOnReadonly === false) + return; + if (!this.isInline) + this.picker.appendTo(this.o.container); + this.place(); + this.picker.show(); + this._attachSecondaryEvents(); + this._trigger('show'); + if ((window.navigator.msMaxTouchPoints || 'ontouchstart' in document) && this.o.disableTouchKeyboard) { + $(this.element).blur(); + } + return this; + }, + + hide: function(){ + if (this.isInline) + return this; + if (!this.picker.is(':visible')) + return this; + this.focusDate = null; + this.picker.hide().detach(); + this._detachSecondaryEvents(); + this.viewMode = this.o.startView; + this.showMode(); + + if ( + this.o.forceParse && + ( + this.isInput && this.element.val() || + this.hasInput && this.element.find('input').val() + ) + ) + this.setValue(); + this._trigger('hide'); + return this; + }, + + remove: function(){ + this.hide(); + this._detachEvents(); + this._detachSecondaryEvents(); + this.picker.remove(); + delete this.element.data().datepicker; + if (!this.isInput){ + delete this.element.data().date; + } + return this; + }, + + _utc_to_local: function(utc){ + return utc && new Date(utc.getTime() + (utc.getTimezoneOffset()*60000)); + }, + _local_to_utc: function(local){ + return local && new Date(local.getTime() - (local.getTimezoneOffset()*60000)); + }, + _zero_time: function(local){ + return local && new Date(local.getFullYear(), local.getMonth(), local.getDate()); + }, + _zero_utc_time: function(utc){ + return utc && new Date(Date.UTC(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate())); + }, + + getDates: function(){ + return $.map(this.dates, this._utc_to_local); + }, + + getUTCDates: function(){ + return $.map(this.dates, function(d){ + return new Date(d); + }); + }, + + getDate: function(){ + return this._utc_to_local(this.getUTCDate()); + }, + + getUTCDate: function(){ + var selected_date = this.dates.get(-1); + if (typeof selected_date !== 'undefined') { + return new Date(selected_date); + } else { + return null; + } + }, + + clearDates: function(){ + var element; + if (this.isInput) { + element = this.element; + } else if (this.component) { + element = this.element.find('input'); + } + + if (element) { + element.val('').change(); + } + + this.update(); + this._trigger('changeDate'); + + if (this.o.autoclose) { + this.hide(); + } + }, + setDates: function(){ + var args = $.isArray(arguments[0]) ? arguments[0] : arguments; + this.update.apply(this, args); + this._trigger('changeDate'); + this.setValue(); + return this; + }, + + setUTCDates: function(){ + var args = $.isArray(arguments[0]) ? arguments[0] : arguments; + this.update.apply(this, $.map(args, this._utc_to_local)); + this._trigger('changeDate'); + this.setValue(); + return this; + }, + + setDate: alias('setDates'), + setUTCDate: alias('setUTCDates'), + + setValue: function(){ + var formatted = this.getFormattedDate(); + if (!this.isInput){ + if (this.component){ + this.element.find('input').val(formatted).change(); + } + } + else { + this.element.val(formatted).change(); + } + return this; + }, + + getFormattedDate: function(format){ + if (format === undefined) + format = this.o.format; + + var lang = this.o.language; + return $.map(this.dates, function(d){ + return DPGlobal.formatDate(d, format, lang); + }).join(this.o.multidateSeparator); + }, + + setStartDate: function(startDate){ + this._process_options({startDate: startDate}); + this.update(); + this.updateNavArrows(); + return this; + }, + + setEndDate: function(endDate){ + this._process_options({endDate: endDate}); + this.update(); + this.updateNavArrows(); + return this; + }, + + setDaysOfWeekDisabled: function(daysOfWeekDisabled){ + this._process_options({daysOfWeekDisabled: daysOfWeekDisabled}); + this.update(); + this.updateNavArrows(); + return this; + }, + + setDatesDisabled: function(datesDisabled){ + this._process_options({datesDisabled: datesDisabled}); + this.update(); + this.updateNavArrows(); + }, + + place: function(){ + if (this.isInline) + return this; + var calendarWidth = this.picker.outerWidth(), + calendarHeight = this.picker.outerHeight(), + visualPadding = 10, + windowWidth = $(this.o.container).width(), + windowHeight = $(this.o.container).height(), + scrollTop = $(this.o.container).scrollTop(), + appendOffset = $(this.o.container).offset(); + + var parentsZindex = []; + this.element.parents().each(function(){ + var itemZIndex = $(this).css('z-index'); + if (itemZIndex !== 'auto' && itemZIndex !== 0) parentsZindex.push(parseInt(itemZIndex)); + }); + var zIndex = Math.max.apply(Math, parentsZindex) + 10; + var offset = this.component ? this.component.parent().offset() : this.element.offset(); + var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false); + var width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false); + var left = offset.left - appendOffset.left, + top = offset.top - appendOffset.top; + + this.picker.removeClass( + 'datepicker-orient-top datepicker-orient-bottom '+ + 'datepicker-orient-right datepicker-orient-left' + ); + + if (this.o.orientation.x !== 'auto'){ + this.picker.addClass('datepicker-orient-' + this.o.orientation.x); + if (this.o.orientation.x === 'right') + left -= calendarWidth - width; + } + // auto x orientation is best-placement: if it crosses a window + // edge, fudge it sideways + else { + if (offset.left < 0) { + // component is outside the window on the left side. Move it into visible range + this.picker.addClass('datepicker-orient-left'); + left -= offset.left - visualPadding; + } else if (left + calendarWidth > windowWidth) { + // the calendar passes the widow right edge. Align it to component right side + this.picker.addClass('datepicker-orient-right'); + left = offset.left + width - calendarWidth; + } else { + // Default to left + this.picker.addClass('datepicker-orient-left'); + } + } + + // auto y orientation is best-situation: top or bottom, no fudging, + // decision based on which shows more of the calendar + var yorient = this.o.orientation.y, + top_overflow, bottom_overflow; + if (yorient === 'auto'){ + top_overflow = -scrollTop + top - calendarHeight; + bottom_overflow = scrollTop + windowHeight - (top + height + calendarHeight); + if (Math.max(top_overflow, bottom_overflow) === bottom_overflow) + yorient = 'top'; + else + yorient = 'bottom'; + } + this.picker.addClass('datepicker-orient-' + yorient); + if (yorient === 'top') + top += height; + else + top -= calendarHeight + parseInt(this.picker.css('padding-top')); + + if (this.o.rtl) { + var right = windowWidth - (left + width); + this.picker.css({ + top: top, + right: right, + zIndex: zIndex + }); + } else { + this.picker.css({ + top: top, + left: left, + zIndex: zIndex + }); + } + return this; + }, + + _allow_update: true, + update: function(){ + if (!this._allow_update) + return this; + + var oldDates = this.dates.copy(), + dates = [], + fromArgs = false; + if (arguments.length){ + $.each(arguments, $.proxy(function(i, date){ + if (date instanceof Date) + date = this._local_to_utc(date); + dates.push(date); + }, this)); + fromArgs = true; + } + else { + dates = this.isInput + ? this.element.val() + : this.element.data('date') || this.element.find('input').val(); + if (dates && this.o.multidate) + dates = dates.split(this.o.multidateSeparator); + else + dates = [dates]; + delete this.element.data().date; + } + + dates = $.map(dates, $.proxy(function(date){ + return DPGlobal.parseDate(date, this.o.format, this.o.language); + }, this)); + dates = $.grep(dates, $.proxy(function(date){ + return ( + date < this.o.startDate || + date > this.o.endDate || + !date + ); + }, this), true); + this.dates.replace(dates); + + if (this.dates.length) + this.viewDate = new Date(this.dates.get(-1)); + else if (this.viewDate < this.o.startDate) + this.viewDate = new Date(this.o.startDate); + else if (this.viewDate > this.o.endDate) + this.viewDate = new Date(this.o.endDate); + + if (fromArgs){ + // setting date by clicking + this.setValue(); + } + else if (dates.length){ + // setting date by typing + if (String(oldDates) !== String(this.dates)) + this._trigger('changeDate'); + } + if (!this.dates.length && oldDates.length) + this._trigger('clearDate'); + + this.fill(); + return this; + }, + + fillDow: function(){ + var dowCnt = this.o.weekStart, + html = ''; + if (this.o.calendarWeeks){ + this.picker.find('.datepicker-days thead tr:first-child .datepicker-switch') + .attr('colspan', function(i, val){ + return parseInt(val) + 1; + }); + var cell = ' '; + html += cell; + } + while (dowCnt < this.o.weekStart + 7){ + html += ''+dates[this.o.language].daysMin[(dowCnt++)%7]+''; + } + html += ''; + this.picker.find('.datepicker-days thead').append(html); + }, + + fillMonths: function(){ + var html = '', + i = 0; + while (i < 12){ + html += ''+dates[this.o.language].monthsShort[i++]+''; + } + this.picker.find('.datepicker-months td').html(html); + }, + + setRange: function(range){ + if (!range || !range.length) + delete this.range; + else + this.range = $.map(range, function(d){ + return d.valueOf(); + }); + this.fill(); + }, + + getClassNames: function(date){ + var cls = [], + year = this.viewDate.getUTCFullYear(), + month = this.viewDate.getUTCMonth(), + today = new Date(); + if (date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month)){ + cls.push('old'); + } + else if (date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month)){ + cls.push('new'); + } + if (this.focusDate && date.valueOf() === this.focusDate.valueOf()) + cls.push('focused'); + // Compare internal UTC date with local today, not UTC today + if (this.o.todayHighlight && + date.getUTCFullYear() === today.getFullYear() && + date.getUTCMonth() === today.getMonth() && + date.getUTCDate() === today.getDate()){ + cls.push('today'); + } + if (this.dates.contains(date) !== -1) + cls.push('active'); + if (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate || + $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1){ + cls.push('disabled'); + } + if (this.o.datesDisabled.length > 0 && + $.grep(this.o.datesDisabled, function(d){ + return isUTCEquals(date, d); }).length > 0) { + cls.push('disabled', 'disabled-date'); + } + + if (this.range){ + if (date > this.range[0] && date < this.range[this.range.length-1]){ + cls.push('range'); + } + if ($.inArray(date.valueOf(), this.range) !== -1){ + cls.push('selected'); + } + } + return cls; + }, + + fill: function(){ + var d = new Date(this.viewDate), + year = d.getUTCFullYear(), + month = d.getUTCMonth(), + startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity, + startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity, + endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity, + endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity, + todaytxt = dates[this.o.language].today || dates['en'].today || '', + cleartxt = dates[this.o.language].clear || dates['en'].clear || '', + tooltip; + if (isNaN(year) || isNaN(month)) + return; + this.picker.find('.datepicker-days thead .datepicker-switch') + .text(dates[this.o.language].months[month]+' '+year); + this.picker.find('tfoot .today') + .text(todaytxt) + .toggle(this.o.todayBtn !== false); + this.picker.find('tfoot .clear') + .text(cleartxt) + .toggle(this.o.clearBtn !== false); + this.updateNavArrows(); + this.fillMonths(); + var prevMonth = UTCDate(year, month-1, 28), + day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); + prevMonth.setUTCDate(day); + prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7); + var nextMonth = new Date(prevMonth); + nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); + nextMonth = nextMonth.valueOf(); + var html = []; + var clsName; + while (prevMonth.valueOf() < nextMonth){ + if (prevMonth.getUTCDay() === this.o.weekStart){ + html.push(''); + if (this.o.calendarWeeks){ + // ISO 8601: First week contains first thursday. + // ISO also states week starts on Monday, but we can be more abstract here. + var + // Start of current week: based on weekstart/current date + ws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5), + // Thursday of this week + th = new Date(Number(ws) + (7 + 4 - ws.getUTCDay()) % 7 * 864e5), + // First Thursday of year, year from thursday + yth = new Date(Number(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5), + // Calendar week: ms between thursdays, div ms per day, div 7 days + calWeek = (th - yth) / 864e5 / 7 + 1; + html.push(''+ calWeek +''); + + } + } + clsName = this.getClassNames(prevMonth); + clsName.push('day'); + + if (this.o.beforeShowDay !== $.noop){ + var before = this.o.beforeShowDay(this._utc_to_local(prevMonth)); + if (before === undefined) + before = {}; + else if (typeof(before) === 'boolean') + before = {enabled: before}; + else if (typeof(before) === 'string') + before = {classes: before}; + if (before.enabled === false) + clsName.push('disabled'); + if (before.classes) + clsName = clsName.concat(before.classes.split(/\s+/)); + if (before.tooltip) + tooltip = before.tooltip; + } + + clsName = $.unique(clsName); + html.push(''+prevMonth.getUTCDate() + ''); + tooltip = null; + if (prevMonth.getUTCDay() === this.o.weekEnd){ + html.push(''); + } + prevMonth.setUTCDate(prevMonth.getUTCDate()+1); + } + this.picker.find('.datepicker-days tbody').empty().append(html.join('')); + + var months = this.picker.find('.datepicker-months') + .find('th:eq(1)') + .text(year) + .end() + .find('span').removeClass('active'); + + $.each(this.dates, function(i, d){ + if (d.getUTCFullYear() === year) + months.eq(d.getUTCMonth()).addClass('active'); + }); + + if (year < startYear || year > endYear){ + months.addClass('disabled'); + } + if (year === startYear){ + months.slice(0, startMonth).addClass('disabled'); + } + if (year === endYear){ + months.slice(endMonth+1).addClass('disabled'); + } + + if (this.o.beforeShowMonth !== $.noop){ + var that = this; + $.each(months, function(i, month){ + if (!$(month).hasClass('disabled')) { + var moDate = new Date(year, i, 1); + var before = that.o.beforeShowMonth(moDate); + if (before === false) + $(month).addClass('disabled'); + } + }); + } + + html = ''; + year = parseInt(year/10, 10) * 10; + var yearCont = this.picker.find('.datepicker-years') + .find('th:eq(1)') + .text(year + '-' + (year + 9)) + .end() + .find('td'); + year -= 1; + var years = $.map(this.dates, function(d){ + return d.getUTCFullYear(); + }), + classes; + for (var i = -1; i < 11; i++){ + classes = ['year']; + if (i === -1) + classes.push('old'); + else if (i === 10) + classes.push('new'); + if ($.inArray(year, years) !== -1) + classes.push('active'); + if (year < startYear || year > endYear) + classes.push('disabled'); + html += '' + year + ''; + year += 1; + } + yearCont.html(html); + }, + + updateNavArrows: function(){ + if (!this._allow_update) + return; + + var d = new Date(this.viewDate), + year = d.getUTCFullYear(), + month = d.getUTCMonth(); + switch (this.viewMode){ + case 0: + if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()){ + this.picker.find('.prev').css({visibility: 'hidden'}); + } + else { + this.picker.find('.prev').css({visibility: 'visible'}); + } + if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()){ + this.picker.find('.next').css({visibility: 'hidden'}); + } + else { + this.picker.find('.next').css({visibility: 'visible'}); + } + break; + case 1: + case 2: + if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear()){ + this.picker.find('.prev').css({visibility: 'hidden'}); + } + else { + this.picker.find('.prev').css({visibility: 'visible'}); + } + if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear()){ + this.picker.find('.next').css({visibility: 'hidden'}); + } + else { + this.picker.find('.next').css({visibility: 'visible'}); + } + break; + } + }, + + click: function(e){ + e.preventDefault(); + var target = $(e.target).closest('span, td, th'), + year, month, day; + if (target.length === 1){ + switch (target[0].nodeName.toLowerCase()){ + case 'th': + switch (target[0].className){ + case 'datepicker-switch': + this.showMode(1); + break; + case 'prev': + case 'next': + var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1); + switch (this.viewMode){ + case 0: + this.viewDate = this.moveMonth(this.viewDate, dir); + this._trigger('changeMonth', this.viewDate); + break; + case 1: + case 2: + this.viewDate = this.moveYear(this.viewDate, dir); + if (this.viewMode === 1) + this._trigger('changeYear', this.viewDate); + break; + } + this.fill(); + break; + case 'today': + var date = new Date(); + date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); + + this.showMode(-2); + var which = this.o.todayBtn === 'linked' ? null : 'view'; + this._setDate(date, which); + break; + case 'clear': + this.clearDates(); + break; + } + break; + case 'span': + if (!target.hasClass('disabled')){ + this.viewDate.setUTCDate(1); + if (target.hasClass('month')){ + day = 1; + month = target.parent().find('span').index(target); + year = this.viewDate.getUTCFullYear(); + this.viewDate.setUTCMonth(month); + this._trigger('changeMonth', this.viewDate); + if (this.o.minViewMode === 1){ + this._setDate(UTCDate(year, month, day)); + } + } + else { + day = 1; + month = 0; + year = parseInt(target.text(), 10)||0; + this.viewDate.setUTCFullYear(year); + this._trigger('changeYear', this.viewDate); + if (this.o.minViewMode === 2){ + this._setDate(UTCDate(year, month, day)); + } + } + this.showMode(-1); + this.fill(); + } + break; + case 'td': + if (target.hasClass('day') && !target.hasClass('disabled')){ + day = parseInt(target.text(), 10)||1; + year = this.viewDate.getUTCFullYear(); + month = this.viewDate.getUTCMonth(); + if (target.hasClass('old')){ + if (month === 0){ + month = 11; + year -= 1; + } + else { + month -= 1; + } + } + else if (target.hasClass('new')){ + if (month === 11){ + month = 0; + year += 1; + } + else { + month += 1; + } + } + this._setDate(UTCDate(year, month, day)); + } + break; + } + } + if (this.picker.is(':visible') && this._focused_from){ + $(this._focused_from).focus(); + } + delete this._focused_from; + }, + + _toggle_multidate: function(date){ + var ix = this.dates.contains(date); + if (!date){ + this.dates.clear(); + } + + if (ix !== -1){ + if (this.o.multidate === true || this.o.multidate > 1 || this.o.toggleActive){ + this.dates.remove(ix); + } + } else if (this.o.multidate === false) { + this.dates.clear(); + this.dates.push(date); + } + else { + this.dates.push(date); + } + + if (typeof this.o.multidate === 'number') + while (this.dates.length > this.o.multidate) + this.dates.remove(0); + }, + + _setDate: function(date, which){ + if (!which || which === 'date') + this._toggle_multidate(date && new Date(date)); + if (!which || which === 'view') + this.viewDate = date && new Date(date); + + this.fill(); + this.setValue(); + if (!which || which !== 'view') { + this._trigger('changeDate'); + } + var element; + if (this.isInput){ + element = this.element; + } + else if (this.component){ + element = this.element.find('input'); + } + if (element){ + element.change(); + } + if (this.o.autoclose && (!which || which === 'date')){ + this.hide(); + } + }, + + moveMonth: function(date, dir){ + if (!date) + return undefined; + if (!dir) + return date; + var new_date = new Date(date.valueOf()), + day = new_date.getUTCDate(), + month = new_date.getUTCMonth(), + mag = Math.abs(dir), + new_month, test; + dir = dir > 0 ? 1 : -1; + if (mag === 1){ + test = dir === -1 + // If going back one month, make sure month is not current month + // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02) + ? function(){ + return new_date.getUTCMonth() === month; + } + // If going forward one month, make sure month is as expected + // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02) + : function(){ + return new_date.getUTCMonth() !== new_month; + }; + new_month = month + dir; + new_date.setUTCMonth(new_month); + // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11 + if (new_month < 0 || new_month > 11) + new_month = (new_month + 12) % 12; + } + else { + // For magnitudes >1, move one month at a time... + for (var i=0; i < mag; i++) + // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)... + new_date = this.moveMonth(new_date, dir); + // ...then reset the day, keeping it in the new month + new_month = new_date.getUTCMonth(); + new_date.setUTCDate(day); + test = function(){ + return new_month !== new_date.getUTCMonth(); + }; + } + // Common date-resetting loop -- if date is beyond end of month, make it + // end of month + while (test()){ + new_date.setUTCDate(--day); + new_date.setUTCMonth(new_month); + } + return new_date; + }, + + moveYear: function(date, dir){ + return this.moveMonth(date, dir*12); + }, + + dateWithinRange: function(date){ + return date >= this.o.startDate && date <= this.o.endDate; + }, + + keydown: function(e){ + if (!this.picker.is(':visible')){ + if (e.keyCode === 27) // allow escape to hide and re-show picker + this.show(); + return; + } + var dateChanged = false, + dir, newDate, newViewDate, + focusDate = this.focusDate || this.viewDate; + switch (e.keyCode){ + case 27: // escape + if (this.focusDate){ + this.focusDate = null; + this.viewDate = this.dates.get(-1) || this.viewDate; + this.fill(); + } + else + this.hide(); + e.preventDefault(); + break; + case 37: // left + case 39: // right + if (!this.o.keyboardNavigation) + break; + dir = e.keyCode === 37 ? -1 : 1; + if (e.ctrlKey){ + newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir); + newViewDate = this.moveYear(focusDate, dir); + this._trigger('changeYear', this.viewDate); + } + else if (e.shiftKey){ + newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir); + newViewDate = this.moveMonth(focusDate, dir); + this._trigger('changeMonth', this.viewDate); + } + else { + newDate = new Date(this.dates.get(-1) || UTCToday()); + newDate.setUTCDate(newDate.getUTCDate() + dir); + newViewDate = new Date(focusDate); + newViewDate.setUTCDate(focusDate.getUTCDate() + dir); + } + if (this.dateWithinRange(newViewDate)){ + this.focusDate = this.viewDate = newViewDate; + this.setValue(); + this.fill(); + e.preventDefault(); + } + break; + case 38: // up + case 40: // down + if (!this.o.keyboardNavigation) + break; + dir = e.keyCode === 38 ? -1 : 1; + if (e.ctrlKey){ + newDate = this.moveYear(this.dates.get(-1) || UTCToday(), dir); + newViewDate = this.moveYear(focusDate, dir); + this._trigger('changeYear', this.viewDate); + } + else if (e.shiftKey){ + newDate = this.moveMonth(this.dates.get(-1) || UTCToday(), dir); + newViewDate = this.moveMonth(focusDate, dir); + this._trigger('changeMonth', this.viewDate); + } + else { + newDate = new Date(this.dates.get(-1) || UTCToday()); + newDate.setUTCDate(newDate.getUTCDate() + dir * 7); + newViewDate = new Date(focusDate); + newViewDate.setUTCDate(focusDate.getUTCDate() + dir * 7); + } + if (this.dateWithinRange(newViewDate)){ + this.focusDate = this.viewDate = newViewDate; + this.setValue(); + this.fill(); + e.preventDefault(); + } + break; + case 32: // spacebar + // Spacebar is used in manually typing dates in some formats. + // As such, its behavior should not be hijacked. + break; + case 13: // enter + focusDate = this.focusDate || this.dates.get(-1) || this.viewDate; + if (this.o.keyboardNavigation) { + this._toggle_multidate(focusDate); + dateChanged = true; + } + this.focusDate = null; + this.viewDate = this.dates.get(-1) || this.viewDate; + this.setValue(); + this.fill(); + if (this.picker.is(':visible')){ + e.preventDefault(); + if (typeof e.stopPropagation === 'function') { + e.stopPropagation(); // All modern browsers, IE9+ + } else { + e.cancelBubble = true; // IE6,7,8 ignore "stopPropagation" + } + if (this.o.autoclose) + this.hide(); + } + break; + case 9: // tab + this.focusDate = null; + this.viewDate = this.dates.get(-1) || this.viewDate; + this.fill(); + this.hide(); + break; + } + if (dateChanged){ + if (this.dates.length) + this._trigger('changeDate'); + else + this._trigger('clearDate'); + var element; + if (this.isInput){ + element = this.element; + } + else if (this.component){ + element = this.element.find('input'); + } + if (element){ + element.change(); + } + } + }, + + showMode: function(dir){ + if (dir){ + this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir)); + } + this.picker + .children('div') + .hide() + .filter('.datepicker-' + DPGlobal.modes[this.viewMode].clsName) + .css('display', 'block'); + this.updateNavArrows(); + } + }; + + var DateRangePicker = function(element, options){ + this.element = $(element); + this.inputs = $.map(options.inputs, function(i){ + return i.jquery ? i[0] : i; + }); + delete options.inputs; + + datepickerPlugin.call($(this.inputs), options) + .bind('changeDate', $.proxy(this.dateUpdated, this)); + + this.pickers = $.map(this.inputs, function(i){ + return $(i).data('datepicker'); + }); + this.updateDates(); + }; + DateRangePicker.prototype = { + updateDates: function(){ + this.dates = $.map(this.pickers, function(i){ + return i.getUTCDate(); + }); + this.updateRanges(); + }, + updateRanges: function(){ + var range = $.map(this.dates, function(d){ + return d.valueOf(); + }); + $.each(this.pickers, function(i, p){ + p.setRange(range); + }); + }, + dateUpdated: function(e){ + // `this.updating` is a workaround for preventing infinite recursion + // between `changeDate` triggering and `setUTCDate` calling. Until + // there is a better mechanism. + if (this.updating) + return; + this.updating = true; + + var dp = $(e.target).data('datepicker'), + new_date = dp.getUTCDate(), + i = $.inArray(e.target, this.inputs), + j = i - 1, + k = i + 1, + l = this.inputs.length; + if (i === -1) + return; + + $.each(this.pickers, function(i, p){ + if (!p.getUTCDate()) + p.setUTCDate(new_date); + }); + + if (new_date < this.dates[j]){ + // Date being moved earlier/left + while (j >= 0 && new_date < this.dates[j]){ + this.pickers[j--].setUTCDate(new_date); + } + } + else if (new_date > this.dates[k]){ + // Date being moved later/right + while (k < l && new_date > this.dates[k]){ + this.pickers[k++].setUTCDate(new_date); + } + } + this.updateDates(); + + delete this.updating; + }, + remove: function(){ + $.map(this.pickers, function(p){ p.remove(); }); + delete this.element.data().datepicker; + } + }; + + function opts_from_el(el, prefix){ + // Derive options from element data-attrs + var data = $(el).data(), + out = {}, inkey, + replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])'); + prefix = new RegExp('^' + prefix.toLowerCase()); + function re_lower(_,a){ + return a.toLowerCase(); + } + for (var key in data) + if (prefix.test(key)){ + inkey = key.replace(replace, re_lower); + out[inkey] = data[key]; + } + return out; + } + + function opts_from_locale(lang){ + // Derive options from locale plugins + var out = {}; + // Check if "de-DE" style date is available, if not language should + // fallback to 2 letter code eg "de" + if (!dates[lang]){ + lang = lang.split('-')[0]; + if (!dates[lang]) + return; + } + var d = dates[lang]; + $.each(locale_opts, function(i,k){ + if (k in d) + out[k] = d[k]; + }); + return out; + } + + var old = $.fn.datepicker; + var datepickerPlugin = function(option){ + var args = Array.apply(null, arguments); + args.shift(); + var internal_return; + this.each(function(){ + var $this = $(this), + data = $this.data('datepicker'), + options = typeof option === 'object' && option; + if (!data){ + var elopts = opts_from_el(this, 'date'), + // Preliminary otions + xopts = $.extend({}, defaults, elopts, options), + locopts = opts_from_locale(xopts.language), + // Options priority: js args, data-attrs, locales, defaults + opts = $.extend({}, defaults, locopts, elopts, options); + if ($this.hasClass('input-daterange') || opts.inputs){ + var ropts = { + inputs: opts.inputs || $this.find('input').toArray() + }; + $this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts)))); + } + else { + $this.data('datepicker', (data = new Datepicker(this, opts))); + } + } + if (typeof option === 'string' && typeof data[option] === 'function'){ + internal_return = data[option].apply(data, args); + if (internal_return !== undefined) + return false; + } + }); + if (internal_return !== undefined) + return internal_return; + else + return this; + }; + $.fn.datepicker = datepickerPlugin; + + var defaults = $.fn.datepicker.defaults = { + autoclose: false, + beforeShowDay: $.noop, + beforeShowMonth: $.noop, + calendarWeeks: false, + clearBtn: false, + toggleActive: false, + daysOfWeekDisabled: [], + datesDisabled: [], + endDate: Infinity, + forceParse: true, + format: 'mm/dd/yyyy', + keyboardNavigation: true, + language: 'en', + minViewMode: 0, + multidate: false, + multidateSeparator: ',', + orientation: "auto", + rtl: false, + startDate: -Infinity, + startView: 0, + todayBtn: false, + todayHighlight: false, + weekStart: 0, + disableTouchKeyboard: false, + enableOnReadonly: true, + container: 'body' + }; + var locale_opts = $.fn.datepicker.locale_opts = [ + 'format', + 'rtl', + 'weekStart' + ]; + $.fn.datepicker.Constructor = Datepicker; + var dates = $.fn.datepicker.dates = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + today: "Today", + clear: "Clear" + } + }; + + var DPGlobal = { + modes: [ + { + clsName: 'days', + navFnc: 'Month', + navStep: 1 + }, + { + clsName: 'months', + navFnc: 'FullYear', + navStep: 1 + }, + { + clsName: 'years', + navFnc: 'FullYear', + navStep: 10 + }], + isLeapYear: function(year){ + return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)); + }, + getDaysInMonth: function(year, month){ + return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; + }, + validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, + nonpunctuation: /[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g, + parseFormat: function(format){ + // IE treats \0 as a string end in inputs (truncating the value), + // so it's a bad format delimiter, anyway + var separators = format.replace(this.validParts, '\0').split('\0'), + parts = format.match(this.validParts); + if (!separators || !separators.length || !parts || parts.length === 0){ + throw new Error("Invalid date format."); + } + return {separators: separators, parts: parts}; + }, + parseDate: function(date, format, language){ + if (!date) + return undefined; + if (date instanceof Date) + return date; + if (typeof format === 'string') + format = DPGlobal.parseFormat(format); + var part_re = /([\-+]\d+)([dmwy])/, + parts = date.match(/([\-+]\d+)([dmwy])/g), + part, dir, i; + if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)){ + date = new Date(); + for (i=0; i < parts.length; i++){ + part = part_re.exec(parts[i]); + dir = parseInt(part[1]); + switch (part[2]){ + case 'd': + date.setUTCDate(date.getUTCDate() + dir); + break; + case 'm': + date = Datepicker.prototype.moveMonth.call(Datepicker.prototype, date, dir); + break; + case 'w': + date.setUTCDate(date.getUTCDate() + dir * 7); + break; + case 'y': + date = Datepicker.prototype.moveYear.call(Datepicker.prototype, date, dir); + break; + } + } + return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0); + } + parts = date && date.match(this.nonpunctuation) || []; + date = new Date(); + var parsed = {}, + setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'], + setters_map = { + yyyy: function(d,v){ + return d.setUTCFullYear(v); + }, + yy: function(d,v){ + return d.setUTCFullYear(2000+v); + }, + m: function(d,v){ + if (isNaN(d)) + return d; + v -= 1; + while (v < 0) v += 12; + v %= 12; + d.setUTCMonth(v); + while (d.getUTCMonth() !== v) + d.setUTCDate(d.getUTCDate()-1); + return d; + }, + d: function(d,v){ + return d.setUTCDate(v); + } + }, + val, filtered; + setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m']; + setters_map['dd'] = setters_map['d']; + date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); + var fparts = format.parts.slice(); + // Remove noop parts + if (parts.length !== fparts.length){ + fparts = $(fparts).filter(function(i,p){ + return $.inArray(p, setters_order) !== -1; + }).toArray(); + } + // Process remainder + function match_part(){ + var m = this.slice(0, parts[i].length), + p = parts[i].slice(0, m.length); + return m.toLowerCase() === p.toLowerCase(); + } + if (parts.length === fparts.length){ + var cnt; + for (i=0, cnt = fparts.length; i < cnt; i++){ + val = parseInt(parts[i], 10); + part = fparts[i]; + if (isNaN(val)){ + switch (part){ + case 'MM': + filtered = $(dates[language].months).filter(match_part); + val = $.inArray(filtered[0], dates[language].months) + 1; + break; + case 'M': + filtered = $(dates[language].monthsShort).filter(match_part); + val = $.inArray(filtered[0], dates[language].monthsShort) + 1; + break; + } + } + parsed[part] = val; + } + var _date, s; + for (i=0; i < setters_order.length; i++){ + s = setters_order[i]; + if (s in parsed && !isNaN(parsed[s])){ + _date = new Date(date); + setters_map[s](_date, parsed[s]); + if (!isNaN(_date)) + date = _date; + } + } + } + return date; + }, + formatDate: function(date, format, language){ + if (!date) + return ''; + if (typeof format === 'string') + format = DPGlobal.parseFormat(format); + var val = { + d: date.getUTCDate(), + D: dates[language].daysShort[date.getUTCDay()], + DD: dates[language].days[date.getUTCDay()], + m: date.getUTCMonth() + 1, + M: dates[language].monthsShort[date.getUTCMonth()], + MM: dates[language].months[date.getUTCMonth()], + yy: date.getUTCFullYear().toString().substring(2), + yyyy: date.getUTCFullYear() + }; + val.dd = (val.d < 10 ? '0' : '') + val.d; + val.mm = (val.m < 10 ? '0' : '') + val.m; + date = []; + var seps = $.extend([], format.separators); + for (var i=0, cnt = format.parts.length; i <= cnt; i++){ + if (seps.length) + date.push(seps.shift()); + date.push(val[format.parts[i]]); + } + return date.join(''); + }, + headTemplate: ''+ + ''+ + '«'+ + ''+ + '»'+ + ''+ + '', + contTemplate: '', + footTemplate: ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + '' + }; + DPGlobal.template = '
'+ + '
'+ + ''+ + DPGlobal.headTemplate+ + ''+ + DPGlobal.footTemplate+ + '
'+ + '
'+ + '
'+ + ''+ + DPGlobal.headTemplate+ + DPGlobal.contTemplate+ + DPGlobal.footTemplate+ + '
'+ + '
'+ + '
'+ + ''+ + DPGlobal.headTemplate+ + DPGlobal.contTemplate+ + DPGlobal.footTemplate+ + '
'+ + '
'+ + '
'; + + $.fn.datepicker.DPGlobal = DPGlobal; + + + /* DATEPICKER NO CONFLICT + * =================== */ + + $.fn.datepicker.noConflict = function(){ + $.fn.datepicker = old; + return this; + }; + + /* DATEPICKER VERSION + * =================== */ + $.fn.datepicker.version = "1.4.0"; + + /* DATEPICKER DATA-API + * ================== */ + + $(document).on( + 'focus.datepicker.data-api click.datepicker.data-api', + '[data-provide="datepicker"]', + function(e){ + var $this = $(this); + if ($this.data('datepicker')) + return; + e.preventDefault(); + // component click requires us to explicitly show it + datepickerPlugin.call($this, 'show'); + } + ); + $(function(){ + datepickerPlugin.call($('[data-provide="datepicker-inline"]')); + }); + +}(window.jQuery)); diff --git a/debian/missing-sources/bootstrap.js b/debian/missing-sources/bootstrap.js new file mode 100644 index 0000000..8ae571b --- /dev/null +++ b/debian/missing-sources/bootstrap.js @@ -0,0 +1,1951 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } + +/* ======================================================================== + * Bootstrap: transition.js v3.1.1 + * http://getbootstrap.com/javascript/#transitions + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) + // ============================================================ + + function transitionEnd() { + var el = document.createElement('bootstrap') + + var transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd', + 'MozTransition' : 'transitionend', + 'OTransition' : 'oTransitionEnd otransitionend', + 'transition' : 'transitionend' + } + + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return { end: transEndEventNames[name] } + } + } + + return false // explicit for ie8 ( ._.) + } + + // http://blog.alexmaccaw.com/css-transitions + $.fn.emulateTransitionEnd = function (duration) { + var called = false, $el = this + $(this).one($.support.transition.end, function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } + setTimeout(callback, duration) + return this + } + + $(function () { + $.support.transition = transitionEnd() + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: alert.js v3.1.1 + * http://getbootstrap.com/javascript/#alerts + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // ALERT CLASS DEFINITION + // ====================== + + var dismiss = '[data-dismiss="alert"]' + var Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = $(selector) + + if (e) e.preventDefault() + + if (!$parent.length) { + $parent = $this.hasClass('alert') ? $this : $this.parent() + } + + $parent.trigger(e = $.Event('close.bs.alert')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent.trigger('closed.bs.alert').remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent + .one($.support.transition.end, removeElement) + .emulateTransitionEnd(150) : + removeElement() + } + + + // ALERT PLUGIN DEFINITION + // ======================= + + var old = $.fn.alert + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.alert') + + if (!data) $this.data('bs.alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + // ALERT NO CONFLICT + // ================= + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + // ALERT DATA-API + // ============== + + $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: button.js v3.1.1 + * http://getbootstrap.com/javascript/#buttons + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // BUTTON PUBLIC CLASS DEFINITION + // ============================== + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Button.DEFAULTS, options) + this.isLoading = false + } + + Button.DEFAULTS = { + loadingText: 'loading...' + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + var $el = this.$element + var val = $el.is('input') ? 'val' : 'html' + var data = $el.data() + + state = state + 'Text' + + if (!data.resetText) $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout($.proxy(function () { + if (state == 'loadingText') { + this.isLoading = true + $el.addClass(d).attr(d, d) + } else if (this.isLoading) { + this.isLoading = false + $el.removeClass(d).removeAttr(d) + } + }, this), 0) + } + + Button.prototype.toggle = function () { + var changed = true + var $parent = this.$element.closest('[data-toggle="buttons"]') + + if ($parent.length) { + var $input = this.$element.find('input') + if ($input.prop('type') == 'radio') { + if ($input.prop('checked') && this.$element.hasClass('active')) changed = false + else $parent.find('.active').removeClass('active') + } + if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') + } + + if (changed) this.$element.toggleClass('active') + } + + + // BUTTON PLUGIN DEFINITION + // ======================== + + var old = $.fn.button + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.button') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.button', (data = new Button(this, options))) + + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.Constructor = Button + + + // BUTTON NO CONFLICT + // ================== + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + // BUTTON DATA-API + // =============== + + $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + e.preventDefault() + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: carousel.js v3.1.1 + * http://getbootstrap.com/javascript/#carousel + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CAROUSEL CLASS DEFINITION + // ========================= + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.paused = + this.sliding = + this.interval = + this.$active = + this.$items = null + + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.DEFAULTS = { + interval: 5000, + pause: 'hover', + wrap: true + } + + Carousel.prototype.cycle = function (e) { + e || (this.paused = false) + + this.interval && clearInterval(this.interval) + + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + + return this + } + + Carousel.prototype.getActiveIndex = function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + + return this.$items.index(this.$active) + } + + Carousel.prototype.to = function (pos) { + var that = this + var activeIndex = this.getActiveIndex() + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) + if (activeIndex == pos) return this.pause().cycle() + + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) + } + + Carousel.prototype.pause = function (e) { + e || (this.paused = true) + + if (this.$element.find('.next, .prev').length && $.support.transition) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + + this.interval = clearInterval(this.interval) + + return this + } + + Carousel.prototype.next = function () { + if (this.sliding) return + return this.slide('next') + } + + Carousel.prototype.prev = function () { + if (this.sliding) return + return this.slide('prev') + } + + Carousel.prototype.slide = function (type, next) { + var $active = this.$element.find('.item.active') + var $next = next || $active[type]() + var isCycling = this.interval + var direction = type == 'next' ? 'left' : 'right' + var fallback = type == 'next' ? 'first' : 'last' + var that = this + + if (!$next.length) { + if (!this.options.wrap) return + $next = this.$element.find('.item')[fallback]() + } + + if ($next.hasClass('active')) return this.sliding = false + + var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + + this.sliding = true + + isCycling && this.pause() + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid.bs.carousel', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + + if ($.support.transition && this.$element.hasClass('slide')) { + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + $active + .one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0) + }) + .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) + } else { + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid.bs.carousel') + } + + isCycling && this.cycle() + + return this + } + + + // CAROUSEL PLUGIN DEFINITION + // ========================== + + var old = $.fn.carousel + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.carousel') + var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) + var action = typeof option == 'string' ? option : options.slide + + if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + $.fn.carousel.Constructor = Carousel + + + // CAROUSEL NO CONFLICT + // ==================== + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + + // CAROUSEL DATA-API + // ================= + + $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + var $this = $(this), href + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + var options = $.extend({}, $target.data(), $this.data()) + var slideIndex = $this.attr('data-slide-to') + if (slideIndex) options.interval = false + + $target.carousel(options) + + if (slideIndex = $this.attr('data-slide-to')) { + $target.data('bs.carousel').to(slideIndex) + } + + e.preventDefault() + }) + + $(window).on('load', function () { + $('[data-ride="carousel"]').each(function () { + var $carousel = $(this) + $carousel.carousel($carousel.data()) + }) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: collapse.js v3.1.1 + * http://getbootstrap.com/javascript/#collapse + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // COLLAPSE PUBLIC CLASS DEFINITION + // ================================ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Collapse.DEFAULTS, options) + this.transitioning = null + + if (this.options.parent) this.$parent = $(this.options.parent) + if (this.options.toggle) this.toggle() + } + + Collapse.DEFAULTS = { + toggle: true + } + + Collapse.prototype.dimension = function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + Collapse.prototype.show = function () { + if (this.transitioning || this.$element.hasClass('in')) return + + var startEvent = $.Event('show.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + var actives = this.$parent && this.$parent.find('> .panel > .in') + + if (actives && actives.length) { + var hasData = actives.data('bs.collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('bs.collapse', null) + } + + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + .addClass('collapsing') + [dimension](0) + + this.transitioning = 1 + + var complete = function () { + this.$element + .removeClass('collapsing') + .addClass('collapse in') + [dimension]('auto') + this.transitioning = 0 + this.$element.trigger('shown.bs.collapse') + } + + if (!$.support.transition) return complete.call(this) + + var scrollSize = $.camelCase(['scroll', dimension].join('-')) + + this.$element + .one($.support.transition.end, $.proxy(complete, this)) + .emulateTransitionEnd(350) + [dimension](this.$element[0][scrollSize]) + } + + Collapse.prototype.hide = function () { + if (this.transitioning || !this.$element.hasClass('in')) return + + var startEvent = $.Event('hide.bs.collapse') + this.$element.trigger(startEvent) + if (startEvent.isDefaultPrevented()) return + + var dimension = this.dimension() + + this.$element + [dimension](this.$element[dimension]()) + [0].offsetHeight + + this.$element + .addClass('collapsing') + .removeClass('collapse') + .removeClass('in') + + this.transitioning = 1 + + var complete = function () { + this.transitioning = 0 + this.$element + .trigger('hidden.bs.collapse') + .removeClass('collapsing') + .addClass('collapse') + } + + if (!$.support.transition) return complete.call(this) + + this.$element + [dimension](0) + .one($.support.transition.end, $.proxy(complete, this)) + .emulateTransitionEnd(350) + } + + Collapse.prototype.toggle = function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + + // COLLAPSE PLUGIN DEFINITION + // ========================== + + var old = $.fn.collapse + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.collapse') + var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) + + if (!data && options.toggle && option == 'show') option = !option + if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.Constructor = Collapse + + + // COLLAPSE NO CONFLICT + // ==================== + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + // COLLAPSE DATA-API + // ================= + + $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + var target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + var $target = $(target) + var data = $target.data('bs.collapse') + var option = data ? 'toggle' : $this.data() + var parent = $this.attr('data-parent') + var $parent = parent && $(parent) + + if (!data || !data.transitioning) { + if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed') + $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + } + + $target.collapse(option) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: dropdown.js v3.1.1 + * http://getbootstrap.com/javascript/#dropdowns + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // DROPDOWN CLASS DEFINITION + // ========================= + + var backdrop = '.dropdown-backdrop' + var toggle = '[data-toggle=dropdown]' + var Dropdown = function (element) { + $(element).on('click.bs.dropdown', this.toggle) + } + + Dropdown.prototype.toggle = function (e) { + var $this = $(this) + + if ($this.is('.disabled, :disabled')) return + + var $parent = getParent($this) + var isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { + // if mobile we use a backdrop because click events don't delegate + $('