[Freeipa-devel] [freeipa PR#379][synchronized] Packaging: Add placeholder and IPA commands packages
URL: https://github.com/freeipa/freeipa/pull/379 Author: tiran Title: #379: Packaging: Add placeholder and IPA commands packages Action: synchronized To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/379/head:pr379 git checkout pr379 From 380b2df4fded9ca2848853b5741b409ae58a58d4 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 16 Feb 2017 15:27:49 +0100 Subject: [PATCH] Packaging: Add IPA commands package The ipacommands package contains ipa-getkeytab and ipa-rmkeytab for installation in a virtual env. The programs are compiled with distutils / setuptools. https://fedorahosted.org/freeipa/ticket/6484 Signed-off-by: Christian Heimes --- .gitignore | 7 ++ Makefile.am | 6 +- configure.ac | 1 + pypi/Makefile.am | 1 + pypi/ipacommands/MANIFEST.in | 25 ++ pypi/ipacommands/Makefile.am | 79 ++ pypi/ipacommands/setup.cfg | 5 ++ pypi/ipacommands/setup.py| 194 +++ 8 files changed, 317 insertions(+), 1 deletion(-) create mode 100644 pypi/ipacommands/MANIFEST.in create mode 100644 pypi/ipacommands/Makefile.am create mode 100644 pypi/ipacommands/setup.cfg create mode 100644 pypi/ipacommands/setup.py diff --git a/.gitignore b/.gitignore index 7e78a93..2e82174 100644 --- a/.gitignore +++ b/.gitignore @@ -113,3 +113,10 @@ freeipa2-dev-doc /ipaplatform/paths.py /ipaplatform/services.py /ipaplatform/tasks.py + +/pypi/ipacommands/COPYING +/pypi/ipacommands/Contributors.txt +/pypi/ipacommands/asn1 +/pypi/ipacommands/client +/pypi/ipacommands/ipasetup.py +/pypi/ipacommands/util diff --git a/Makefile.am b/Makefile.am index df4e05a..068eefb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -228,12 +228,16 @@ $(WHEELBUNDLEDIR): mkdir -p $(WHEELBUNDLEDIR) bdist_wheel: $(WHEELDISTDIR) + $(MAKE) $(AM_MAKEFLAGS) -C pypi/ipacommands sdist || exit 1; for dir in $(IPACLIENT_SUBDIRS); do \ $(MAKE) $(AM_MAKEFLAGS) -C $${dir} $@ || exit 1; \ done wheel_bundle: $(WHEELBUNDLEDIR) bdist_wheel - $(PYTHON) -m pip wheel --wheel-dir $(WHEELBUNDLEDIR) $(WHEELDISTDIR)/*.whl + $(PYTHON) -m pip wheel \ + --wheel-dir $(WHEELBUNDLEDIR) \ + $(WHEELDISTDIR)/*.whl \ + $(WHEELDISTDIR)/*.tar.gz wheel_placeholder: $(WHEELDISTDIR) for dir in $(IPA_PLACEHOLDERS); do \ diff --git a/configure.ac b/configure.ac index 2d84426..f3ff64f 100644 --- a/configure.ac +++ b/configure.ac @@ -538,6 +538,7 @@ AC_CONFIG_FILES([ pypi/Makefile pypi/freeipa/Makefile pypi/ipa/Makefile +pypi/ipacommands/Makefile pypi/ipaplatform/Makefile pypi/ipaserver/Makefile pypi/ipatests/Makefile diff --git a/pypi/Makefile.am b/pypi/Makefile.am index 5d8be9c..be572c6 100644 --- a/pypi/Makefile.am +++ b/pypi/Makefile.am @@ -7,6 +7,7 @@ NULL = SUBDIRS = \ freeipa \ ipa\ + ipacommands \ ipaplatform \ ipaserver \ ipatests \ diff --git a/pypi/ipacommands/MANIFEST.in b/pypi/ipacommands/MANIFEST.in new file mode 100644 index 000..659a1f5 --- /dev/null +++ b/pypi/ipacommands/MANIFEST.in @@ -0,0 +1,25 @@ +include asn1/*.c +include asn1/*.h +include asn1/asn1c/*.c +include asn1/asn1c/*.h +include asn1/asn1c/ipa.asn1 + +include client/config.c +include client/config.h +include client/ipa-client-common.c +include client/ipa-client-common.h +include client/ipa-getkeytab.c +include client/ipa-join.c +include client/ipa-rmkeytab.c + +include util/ipa_krb5.c +include util/ipa_krb5.h + +prune client/asn1 +prune client/client +prune client/util + +include Contributors.txt COPYING +include config.h +include ipasetup.py +include setup.cfg diff --git a/pypi/ipacommands/Makefile.am b/pypi/ipacommands/Makefile.am new file mode 100644 index 000..645ce7a --- /dev/null +++ b/pypi/ipacommands/Makefile.am @@ -0,0 +1,79 @@ +# This file will be processed with automake-1.7 to create Makefile.in +# +AUTOMAKE_OPTIONS = 1.7 + +NULL = + +pkgname = $(shell basename "$(abs_srcdir)") + +# hack to handle back-in-the-hierarchy depedency on ipasetup.py +.PHONY: $(top_builddir)/ipasetup.py +$(top_builddir)/ipasetup.py: + (cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) ipasetup.py) + +DEPENDENCIES = \ + asn1\ + client\ + util\ + COPYING\ + Contributors.txt \ + config.h \ + ipasetup.py \ + $(NULL) + +# Python setup.py can handle symlinks to directories fine +asn1: $(top_srcdir)/asn1 + if [ ! -e "$@" ]; then ln -rs "$<"; fi + +client: $(top_srcdir)/client + if [ ! -e "$@" ]; then ln -rs "$<"; fi + +util: $(top_srcdir)/util + if [ ! -e "$@" ]; then ln -rs "$<"; fi + +# On the other hand files must be copied to create proper sdist +COPYING: $(top_srcdir)/COPYING + cp -p "$<" "$@" + +Contributors.txt: $(top_srcdir)/Contributors.txt + cp -p "$<" "$@" + +ipasetup.py: $(top_builddir)/ipasetup.py + cp -p "$<" "$@" + +config.h: $(top_builddir)/config.h + cp -p "$<" "$@" + + +all-local: $(DEPENDENCIES) +
[Freeipa-devel] [freeipa PR#379][synchronized] Packaging: Add placeholder and IPA commands packages
URL: https://github.com/freeipa/freeipa/pull/379 Author: tiran Title: #379: Packaging: Add placeholder and IPA commands packages Action: synchronized To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/379/head:pr379 git checkout pr379 From aee633348478771b576a5abfca6b9fabf6786109 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 16 Feb 2017 15:27:49 +0100 Subject: [PATCH 1/6] Packaging: Add placeholder packages The ipa and freeipa packages are placeholders to prevent PyPI squashing attacks and reserve the names for future use. `pip install ipa` installs ipaclient. Signed-off-by: Christian Heimes --- Makefile.am | 4 +++- Makefile.python.am| 21 + configure.ac | 3 +++ packaging/Makefile.am | 10 ++ packaging/freeipa/Makefile.am | 3 +++ packaging/freeipa/README.txt | 2 ++ packaging/freeipa/setup.cfg | 6 ++ packaging/freeipa/setup.py| 23 +++ packaging/ipa/Makefile.am | 3 +++ packaging/ipa/README.txt | 2 ++ packaging/ipa/setup.cfg | 6 ++ packaging/ipa/setup.py| 23 +++ 12 files changed, 97 insertions(+), 9 deletions(-) create mode 100644 packaging/Makefile.am create mode 100644 packaging/freeipa/Makefile.am create mode 100644 packaging/freeipa/README.txt create mode 100644 packaging/freeipa/setup.cfg create mode 100755 packaging/freeipa/setup.py create mode 100644 packaging/ipa/Makefile.am create mode 100644 packaging/ipa/README.txt create mode 100644 packaging/ipa/setup.cfg create mode 100755 packaging/ipa/setup.py diff --git a/Makefile.am b/Makefile.am index 30ad9bb..a6faa11 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 IPACLIENT_SUBDIRS = ipaclient ipalib ipapython -SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaplatform ipaserver ipatests po +SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaplatform ipaserver ipatests packaging po MOSTLYCLEANFILES = ipasetup.pyc ipasetup.pyo \ ignore_import_errors.pyc ignore_import_errors.pyo \ @@ -206,6 +206,8 @@ $(WHEELBUNDLEDIR): mkdir -p $(WHEELBUNDLEDIR) bdist_wheel: $(WHEELDISTDIR) + $(MAKE) $(AM_MAKEFLAGS) -C packaging/ipa bdist_wheel || exit 1; + $(MAKE) $(AM_MAKEFLAGS) -C packaging/freeipa bdist_wheel || exit 1; for dir in $(IPACLIENT_SUBDIRS); do \ $(MAKE) $(AM_MAKEFLAGS) -C $${dir} $@ || exit 1; \ done diff --git a/Makefile.python.am b/Makefile.python.am index 665893f..9c34fe3 100644 --- a/Makefile.python.am +++ b/Makefile.python.am @@ -1,5 +1,6 @@ pkgname = $(shell basename "$(abs_srcdir)") pkgpythondir = $(pythondir)/$(pkgname) +pkginstall = true if VERBOSE_MAKE VERBOSITY="--verbose" @@ -19,16 +20,20 @@ all-local: $(top_builddir)/ipasetup.py --build-base "$(abs_builddir)/build" install-exec-local: $(top_builddir)/ipasetup.py - $(PYTHON) $(srcdir)/setup.py \ - $(VERBOSITY) \ - install \ - --prefix "$(DESTDIR)$(prefix)" \ - --single-version-externally-managed \ - --record "$(DESTDIR)$(pkgpythondir)/install_files.txt" \ - --optimize 1 + if [ "x$(pkginstall)" = "xtrue" ]; then \ + $(PYTHON) $(srcdir)/setup.py \ + $(VERBOSITY) \ + install \ + --prefix "$(DESTDIR)$(prefix)" \ + --single-version-externally-managed \ + --record "$(DESTDIR)$(pkgpythondir)/install_files.txt" \ + --optimize 1; \ + fi uninstall-local: - cat "$(DESTDIR)$(pkgpythondir)/install_files.txt" | xargs rm -rf + if [ -f "$(DESTDIR)$(pkgpythondir)/install_files.txt" ]; then \ + cat "$(DESTDIR)$(pkgpythondir)/install_files.txt" | xargs rm -rf ; \ + fi rm -rf "$(DESTDIR)$(pkgpythondir)" clean-local: $(top_builddir)/ipasetup.py diff --git a/configure.ac b/configure.ac index 44dc11b..f48ba14 100644 --- a/configure.ac +++ b/configure.ac @@ -577,6 +577,9 @@ AC_CONFIG_FILES([ ipaserver/Makefile ipatests/Makefile ipatests/man/Makefile +packaging/Makefile +packaging/freeipa/Makefile +packaging/ipa/Makefile po/Makefile.in po/Makefile.hack util/Makefile diff --git a/packaging/Makefile.am b/packaging/Makefile.am new file mode 100644 index 000..5725ed9 --- /dev/null +++ b/packaging/Makefile.am @@ -0,0 +1,10 @@ +# This file will be processed with automake-1.7 to create Makefile.in +# +AUTOMAKE_OPTIONS = 1.7 subdir-objects + +NULL = + +SUBDIRS = \ + freeipa \ + ipa \ + $(NULL) diff --git a/packaging/freeipa/Makefile.am b/packaging/freeipa/Makefile.am new file mode 100644 index 000..15d86ce --- /dev/null +++ b/packaging/freeipa/Makefile.am @@ -0,0 +1,3 @@ +include $(top_srcdir)/Makefile.python.am + +pkginstall = false diff --git a/packaging/freeipa/README.txt b/packaging/freeipa/README.txt new file mode 100644 index 000..b58448f --- /dev/null +++ b/packaging/freeipa/README.txt @@ -0,0 +1,2 @@ +This is
[Freeipa-devel] [freeipa PR#379][synchronized] Packaging: Add placeholder and IPA commands packages
URL: https://github.com/freeipa/freeipa/pull/379 Author: tiran Title: #379: Packaging: Add placeholder and IPA commands packages Action: synchronized To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/379/head:pr379 git checkout pr379 From 0f274963d6b0e839f237f9a61cee531a222d62e3 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 9 Jan 2017 11:02:25 +0100 Subject: [PATCH] Packaging: Add placeholder and IPA commands packages The ipacommands package contains ipa-getkeytab and ipa-rmkeytab for installation in a virtual env. The programs are compiled with distutils / setuptools. The ipa and freeipa packages are placeholders to prevent PyPI squashing attacks and reserve the names for future use. `pip install ipa` installs ipaclient. https://fedorahosted.org/freeipa/ticket/6484 Signed-off-by: Christian Heimes --- .gitignore| 7 ++ Makefile.am | 5 +- Makefile.python.am| 21 +++-- configure.ac | 4 + packaging/Makefile.am | 11 +++ packaging/freeipa/Makefile.am | 3 + packaging/freeipa/README.txt | 2 + packaging/freeipa/setup.cfg | 6 ++ packaging/freeipa/setup.py| 36 +++ packaging/ipa/Makefile.am | 3 + packaging/ipa/README.txt | 2 + packaging/ipa/setup.cfg | 6 ++ packaging/ipa/setup.py| 36 +++ packaging/ipacommands/MANIFEST.in | 25 + packaging/ipacommands/Makefile.am | 79 packaging/ipacommands/setup.cfg | 5 + packaging/ipacommands/setup.py| 194 ++ 17 files changed, 436 insertions(+), 9 deletions(-) create mode 100644 packaging/Makefile.am create mode 100644 packaging/freeipa/Makefile.am create mode 100644 packaging/freeipa/README.txt create mode 100644 packaging/freeipa/setup.cfg create mode 100755 packaging/freeipa/setup.py create mode 100644 packaging/ipa/Makefile.am create mode 100644 packaging/ipa/README.txt create mode 100644 packaging/ipa/setup.cfg create mode 100755 packaging/ipa/setup.py create mode 100644 packaging/ipacommands/MANIFEST.in create mode 100644 packaging/ipacommands/Makefile.am create mode 100644 packaging/ipacommands/setup.cfg create mode 100644 packaging/ipacommands/setup.py diff --git a/.gitignore b/.gitignore index 04553fd..249f158 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,10 @@ freeipa2-dev-doc /ipaplatform/paths.py /ipaplatform/services.py /ipaplatform/tasks.py + +/packaging/ipacommands/COPYING +/packaging/ipacommands/Contributors.txt +/packaging/ipacommands/asn1 +/packaging/ipacommands/client +/packaging/ipacommands/ipasetup.py +/packaging/ipacommands/util diff --git a/Makefile.am b/Makefile.am index 9bfc899..e25cea3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 IPACLIENT_SUBDIRS = ipaclient ipalib ipapython -SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaplatform ipaserver ipatests po +SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaplatform ipaserver ipatests packaging po MOSTLYCLEANFILES = ipasetup.pyc ipasetup.pyo \ ignore_import_errors.pyc ignore_import_errors.pyo \ @@ -202,6 +202,9 @@ $(WHEELBUNDLEDIR): mkdir -p $(WHEELBUNDLEDIR) bdist_wheel: $(WHEELDISTDIR) + $(MAKE) $(AM_MAKEFLAGS) -C packaging/ipacommands sdist || exit 1; + $(MAKE) $(AM_MAKEFLAGS) -C packaging/ipa bdist_wheel || exit 1; + $(MAKE) $(AM_MAKEFLAGS) -C packaging/freeipa bdist_wheel || exit 1; for dir in $(IPACLIENT_SUBDIRS); do \ $(MAKE) $(AM_MAKEFLAGS) -C $${dir} $@ || exit 1; \ done diff --git a/Makefile.python.am b/Makefile.python.am index 665893f..9c34fe3 100644 --- a/Makefile.python.am +++ b/Makefile.python.am @@ -1,5 +1,6 @@ pkgname = $(shell basename "$(abs_srcdir)") pkgpythondir = $(pythondir)/$(pkgname) +pkginstall = true if VERBOSE_MAKE VERBOSITY="--verbose" @@ -19,16 +20,20 @@ all-local: $(top_builddir)/ipasetup.py --build-base "$(abs_builddir)/build" install-exec-local: $(top_builddir)/ipasetup.py - $(PYTHON) $(srcdir)/setup.py \ - $(VERBOSITY) \ - install \ - --prefix "$(DESTDIR)$(prefix)" \ - --single-version-externally-managed \ - --record "$(DESTDIR)$(pkgpythondir)/install_files.txt" \ - --optimize 1 + if [ "x$(pkginstall)" = "xtrue" ]; then \ + $(PYTHON) $(srcdir)/setup.py \ + $(VERBOSITY) \ + install \ + --prefix "$(DESTDIR)$(prefix)" \ + --single-version-externally-managed \ + --record "$(DESTDIR)$(pkgpythondir)/install_files.txt" \ + --optimize 1; \ + fi uninstall-local: - cat "$(DESTDIR)$(pkgpythondir)/install_files.txt" | xargs rm -rf + if [ -f "$(DESTDIR)$(pkgpythondir)/install_files.txt" ]; then \ + cat "$(DESTDIR)$(pkgpythondir)/install_files.txt" | xargs rm -rf ; \ + fi rm -rf "$(DESTDIR)$(pkgpythondir)" clean-local: $(top_b
[Freeipa-devel] [freeipa PR#379][synchronized] Packaging: Add placeholder and IPA commands packages
URL: https://github.com/freeipa/freeipa/pull/379 Author: tiran Title: #379: Packaging: Add placeholder and IPA commands packages Action: synchronized To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/379/head:pr379 git checkout pr379 From cb9669a00eda6fa12ebd126fdcf43f49e86b18da Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 9 Jan 2017 11:02:25 +0100 Subject: [PATCH] Packaging: Add placeholder and IPA commands packages The ipacommands package contains ipa-getkeytab and ipa-rmkeytab for installation in a virtual env. The programs are compiled with distutils / setuptools. The ipa and freeipa packages are placeholders to prevent PyPI squashing attacks and reserve the names for future use. `pip install ipa` installs ipaclient. https://fedorahosted.org/freeipa/ticket/6484 Signed-off-by: Christian Heimes --- .gitignore| 7 ++ Makefile.am | 5 +- Makefile.python.am| 21 +++-- configure.ac | 4 + packaging/Makefile.am | 11 +++ packaging/freeipa/Makefile.am | 3 + packaging/freeipa/README.txt | 2 + packaging/freeipa/setup.cfg | 6 ++ packaging/freeipa/setup.py| 36 +++ packaging/ipa/Makefile.am | 3 + packaging/ipa/README.txt | 2 + packaging/ipa/setup.cfg | 6 ++ packaging/ipa/setup.py| 36 +++ packaging/ipacommands/MANIFEST.in | 25 + packaging/ipacommands/Makefile.am | 79 packaging/ipacommands/setup.cfg | 5 + packaging/ipacommands/setup.py| 194 ++ 17 files changed, 436 insertions(+), 9 deletions(-) create mode 100644 packaging/Makefile.am create mode 100644 packaging/freeipa/Makefile.am create mode 100644 packaging/freeipa/README.txt create mode 100644 packaging/freeipa/setup.cfg create mode 100755 packaging/freeipa/setup.py create mode 100644 packaging/ipa/Makefile.am create mode 100644 packaging/ipa/README.txt create mode 100644 packaging/ipa/setup.cfg create mode 100755 packaging/ipa/setup.py create mode 100644 packaging/ipacommands/MANIFEST.in create mode 100644 packaging/ipacommands/Makefile.am create mode 100644 packaging/ipacommands/setup.cfg create mode 100644 packaging/ipacommands/setup.py diff --git a/.gitignore b/.gitignore index 04553fd..249f158 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,10 @@ freeipa2-dev-doc /ipaplatform/paths.py /ipaplatform/services.py /ipaplatform/tasks.py + +/packaging/ipacommands/COPYING +/packaging/ipacommands/Contributors.txt +/packaging/ipacommands/asn1 +/packaging/ipacommands/client +/packaging/ipacommands/ipasetup.py +/packaging/ipacommands/util diff --git a/Makefile.am b/Makefile.am index 9bfc899..e25cea3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 IPACLIENT_SUBDIRS = ipaclient ipalib ipapython -SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaplatform ipaserver ipatests po +SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaplatform ipaserver ipatests packaging po MOSTLYCLEANFILES = ipasetup.pyc ipasetup.pyo \ ignore_import_errors.pyc ignore_import_errors.pyo \ @@ -202,6 +202,9 @@ $(WHEELBUNDLEDIR): mkdir -p $(WHEELBUNDLEDIR) bdist_wheel: $(WHEELDISTDIR) + $(MAKE) $(AM_MAKEFLAGS) -C packaging/ipacommands sdist || exit 1; + $(MAKE) $(AM_MAKEFLAGS) -C packaging/ipa bdist_wheel || exit 1; + $(MAKE) $(AM_MAKEFLAGS) -C packaging/freeipa bdist_wheel || exit 1; for dir in $(IPACLIENT_SUBDIRS); do \ $(MAKE) $(AM_MAKEFLAGS) -C $${dir} $@ || exit 1; \ done diff --git a/Makefile.python.am b/Makefile.python.am index 665893f..9c34fe3 100644 --- a/Makefile.python.am +++ b/Makefile.python.am @@ -1,5 +1,6 @@ pkgname = $(shell basename "$(abs_srcdir)") pkgpythondir = $(pythondir)/$(pkgname) +pkginstall = true if VERBOSE_MAKE VERBOSITY="--verbose" @@ -19,16 +20,20 @@ all-local: $(top_builddir)/ipasetup.py --build-base "$(abs_builddir)/build" install-exec-local: $(top_builddir)/ipasetup.py - $(PYTHON) $(srcdir)/setup.py \ - $(VERBOSITY) \ - install \ - --prefix "$(DESTDIR)$(prefix)" \ - --single-version-externally-managed \ - --record "$(DESTDIR)$(pkgpythondir)/install_files.txt" \ - --optimize 1 + if [ "x$(pkginstall)" = "xtrue" ]; then \ + $(PYTHON) $(srcdir)/setup.py \ + $(VERBOSITY) \ + install \ + --prefix "$(DESTDIR)$(prefix)" \ + --single-version-externally-managed \ + --record "$(DESTDIR)$(pkgpythondir)/install_files.txt" \ + --optimize 1; \ + fi uninstall-local: - cat "$(DESTDIR)$(pkgpythondir)/install_files.txt" | xargs rm -rf + if [ -f "$(DESTDIR)$(pkgpythondir)/install_files.txt" ]; then \ + cat "$(DESTDIR)$(pkgpythondir)/install_files.txt" | xargs rm -rf ; \ + fi rm -rf "$(DESTDIR)$(pkgpythondir)" clean-local: $(top_b
[Freeipa-devel] [freeipa PR#379][synchronized] Packaging: Add placeholder and IPA commands packages
URL: https://github.com/freeipa/freeipa/pull/379 Author: tiran Title: #379: Packaging: Add placeholder and IPA commands packages Action: synchronized To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/379/head:pr379 git checkout pr379 From 297f9612fc366084f02e8d7229cc488bb24d9dcd Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 9 Jan 2017 11:02:25 +0100 Subject: [PATCH] Packaging: Add placeholder and IPA commands packages The ipacommands package contains ipa-getkeytab and ipa-rmkeytab for installation in a virtual env. The programs are compiled with distutils / setuptools. The ipa and freeipa packages are placeholders to prevent PyPI squashing attacks and reserve the names for future use. `pip install ipa` installs ipaclient. https://fedorahosted.org/freeipa/ticket/6484 Signed-off-by: Christian Heimes --- .gitignore| 7 ++ Makefile.am | 5 +- Makefile.python.am| 34 +-- Makefile.pythonbuild.am | 32 +++ configure.ac | 4 + packaging/Makefile.am | 11 +++ packaging/freeipa/Makefile.am | 1 + packaging/freeipa/README.txt | 2 + packaging/freeipa/setup.cfg | 6 ++ packaging/freeipa/setup.py| 36 +++ packaging/ipa/Makefile.am | 1 + packaging/ipa/README.txt | 2 + packaging/ipa/setup.cfg | 6 ++ packaging/ipa/setup.py| 36 +++ packaging/ipacommands/MANIFEST.in | 25 + packaging/ipacommands/Makefile.am | 72 ++ packaging/ipacommands/setup.cfg | 5 + packaging/ipacommands/setup.py| 194 ++ 18 files changed, 446 insertions(+), 33 deletions(-) create mode 100644 Makefile.pythonbuild.am create mode 100644 packaging/Makefile.am create mode 100644 packaging/freeipa/Makefile.am create mode 100644 packaging/freeipa/README.txt create mode 100644 packaging/freeipa/setup.cfg create mode 100755 packaging/freeipa/setup.py create mode 100644 packaging/ipa/Makefile.am create mode 100644 packaging/ipa/README.txt create mode 100644 packaging/ipa/setup.cfg create mode 100755 packaging/ipa/setup.py create mode 100644 packaging/ipacommands/MANIFEST.in create mode 100644 packaging/ipacommands/Makefile.am create mode 100644 packaging/ipacommands/setup.cfg create mode 100644 packaging/ipacommands/setup.py diff --git a/.gitignore b/.gitignore index 04553fd..249f158 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,10 @@ freeipa2-dev-doc /ipaplatform/paths.py /ipaplatform/services.py /ipaplatform/tasks.py + +/packaging/ipacommands/COPYING +/packaging/ipacommands/Contributors.txt +/packaging/ipacommands/asn1 +/packaging/ipacommands/client +/packaging/ipacommands/ipasetup.py +/packaging/ipacommands/util diff --git a/Makefile.am b/Makefile.am index 9bfc899..e25cea3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 IPACLIENT_SUBDIRS = ipaclient ipalib ipapython -SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaplatform ipaserver ipatests po +SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaplatform ipaserver ipatests packaging po MOSTLYCLEANFILES = ipasetup.pyc ipasetup.pyo \ ignore_import_errors.pyc ignore_import_errors.pyo \ @@ -202,6 +202,9 @@ $(WHEELBUNDLEDIR): mkdir -p $(WHEELBUNDLEDIR) bdist_wheel: $(WHEELDISTDIR) + $(MAKE) $(AM_MAKEFLAGS) -C packaging/ipacommands sdist || exit 1; + $(MAKE) $(AM_MAKEFLAGS) -C packaging/ipa bdist_wheel || exit 1; + $(MAKE) $(AM_MAKEFLAGS) -C packaging/freeipa bdist_wheel || exit 1; for dir in $(IPACLIENT_SUBDIRS); do \ $(MAKE) $(AM_MAKEFLAGS) -C $${dir} $@ || exit 1; \ done diff --git a/Makefile.python.am b/Makefile.python.am index 665893f..96b0050 100644 --- a/Makefile.python.am +++ b/Makefile.python.am @@ -1,22 +1,6 @@ -pkgname = $(shell basename "$(abs_srcdir)") -pkgpythondir = $(pythondir)/$(pkgname) - -if VERBOSE_MAKE -VERBOSITY="--verbose" -else -VERBOSITY="--quiet" -endif !VERBOSE_MAKE +include $(top_srcdir)/Makefile.pythonbuild.am -# hack to handle back-in-the-hierarchy depedency on ipasetup.py -.PHONY: $(top_builddir)/ipasetup.py -$(top_builddir)/ipasetup.py: - (cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) ipasetup.py) - -all-local: $(top_builddir)/ipasetup.py - cd $(srcdir); $(PYTHON) setup.py \ - $(VERBOSITY) \ - build \ - --build-base "$(abs_builddir)/build" +pkgpythondir = $(pythondir)/$(pkgname) install-exec-local: $(top_builddir)/ipasetup.py $(PYTHON) $(srcdir)/setup.py \ @@ -31,14 +15,6 @@ uninstall-local: cat "$(DESTDIR)$(pkgpythondir)/install_files.txt" | xargs rm -rf rm -rf "$(DESTDIR)$(pkgpythondir)" -clean-local: $(top_builddir)/ipasetup.py - $(PYTHON) "$(srcdir)/setup.py" clean --all - rm -rf "$(srcdir)/build" "$(srcdir)/dist" "$(srcdir)/MANIFEST" - find "$(srcdir)" \ -
[Freeipa-devel] [freeipa PR#379][synchronized] Packaging: Add placeholder and IPA commands packages
URL: https://github.com/freeipa/freeipa/pull/379 Author: tiran Title: #379: Packaging: Add placeholder and IPA commands packages Action: synchronized To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/379/head:pr379 git checkout pr379 From 9cc925ee9beae054d114f0f98d278230ff16f9ca Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 9 Jan 2017 11:02:25 +0100 Subject: [PATCH] Packaging: Add placeholder and IPA commands packages The ipacommands package contains ipa-getkeytab and ipa-rmkeytab for installation in a virtual env. The programs are compiled with distutils / setuptools. The ipa and freeipa packages are placeholders to prevent PyPI squashing attacks and reserve the names for future use. `pip install ipa` installs ipaclient. https://fedorahosted.org/freeipa/ticket/6484 Signed-off-by: Christian Heimes --- .gitignore| 7 ++ Makefile.am | 5 +- configure.ac | 4 + packaging/Makefile.am | 11 +++ packaging/freeipa/Makefile.am | 1 + packaging/freeipa/README.txt | 2 + packaging/freeipa/setup.cfg | 6 ++ packaging/freeipa/setup.py| 36 +++ packaging/ipa/Makefile.am | 1 + packaging/ipa/README.txt | 2 + packaging/ipa/setup.cfg | 6 ++ packaging/ipa/setup.py| 36 +++ packaging/ipacommands/MANIFEST.in | 25 + packaging/ipacommands/Makefile.am | 72 ++ packaging/ipacommands/setup.cfg | 5 + packaging/ipacommands/setup.py| 194 ++ 16 files changed, 412 insertions(+), 1 deletion(-) create mode 100644 packaging/Makefile.am create mode 100644 packaging/freeipa/Makefile.am create mode 100644 packaging/freeipa/README.txt create mode 100644 packaging/freeipa/setup.cfg create mode 100755 packaging/freeipa/setup.py create mode 100644 packaging/ipa/Makefile.am create mode 100644 packaging/ipa/README.txt create mode 100644 packaging/ipa/setup.cfg create mode 100755 packaging/ipa/setup.py create mode 100644 packaging/ipacommands/MANIFEST.in create mode 100644 packaging/ipacommands/Makefile.am create mode 100644 packaging/ipacommands/setup.cfg create mode 100644 packaging/ipacommands/setup.py diff --git a/.gitignore b/.gitignore index 04553fd..249f158 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,10 @@ freeipa2-dev-doc /ipaplatform/paths.py /ipaplatform/services.py /ipaplatform/tasks.py + +/packaging/ipacommands/COPYING +/packaging/ipacommands/Contributors.txt +/packaging/ipacommands/asn1 +/packaging/ipacommands/client +/packaging/ipacommands/ipasetup.py +/packaging/ipacommands/util diff --git a/Makefile.am b/Makefile.am index 9bfc899..e25cea3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 IPACLIENT_SUBDIRS = ipaclient ipalib ipapython -SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaplatform ipaserver ipatests po +SUBDIRS = asn1 util client contrib daemons init install $(IPACLIENT_SUBDIRS) ipaplatform ipaserver ipatests packaging po MOSTLYCLEANFILES = ipasetup.pyc ipasetup.pyo \ ignore_import_errors.pyc ignore_import_errors.pyo \ @@ -202,6 +202,9 @@ $(WHEELBUNDLEDIR): mkdir -p $(WHEELBUNDLEDIR) bdist_wheel: $(WHEELDISTDIR) + $(MAKE) $(AM_MAKEFLAGS) -C packaging/ipacommands sdist || exit 1; + $(MAKE) $(AM_MAKEFLAGS) -C packaging/ipa bdist_wheel || exit 1; + $(MAKE) $(AM_MAKEFLAGS) -C packaging/freeipa bdist_wheel || exit 1; for dir in $(IPACLIENT_SUBDIRS); do \ $(MAKE) $(AM_MAKEFLAGS) -C $${dir} $@ || exit 1; \ done diff --git a/configure.ac b/configure.ac index 6cd3a89..12bc880 100644 --- a/configure.ac +++ b/configure.ac @@ -556,6 +556,10 @@ AC_CONFIG_FILES([ ipaserver/Makefile ipatests/Makefile ipatests/man/Makefile +packaging/Makefile +packaging/freeipa/Makefile +packaging/ipa/Makefile +packaging/ipacommands/Makefile po/Makefile.in po/Makefile.hack util/Makefile diff --git a/packaging/Makefile.am b/packaging/Makefile.am new file mode 100644 index 000..e033673 --- /dev/null +++ b/packaging/Makefile.am @@ -0,0 +1,11 @@ +# This file will be processed with automake-1.7 to create Makefile.in +# +AUTOMAKE_OPTIONS = 1.7 subdir-objects + +NULL = + +SUBDIRS = \ + freeipa \ + ipa \ + ipacommands \ + $(NULL) diff --git a/packaging/freeipa/Makefile.am b/packaging/freeipa/Makefile.am new file mode 100644 index 000..8be72b2 --- /dev/null +++ b/packaging/freeipa/Makefile.am @@ -0,0 +1 @@ +include $(top_srcdir)/Makefile.python.am diff --git a/packaging/freeipa/README.txt b/packaging/freeipa/README.txt new file mode 100644 index 000..b58448f --- /dev/null +++ b/packaging/freeipa/README.txt @@ -0,0 +1,2 @@ +This is a dummy package for FreeIPA's ipaclient. + diff --git a/packaging/freeipa/setup.cfg b/packaging/freeipa/setup.cfg new file mode 10