From a138801474b7695d60831bf51b50a0b96fa25041 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 27 Sep 2011 16:22:00 +0200 Subject: [PATCH] Rewrite the buildsystem of this package. python-distutils was not doing a very great job I guess we need more flexibility. So I re-wrote everything we are currently using in simple Makefiles. --- .gitignore | 7 +- INSTALL | 1 - MANIFEST.in | 5 - Makeconfig | 24 ++ Makefile | 42 +- macros/constants.macro | 3 - po/Makefile | 32 ++ po/POTFILES.in | 49 --- po/pakfire.pot | 403 +++++++++--------- python/Makefile | 27 ++ {pakfire => python/pakfire}/__init__.py | 0 {pakfire => python/pakfire}/actions.py | 0 {pakfire => python/pakfire}/api.py | 0 {pakfire => python/pakfire}/base.py | 0 {pakfire => python/pakfire}/builder.py | 0 {pakfire => python/pakfire}/chroot.py | 0 {pakfire => python/pakfire}/cli.py | 0 {pakfire => python/pakfire}/compress.py | 0 {pakfire => python/pakfire}/config.py | 0 {pakfire => python/pakfire}/constants.py | 0 {pakfire => python/pakfire}/distro.py | 0 {pakfire => python/pakfire}/downloader.py | 0 {pakfire => python/pakfire}/errors.py | 0 {pakfire => python/pakfire}/i18n.py | 0 {pakfire => python/pakfire}/logger.py | 0 .../pakfire}/packages/__init__.py | 0 {pakfire => python/pakfire}/packages/base.py | 0 {pakfire => python/pakfire}/packages/file.py | 4 +- .../pakfire}/packages/installed.py | 0 {pakfire => python/pakfire}/packages/lexer.py | 0 {pakfire => python/pakfire}/packages/make.py | 2 +- .../pakfire}/packages/packager.py | 0 {pakfire => python/pakfire}/packages/solv.py | 0 .../pakfire}/repository/__init__.py | 0 .../pakfire}/repository/base.py | 0 .../pakfire}/repository/cache.py | 0 .../pakfire}/repository/database.py | 0 .../pakfire}/repository/index.py | 0 .../pakfire}/repository/installed.py | 0 .../pakfire}/repository/local.py | 0 .../pakfire}/repository/metadata.py | 0 .../pakfire}/repository/remote.py | 0 {pakfire => python/pakfire}/satsolver.py | 0 {pakfire => python/pakfire}/server.py | 0 {pakfire => python/pakfire}/transaction.py | 0 {pakfire => python/pakfire}/util.py | 0 python/src/Makefile | 29 ++ {src => python/src}/_pakfiremodule.c | 0 {src => python/src}/config.h | 0 {src => python/src}/pool.c | 0 {src => python/src}/pool.h | 0 {src => python/src}/problem.c | 0 {src => python/src}/problem.h | 0 {src => python/src}/relation.c | 0 {src => python/src}/relation.h | 0 {src => python/src}/repo.c | 0 {src => python/src}/repo.h | 0 {src => python/src}/request.c | 0 {src => python/src}/request.h | 0 {src => python/src}/solution.c | 0 {src => python/src}/solution.h | 0 {src => python/src}/solvable.c | 0 {src => python/src}/solvable.h | 0 {src => python/src}/solver.c | 0 {src => python/src}/solver.h | 0 {src => python/src}/step.c | 0 {src => python/src}/step.h | 0 {src => python/src}/transaction.c | 0 {src => python/src}/transaction.h | 0 {src => python/src}/util.c | 0 {src => python/src}/util.h | 0 scripts/Makefile | 40 ++ .../chroot-shell | 0 {tools/buildsystem-tools => scripts}/cleanup | 0 .../dependency-tracker | 0 .../functions-common | 0 .../functions-constants | 0 .../functions-directories | 0 .../functions-files | 0 .../functions-lists | 0 .../functions-logging | 0 .../functions-packager-find | 0 scripts/{pakfire => pakfire-multicall.py} | 0 .../buildsystem-tools => scripts}/perl.prov | 0 {tools/buildsystem-tools => scripts}/perl.req | 0 .../pkg-config.prov | 0 .../pkg-config.req | 0 .../buildsystem-tools => scripts}/py-compile | 0 .../quality-agent => scripts}/quality-agent | 0 .../quality-agent.d/001-include-files | 0 .../quality-agent.d/001-remove-info-files | 0 .../quality-agent.d/001-remove-static-libs | 0 .../quality-agent.d/001-unsafe-files | 0 .../quality-agent.d/002-bad-symlinks | 0 .../quality-agent.d/003-libs-location | 0 .../quality-agent.d/050-canary | 0 .../quality-agent.d/050-execstacks | 0 .../quality-agent.d/050-invalid-interpreters | 0 .../quality-agent.d/050-libs-needed | 0 .../quality-agent.d/050-libs-soname | 0 .../quality-agent.d/050-nx | 0 .../quality-agent.d/050-relro | 0 .../quality-agent.d/050-root-links-to-usr | 0 .../quality-agent.d/050-rpaths | 0 .../quality-agent.d/090-man-pages | 0 .../quality-agent.d/090-python-hardlinks | 0 .../quality-agent.d/090-remove-empty-dirs | 0 .../quality-agent.d/095-directory-layout | 0 .../quality-agent.d/qa-include | 2 +- setup.py | 47 -- tools/buildsystem-tools/common-functions | 14 - tools/buildsystem-tools/stripper | 31 -- 112 files changed, 383 insertions(+), 379 deletions(-) delete mode 100644 MANIFEST.in create mode 100644 Makeconfig create mode 100644 po/Makefile delete mode 100644 po/POTFILES.in create mode 100644 python/Makefile rename {pakfire => python/pakfire}/__init__.py (100%) rename {pakfire => python/pakfire}/actions.py (100%) rename {pakfire => python/pakfire}/api.py (100%) rename {pakfire => python/pakfire}/base.py (100%) rename {pakfire => python/pakfire}/builder.py (100%) rename {pakfire => python/pakfire}/chroot.py (100%) rename {pakfire => python/pakfire}/cli.py (100%) rename {pakfire => python/pakfire}/compress.py (100%) rename {pakfire => python/pakfire}/config.py (100%) rename {pakfire => python/pakfire}/constants.py (100%) rename {pakfire => python/pakfire}/distro.py (100%) rename {pakfire => python/pakfire}/downloader.py (100%) rename {pakfire => python/pakfire}/errors.py (100%) rename {pakfire => python/pakfire}/i18n.py (100%) rename {pakfire => python/pakfire}/logger.py (100%) rename {pakfire => python/pakfire}/packages/__init__.py (100%) rename {pakfire => python/pakfire}/packages/base.py (100%) rename {pakfire => python/pakfire}/packages/file.py (99%) rename {pakfire => python/pakfire}/packages/installed.py (100%) rename {pakfire => python/pakfire}/packages/lexer.py (100%) rename {pakfire => python/pakfire}/packages/make.py (99%) rename {pakfire => python/pakfire}/packages/packager.py (100%) rename {pakfire => python/pakfire}/packages/solv.py (100%) rename {pakfire => python/pakfire}/repository/__init__.py (100%) rename {pakfire => python/pakfire}/repository/base.py (100%) rename {pakfire => python/pakfire}/repository/cache.py (100%) rename {pakfire => python/pakfire}/repository/database.py (100%) rename {pakfire => python/pakfire}/repository/index.py (100%) rename {pakfire => python/pakfire}/repository/installed.py (100%) rename {pakfire => python/pakfire}/repository/local.py (100%) rename {pakfire => python/pakfire}/repository/metadata.py (100%) rename {pakfire => python/pakfire}/repository/remote.py (100%) rename {pakfire => python/pakfire}/satsolver.py (100%) rename {pakfire => python/pakfire}/server.py (100%) rename {pakfire => python/pakfire}/transaction.py (100%) rename {pakfire => python/pakfire}/util.py (100%) create mode 100644 python/src/Makefile rename {src => python/src}/_pakfiremodule.c (100%) rename {src => python/src}/config.h (100%) rename {src => python/src}/pool.c (100%) rename {src => python/src}/pool.h (100%) rename {src => python/src}/problem.c (100%) rename {src => python/src}/problem.h (100%) rename {src => python/src}/relation.c (100%) rename {src => python/src}/relation.h (100%) rename {src => python/src}/repo.c (100%) rename {src => python/src}/repo.h (100%) rename {src => python/src}/request.c (100%) rename {src => python/src}/request.h (100%) rename {src => python/src}/solution.c (100%) rename {src => python/src}/solution.h (100%) rename {src => python/src}/solvable.c (100%) rename {src => python/src}/solvable.h (100%) rename {src => python/src}/solver.c (100%) rename {src => python/src}/solver.h (100%) rename {src => python/src}/step.c (100%) rename {src => python/src}/step.h (100%) rename {src => python/src}/transaction.c (100%) rename {src => python/src}/transaction.h (100%) rename {src => python/src}/util.c (100%) rename {src => python/src}/util.h (100%) create mode 100644 scripts/Makefile rename {tools/buildsystem-tools => scripts}/chroot-shell (100%) rename {tools/buildsystem-tools => scripts}/cleanup (100%) rename {tools/buildsystem-tools => scripts}/dependency-tracker (100%) rename {tools/buildsystem-tools => scripts}/functions-common (100%) rename {tools/buildsystem-tools => scripts}/functions-constants (100%) rename {tools/buildsystem-tools => scripts}/functions-directories (100%) rename {tools/buildsystem-tools => scripts}/functions-files (100%) rename {tools/buildsystem-tools => scripts}/functions-lists (100%) rename {tools/buildsystem-tools => scripts}/functions-logging (100%) rename {tools/buildsystem-tools => scripts}/functions-packager-find (100%) rename scripts/{pakfire => pakfire-multicall.py} (100%) rename {tools/buildsystem-tools => scripts}/perl.prov (100%) rename {tools/buildsystem-tools => scripts}/perl.req (100%) rename {tools/buildsystem-tools => scripts}/pkg-config.prov (100%) rename {tools/buildsystem-tools => scripts}/pkg-config.req (100%) rename {tools/buildsystem-tools => scripts}/py-compile (100%) rename {tools/quality-agent => scripts}/quality-agent (100%) rename {tools/quality-agent => scripts}/quality-agent.d/001-include-files (100%) rename {tools/quality-agent => scripts}/quality-agent.d/001-remove-info-files (100%) rename {tools/quality-agent => scripts}/quality-agent.d/001-remove-static-libs (100%) rename {tools/quality-agent => scripts}/quality-agent.d/001-unsafe-files (100%) rename {tools/quality-agent => scripts}/quality-agent.d/002-bad-symlinks (100%) rename {tools/quality-agent => scripts}/quality-agent.d/003-libs-location (100%) rename {tools/quality-agent => scripts}/quality-agent.d/050-canary (100%) rename {tools/quality-agent => scripts}/quality-agent.d/050-execstacks (100%) rename {tools/quality-agent => scripts}/quality-agent.d/050-invalid-interpreters (100%) rename {tools/quality-agent => scripts}/quality-agent.d/050-libs-needed (100%) rename {tools/quality-agent => scripts}/quality-agent.d/050-libs-soname (100%) rename {tools/quality-agent => scripts}/quality-agent.d/050-nx (100%) rename {tools/quality-agent => scripts}/quality-agent.d/050-relro (100%) rename {tools/quality-agent => scripts}/quality-agent.d/050-root-links-to-usr (100%) rename {tools/quality-agent => scripts}/quality-agent.d/050-rpaths (100%) rename {tools/quality-agent => scripts}/quality-agent.d/090-man-pages (100%) rename {tools/quality-agent => scripts}/quality-agent.d/090-python-hardlinks (100%) rename {tools/quality-agent => scripts}/quality-agent.d/090-remove-empty-dirs (100%) rename {tools/quality-agent => scripts}/quality-agent.d/095-directory-layout (100%) rename {tools/quality-agent => scripts}/quality-agent.d/qa-include (96%) delete mode 100644 setup.py delete mode 100644 tools/buildsystem-tools/common-functions delete mode 100755 tools/buildsystem-tools/stripper diff --git a/.gitignore b/.gitignore index 743df7581..dce47cacc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ -/build -/dist -/pakfire/__version__.py +/python/pakfire/__version__.py /tmp *.py[co] +*.o +*.[ms]o +*.tar.gz diff --git a/INSTALL b/INSTALL index f6ea5aa0b..c234ed000 100644 --- a/INSTALL +++ b/INSTALL @@ -3,7 +3,6 @@ For general information about pakfire see README. Requirements: * Python 2.6 or greater (not Python 3.x) - * python-distutils-extra (for install) * pyliblzma * python-progressbar * python-xattr diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 9e01e902c..000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -include INSTALL Makefile -recursive-include examples * -recursive-include po * -recursive-include src *.c *.h -recursive-include tools * diff --git a/Makeconfig b/Makeconfig new file mode 100644 index 000000000..4e41a8dce --- /dev/null +++ b/Makeconfig @@ -0,0 +1,24 @@ + +PACKAGE_NAME = pakfire +PACKAGE_VERSION = 0.9.9 +PACKAGE_AUTHOR = IPFire.org Team +PACKAGE_AUTHOR_EMAIL = info@ipfire.org +PACKAGE_URL = http://redmine.ipfire.org/projects/buildsystem3 +PACKAGE_VERSION_FILE = pakfire/__version__.py + +# Get the version and configuration of the python interpreter. +PYTHON_VERSION = $(shell python -c "import platform; print '.'.join(platform.python_version_tuple()[:2])") +PYTHON_CC = gcc -pthread +PYTHON_CFLAGS = $(shell python-config --cflags) +PYTHON_DIR = /usr/lib/python$(PYTHON_VERSION)/site-packages +PYTHON_MODULES = pakfire pakfire/packages pakfire/repository + +# The place, where all internally used scripts and bins are copied. +SCRIPT_DIR = /usr/lib/$(PACKAGE_NAME) + +TOP := $(dir $(lastword $(MAKEFILE_LIST))) + +# A list of all files that contain translations and need to +# be indexed. +TRANS_FILES = $(addsuffix /*.py,$(addprefix python/,$(PYTHON_MODULES))) +TRANS_FILES += python/src/*.c scripts/pakfire-multicall.py diff --git a/Makefile b/Makefile index 97b3ce046..eb308d93c 100644 --- a/Makefile +++ b/Makefile @@ -1,36 +1,37 @@ -DESTDIR ?= / +include Makeconfig -all: po build +SUBDIRS = po python scripts + +all: build .PHONY: build build: - python setup.py build + for dir in $(SUBDIRS); do \ + $(MAKE) -C $${dir} || exit; \ + done .PHONY: clean clean: - python setup.py clean - -rm -rfv build + for dir in $(SUBDIRS); do \ + $(MAKE) -C $${dir} clean || exit; \ + done .PHONY: dist dist: - python setup.py sdist - -.PHONY: bdist -bdist: - python setup.py bdist + git archive --format=tar --prefix=$(PACKAGE_NAME)-$(PACKAGE_VERSION)/ HEAD | \ + gzip -9 > $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz .PHONY: install -install: po - python setup.py install --root=$(DESTDIR) --prefix=/usr +install: + for dir in $(SUBDIRS); do \ + $(MAKE) -C $${dir} install || exit; \ + done - # Create script aliases. - ln -svf pakfire $(DESTDIR)/usr/bin/pakfire-builder - ln -svf pakfire $(DESTDIR)/usr/bin/pakfire-server - - -mkdir -pv $(DESTDIR)/usr/lib/pakfire - ln -svf ../../bin/pakfire $(DESTDIR)/usr/lib/pakfire/builder + -mkdir -pv $(DESTDIR)/usr/lib/pakfire/macros + cp -vf macros/*.macro $(DESTDIR)/usr/lib/pakfire/macros + # Install example configuration. -mkdir -pv $(DESTDIR)/etc/pakfire.repos.d cp -vf examples/pakfire.conf $(DESTDIR)/etc/pakfire.conf cp -vf examples/pakfire.repos.d/* $(DESTDIR)/etc/pakfire.repos.d/ @@ -38,8 +39,3 @@ install: po .PHONY: check check: ./runpychecker.sh - -.PHONY: po -po: - find pakfire src scripts -name "*.py" -or -name "*.c" -or -name "pakfire" -and -type f | \ - grep -v "__version__.py" | sort > po/POTFILES.in diff --git a/macros/constants.macro b/macros/constants.macro index f7bcfd74e..02a7b5c9f 100644 --- a/macros/constants.macro +++ b/macros/constants.macro @@ -27,9 +27,6 @@ sources = %{thisapp}.tar.gz # Guesses the compression type automatically. MACRO_EXTRACT = tar xaf -# Macro to strip debugging symbols. -MACRO_STRIP = /usr/lib/buildsystem-tools/stripper %{BUILDROOT} - MACRO_PATCHES patches="%{patches}" diff --git a/po/Makefile b/po/Makefile new file mode 100644 index 000000000..c59687460 --- /dev/null +++ b/po/Makefile @@ -0,0 +1,32 @@ + +include ../Makeconfig + +POT_FILE = $(PACKAGE_NAME).pot +PO_FILES = $(wildcard *.po) +MO_FILES = $(patsubst %.po,%.mo,$(PO_FILES)) +LANGS = $(patsubst %.po,%,$(PO_FILES)) + +TRANS_FILES := $(addprefix $(TOP),$(TRANS_FILES)) +TRANS_FILES := $(sort $(wildcard $(TRANS_FILES))) + +.PHONY: all +all: $(MO_FILES) $(POT_FILE) + +$(POT_FILE): $(TRANS_FILES) + xgettext -d $(PACKAGE_NAME) -k_ -kN_ \ + -o $@ --add-comments --from-code=UTF-8 $^ + +%.mo: %.po + msgfmt -o $@ $< + +.PHONY: install +install: $(MO_FILES) + # Install all language catalogs to their designated place. + for lang in $(LANGS); do \ + mkdir -pv $(DESTDIR)/usr/share/locale/$${lang}/LC_MESSAGES/; \ + cp -vf $${lang}.mo $(DESTDIR)/usr/share/locale/$${lang}/LC_MESSAGES/$(PACKAGE_NAME).mo || exit; \ + done + +.PHONY: clean +clean: + rm -f $(POT_FILE) $(MO_FILES) diff --git a/po/POTFILES.in b/po/POTFILES.in deleted file mode 100644 index c9f23fc2c..000000000 --- a/po/POTFILES.in +++ /dev/null @@ -1,49 +0,0 @@ -pakfire/actions.py -pakfire/api.py -pakfire/base.py -pakfire/builder.py -pakfire/chroot.py -pakfire/cli.py -pakfire/compress.py -pakfire/config.py -pakfire/constants.py -pakfire/distro.py -pakfire/downloader.py -pakfire/errors.py -pakfire/i18n.py -pakfire/__init__.py -pakfire/logger.py -pakfire/packages/base.py -pakfire/packages/file.py -pakfire/packages/__init__.py -pakfire/packages/installed.py -pakfire/packages/lexer.py -pakfire/packages/make.py -pakfire/packages/packager.py -pakfire/packages/solv.py -pakfire/repository/base.py -pakfire/repository/cache.py -pakfire/repository/database.py -pakfire/repository/index.py -pakfire/repository/__init__.py -pakfire/repository/installed.py -pakfire/repository/local.py -pakfire/repository/metadata.py -pakfire/repository/remote.py -pakfire/satsolver.py -pakfire/server.py -pakfire/transaction.py -pakfire/util.py -scripts/pakfire -src/_pakfiremodule.c -src/pool.c -src/problem.c -src/relation.c -src/repo.c -src/request.c -src/solution.c -src/solvable.c -src/solver.c -src/step.c -src/transaction.c -src/util.c diff --git a/po/pakfire.pot b/po/pakfire.pot index 63fe0751d..38cfa0469 100644 --- a/po/pakfire.pot +++ b/po/pakfire.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-09-24 17:09+0200\n" +"POT-Creation-Date: 2011-09-27 16:07+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,777 +17,782 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../pakfire/actions.py:108 +#: ../python/pakfire/actions.py:108 #, python-format msgid "Cannot run scriptlet because no interpreter is available: %s" msgstr "" -#: ../pakfire/actions.py:112 +#: ../python/pakfire/actions.py:112 #, python-format msgid "Cannot run scriptlet because the interpreter is not executable: %s" msgstr "" -#: ../pakfire/actions.py:161 +#: ../python/pakfire/actions.py:161 #, python-format msgid "" "The scriptlet returned an error:\n" "%s" msgstr "" -#: ../pakfire/actions.py:164 +#: ../python/pakfire/actions.py:164 #, python-format msgid "The scriptlet ran more than %s seconds and was killed." msgstr "" -#: ../pakfire/actions.py:222 ../pakfire/actions.py:279 +#: ../python/pakfire/actions.py:222 ../python/pakfire/actions.py:279 msgid "Installing" msgstr "" -#: ../pakfire/actions.py:232 +#: ../python/pakfire/actions.py:232 msgid "Updating" msgstr "" -#: ../pakfire/actions.py:246 +#: ../python/pakfire/actions.py:246 msgid "Removing" msgstr "" #. Cleaning up leftover files and stuff. -#: ../pakfire/actions.py:264 +#: ../python/pakfire/actions.py:264 msgid "Cleanup" msgstr "" -#: ../pakfire/actions.py:289 +#: ../python/pakfire/actions.py:289 msgid "Downgrading" msgstr "" -#: ../pakfire/base.py:199 ../pakfire/base.py:229 ../pakfire/base.py:275 -#: ../pakfire/base.py:316 ../pakfire/base.py:349 +#: ../python/pakfire/base.py:199 ../python/pakfire/base.py:229 +#: ../python/pakfire/base.py:275 ../python/pakfire/base.py:316 +#: ../python/pakfire/base.py:349 msgid "Nothing to do" msgstr "" -#: ../pakfire/base.py:261 +#: ../python/pakfire/base.py:261 msgid "There are no packages to install." msgstr "" -#: ../pakfire/base.py:451 +#: ../python/pakfire/base.py:451 msgid "Build command has failed." msgstr "" -#: ../pakfire/base.py:535 +#: ../python/pakfire/base.py:535 msgid "Everything is fine." msgstr "" -#: ../pakfire/builder.py:123 +#: ../python/pakfire/builder.py:123 msgid "Package information:" msgstr "" #. Copy the makefile and load source tarballs. -#: ../pakfire/builder.py:261 +#: ../python/pakfire/builder.py:261 msgid "Extracting" msgstr "" -#: ../pakfire/builder.py:551 +#: ../python/pakfire/builder.py:551 msgid "The build command failed. See logfile for details." msgstr "" #. Package the result. #. Make all these little package from the build environment. -#: ../pakfire/builder.py:700 +#: ../python/pakfire/builder.py:700 msgid "Creating packages:" msgstr "" #. Execute the buildscript of this stage. -#: ../pakfire/builder.py:720 +#: ../python/pakfire/builder.py:720 #, python-format msgid "Running stage %s:" msgstr "" -#: ../pakfire/cli.py:42 +#: ../python/pakfire/cli.py:42 msgid "Pakfire command line interface." msgstr "" -#: ../pakfire/cli.py:49 +#: ../python/pakfire/cli.py:49 msgid "The path where pakfire should operate in." msgstr "" -#: ../pakfire/cli.py:112 +#: ../python/pakfire/cli.py:112 msgid "Enable verbose output." msgstr "" -#: ../pakfire/cli.py:115 +#: ../python/pakfire/cli.py:115 msgid "Path to a configuration file to load." msgstr "" -#: ../pakfire/cli.py:118 +#: ../python/pakfire/cli.py:118 msgid "Disable a repository temporarily." msgstr "" -#: ../pakfire/cli.py:121 +#: ../python/pakfire/cli.py:121 msgid "Enable a repository temporarily." msgstr "" -#: ../pakfire/cli.py:124 +#: ../python/pakfire/cli.py:124 msgid "Run pakfire in offline mode." msgstr "" -#: ../pakfire/cli.py:129 +#: ../python/pakfire/cli.py:129 msgid "Install one or more packages to the system." msgstr "" -#: ../pakfire/cli.py:131 +#: ../python/pakfire/cli.py:131 msgid "Give name of at least one package to install." msgstr "" -#: ../pakfire/cli.py:137 +#: ../python/pakfire/cli.py:137 msgid "Install one or more packages from the filesystem." msgstr "" -#: ../pakfire/cli.py:139 +#: ../python/pakfire/cli.py:139 msgid "Give filename of at least one package." msgstr "" -#: ../pakfire/cli.py:145 +#: ../python/pakfire/cli.py:145 msgid "Remove one or more packages from the system." msgstr "" -#: ../pakfire/cli.py:147 +#: ../python/pakfire/cli.py:147 msgid "Give name of at least one package to remove." msgstr "" -#: ../pakfire/cli.py:153 +#: ../python/pakfire/cli.py:153 msgid "Update the whole system or one specific package." msgstr "" -#: ../pakfire/cli.py:155 ../pakfire/cli.py:163 +#: ../python/pakfire/cli.py:155 ../python/pakfire/cli.py:163 msgid "Give a name of a package to update or leave emtpy for all." msgstr "" -#: ../pakfire/cli.py:161 +#: ../python/pakfire/cli.py:161 msgid "Check, if there are any updates available." msgstr "" -#: ../pakfire/cli.py:169 +#: ../python/pakfire/cli.py:169 msgid "Print some information about the given package(s)." msgstr "" -#: ../pakfire/cli.py:171 +#: ../python/pakfire/cli.py:171 msgid "Give at least the name of one package." msgstr "" -#: ../pakfire/cli.py:177 +#: ../python/pakfire/cli.py:177 msgid "Search for a given pattern." msgstr "" -#: ../pakfire/cli.py:179 +#: ../python/pakfire/cli.py:179 msgid "A pattern to search for." msgstr "" -#: ../pakfire/cli.py:185 +#: ../python/pakfire/cli.py:185 msgid "Get a list of packages that provide a given file or feature." msgstr "" -#: ../pakfire/cli.py:187 +#: ../python/pakfire/cli.py:187 msgid "File or feature to search for." msgstr "" -#: ../pakfire/cli.py:193 +#: ../python/pakfire/cli.py:193 msgid "Get list of packages that belong to the given group." msgstr "" -#: ../pakfire/cli.py:195 +#: ../python/pakfire/cli.py:195 msgid "Group name to search for." msgstr "" -#: ../pakfire/cli.py:201 +#: ../python/pakfire/cli.py:201 msgid "Install all packages that belong to the given group." msgstr "" -#: ../pakfire/cli.py:203 +#: ../python/pakfire/cli.py:203 msgid "Group name." msgstr "" -#: ../pakfire/cli.py:209 +#: ../python/pakfire/cli.py:209 msgid "List all currently enabled repositories." msgstr "" -#: ../pakfire/cli.py:213 +#: ../python/pakfire/cli.py:213 msgid "Cleanup commands." msgstr "" -#: ../pakfire/cli.py:221 +#: ../python/pakfire/cli.py:221 msgid "Cleanup all temporary files." msgstr "" -#: ../pakfire/cli.py:227 +#: ../python/pakfire/cli.py:227 msgid "Check the system for any errors." msgstr "" -#: ../pakfire/cli.py:233 +#: ../python/pakfire/cli.py:233 msgid "Check the dependencies for a particular package." msgstr "" -#: ../pakfire/cli.py:235 +#: ../python/pakfire/cli.py:235 msgid "Give name of at least one package to check." msgstr "" -#: ../pakfire/cli.py:298 ../pakfire/transaction.py:194 +#: ../python/pakfire/cli.py:298 ../python/pakfire/transaction.py:194 msgid "Repository" msgstr "" -#: ../pakfire/cli.py:298 +#: ../python/pakfire/cli.py:298 msgid "Enabled" msgstr "" -#: ../pakfire/cli.py:298 +#: ../python/pakfire/cli.py:298 msgid "Priority" msgstr "" -#: ../pakfire/cli.py:298 +#: ../python/pakfire/cli.py:298 msgid "Packages" msgstr "" -#: ../pakfire/cli.py:310 +#: ../python/pakfire/cli.py:310 msgid "Cleaning up everything..." msgstr "" -#: ../pakfire/cli.py:324 ../pakfire/cli.py:579 +#: ../python/pakfire/cli.py:324 ../python/pakfire/cli.py:579 msgid "Pakfire builder command line interface." msgstr "" -#: ../pakfire/cli.py:379 +#: ../python/pakfire/cli.py:379 msgid "Update the package indexes." msgstr "" -#: ../pakfire/cli.py:385 ../pakfire/cli.py:599 +#: ../python/pakfire/cli.py:385 ../python/pakfire/cli.py:599 msgid "Build one or more packages." msgstr "" -#: ../pakfire/cli.py:387 ../pakfire/cli.py:601 +#: ../python/pakfire/cli.py:387 ../python/pakfire/cli.py:601 msgid "Give name of at least one package to build." msgstr "" -#: ../pakfire/cli.py:391 ../pakfire/cli.py:605 +#: ../python/pakfire/cli.py:391 ../python/pakfire/cli.py:605 msgid "Build the package for the given architecture." msgstr "" -#: ../pakfire/cli.py:393 ../pakfire/cli.py:419 ../pakfire/cli.py:607 +#: ../python/pakfire/cli.py:393 ../python/pakfire/cli.py:419 +#: ../python/pakfire/cli.py:607 msgid "Path were the output files should be copied to." msgstr "" -#: ../pakfire/cli.py:395 ../pakfire/cli.py:408 ../pakfire/cli.py:609 +#: ../python/pakfire/cli.py:395 ../python/pakfire/cli.py:408 +#: ../python/pakfire/cli.py:609 msgid "Mode to run in. Is either 'release' or 'development' (default)." msgstr "" -#: ../pakfire/cli.py:400 +#: ../python/pakfire/cli.py:400 msgid "Go into a shell." msgstr "" -#: ../pakfire/cli.py:402 +#: ../python/pakfire/cli.py:402 msgid "Give name of a package." msgstr "" -#: ../pakfire/cli.py:406 +#: ../python/pakfire/cli.py:406 msgid "Emulated architecture in the shell." msgstr "" -#: ../pakfire/cli.py:413 +#: ../python/pakfire/cli.py:413 msgid "Generate a source package." msgstr "" -#: ../pakfire/cli.py:415 +#: ../python/pakfire/cli.py:415 msgid "Give name(s) of a package(s)." msgstr "" -#: ../pakfire/cli.py:492 +#: ../python/pakfire/cli.py:492 msgid "Pakfire server command line interface." msgstr "" -#: ../pakfire/cli.py:529 +#: ../python/pakfire/cli.py:529 msgid "Request a build job from the server." msgstr "" -#: ../pakfire/cli.py:535 +#: ../python/pakfire/cli.py:535 msgid "Send a keepalive to the server." msgstr "" -#: ../pakfire/cli.py:542 +#: ../python/pakfire/cli.py:542 msgid "Update all repositories." msgstr "" -#: ../pakfire/cli.py:548 +#: ../python/pakfire/cli.py:548 msgid "Repository management commands." msgstr "" -#: ../pakfire/cli.py:556 +#: ../python/pakfire/cli.py:556 msgid "Create a new repository index." msgstr "" -#: ../pakfire/cli.py:557 +#: ../python/pakfire/cli.py:557 msgid "Path to the packages." msgstr "" -#: ../pakfire/cli.py:558 +#: ../python/pakfire/cli.py:558 msgid "Path to input packages." msgstr "" -#: ../pakfire/cli.py:611 +#: ../python/pakfire/cli.py:611 msgid "Do not verify build dependencies." msgstr "" -#: ../pakfire/compress.py:133 ../pakfire/packages/packager.py:489 +#: ../python/pakfire/compress.py:133 +#: ../python/pakfire/packages/packager.py:489 #, python-format msgid "Compressing %s" msgstr "" -#: ../pakfire/errors.py:30 +#: ../python/pakfire/errors.py:30 msgid "An unhandled error occured." msgstr "" -#: ../pakfire/errors.py:51 +#: ../python/pakfire/errors.py:51 msgid "One or more dependencies could not been resolved." msgstr "" -#: ../pakfire/errors.py:66 +#: ../python/pakfire/errors.py:66 msgid "" "The requested action cannot be done on offline mode.\n" "Please connect your system to the network, remove --offline from the command " "line and try again." msgstr "" -#: ../pakfire/packages/base.py:89 +#: ../python/pakfire/packages/base.py:89 msgid "Name" msgstr "" -#: ../pakfire/packages/base.py:90 ../pakfire/transaction.py:193 +#: ../python/pakfire/packages/base.py:90 ../python/pakfire/transaction.py:193 msgid "Arch" msgstr "" -#: ../pakfire/packages/base.py:91 ../pakfire/transaction.py:193 +#: ../python/pakfire/packages/base.py:91 ../python/pakfire/transaction.py:193 msgid "Version" msgstr "" -#: ../pakfire/packages/base.py:92 +#: ../python/pakfire/packages/base.py:92 msgid "Release" msgstr "" -#: ../pakfire/packages/base.py:96 ../pakfire/transaction.py:194 +#: ../python/pakfire/packages/base.py:96 ../python/pakfire/transaction.py:194 msgid "Size" msgstr "" -#: ../pakfire/packages/base.py:100 +#: ../python/pakfire/packages/base.py:100 msgid "Repo" msgstr "" -#: ../pakfire/packages/base.py:103 +#: ../python/pakfire/packages/base.py:103 msgid "Summary" msgstr "" -#: ../pakfire/packages/base.py:104 +#: ../python/pakfire/packages/base.py:104 msgid "Groups" msgstr "" -#: ../pakfire/packages/base.py:105 +#: ../python/pakfire/packages/base.py:105 msgid "URL" msgstr "" -#: ../pakfire/packages/base.py:106 +#: ../python/pakfire/packages/base.py:106 msgid "License" msgstr "" -#: ../pakfire/packages/base.py:109 +#: ../python/pakfire/packages/base.py:109 msgid "Description" msgstr "" -#: ../pakfire/packages/base.py:116 +#: ../python/pakfire/packages/base.py:116 msgid "Maintainer" msgstr "" -#: ../pakfire/packages/base.py:118 +#: ../python/pakfire/packages/base.py:118 msgid "UUID" msgstr "" -#: ../pakfire/packages/base.py:119 +#: ../python/pakfire/packages/base.py:119 msgid "Build ID" msgstr "" -#: ../pakfire/packages/base.py:120 +#: ../python/pakfire/packages/base.py:120 msgid "Build date" msgstr "" -#: ../pakfire/packages/base.py:121 +#: ../python/pakfire/packages/base.py:121 msgid "Build host" msgstr "" -#: ../pakfire/packages/base.py:123 +#: ../python/pakfire/packages/base.py:123 msgid "Provides" msgstr "" -#: ../pakfire/packages/base.py:128 +#: ../python/pakfire/packages/base.py:128 msgid "Pre-requires" msgstr "" -#: ../pakfire/packages/base.py:133 +#: ../python/pakfire/packages/base.py:133 msgid "Requires" msgstr "" -#: ../pakfire/packages/base.py:138 +#: ../python/pakfire/packages/base.py:138 msgid "Conflicts" msgstr "" -#: ../pakfire/packages/base.py:143 +#: ../python/pakfire/packages/base.py:143 msgid "Obsoletes" msgstr "" -#: ../pakfire/packages/base.py:151 +#: ../python/pakfire/packages/base.py:151 msgid "File" msgstr "" -#: ../pakfire/packages/base.py:332 +#: ../python/pakfire/packages/base.py:332 msgid "Not set" msgstr "" -#: ../pakfire/packages/file.py:106 +#: ../python/pakfire/packages/file.py:106 #, python-format -msgid "Could not extract file: /%s - %s" +msgid "Could not extract file: /%(src)s - %(dst)s" msgstr "" -#: ../pakfire/packages/file.py:156 +#: ../python/pakfire/packages/file.py:156 #, python-format msgid "Filename: %s" msgstr "" -#: ../pakfire/packages/make.py:101 +#: ../python/pakfire/packages/make.py:101 msgid "Package name is undefined." msgstr "" -#: ../pakfire/packages/make.py:104 +#: ../python/pakfire/packages/make.py:104 msgid "Package version is undefined." msgstr "" #. Load progressbar. -#: ../pakfire/packages/packager.py:315 +#: ../python/pakfire/packages/packager.py:315 msgid "Packaging" msgstr "" -#: ../pakfire/packages/packager.py:608 +#: ../python/pakfire/packages/packager.py:608 #, python-format msgid "Building source package %s:" msgstr "" -#: ../pakfire/repository/index.py:229 +#: ../python/pakfire/repository/index.py:229 #, python-format msgid "" "I cannot be forced to re-download the metadata for the repository '%s' when " "running in offline mode." msgstr "" -#: ../pakfire/repository/index.py:279 +#: ../python/pakfire/repository/index.py:279 #, python-format msgid "%s: package database" msgstr "" #. Create progress bar. -#: ../pakfire/repository/index.py:367 +#: ../python/pakfire/repository/index.py:367 #, python-format msgid "Loading from %s" msgstr "" #. Add all packages from the database to the index. -#: ../pakfire/repository/index.py:424 +#: ../python/pakfire/repository/index.py:424 msgid "Loading installed packages" msgstr "" -#: ../pakfire/repository/remote.py:106 +#: ../python/pakfire/repository/remote.py:106 #, python-format msgid "Cannot download this file in offline mode: %s" msgstr "" -#: ../pakfire/satsolver.py:148 +#: ../python/pakfire/satsolver.py:148 msgid "The solver returned one problem:" msgstr "" #. Ask the user if he or she want to modify the request. If not, just exit. -#: ../pakfire/satsolver.py:164 +#: ../python/pakfire/satsolver.py:164 msgid "Do you want to manually alter the request?" msgstr "" -#: ../pakfire/satsolver.py:167 +#: ../python/pakfire/satsolver.py:167 msgid "You can now try to satisfy the solver by modifying your request." msgstr "" -#: ../pakfire/satsolver.py:172 +#: ../python/pakfire/satsolver.py:172 msgid "Which problem to you want to resolve?" msgstr "" -#: ../pakfire/satsolver.py:174 +#: ../python/pakfire/satsolver.py:174 msgid "Press enter to try to re-solve the request." msgstr "" -#: ../pakfire/satsolver.py:205 +#: ../python/pakfire/satsolver.py:205 #, python-format msgid " Solution: %s" msgstr "" -#: ../pakfire/satsolver.py:214 +#: ../python/pakfire/satsolver.py:214 msgid " Solutions:" msgstr "" -#: ../pakfire/transaction.py:128 +#: ../python/pakfire/transaction.py:128 msgid "Downloading packages:" msgstr "" -#: ../pakfire/transaction.py:193 +#: ../python/pakfire/transaction.py:193 msgid "Package" msgstr "" -#: ../pakfire/transaction.py:198 +#: ../python/pakfire/transaction.py:198 msgid "Installing:" msgstr "" -#: ../pakfire/transaction.py:199 +#: ../python/pakfire/transaction.py:199 msgid "Reinstalling:" msgstr "" -#: ../pakfire/transaction.py:200 +#: ../python/pakfire/transaction.py:200 msgid "Updating:" msgstr "" -#: ../pakfire/transaction.py:201 +#: ../python/pakfire/transaction.py:201 msgid "Downgrading:" msgstr "" -#: ../pakfire/transaction.py:202 +#: ../python/pakfire/transaction.py:202 msgid "Removing:" msgstr "" -#: ../pakfire/transaction.py:208 +#: ../python/pakfire/transaction.py:208 msgid "Transaction Summary" msgstr "" -#: ../pakfire/transaction.py:215 +#: ../python/pakfire/transaction.py:215 msgid "package" msgstr "" -#: ../pakfire/transaction.py:221 +#: ../python/pakfire/transaction.py:221 #, python-format msgid "Total download size: %s" msgstr "" -#: ../pakfire/transaction.py:225 +#: ../python/pakfire/transaction.py:225 #, python-format msgid "Installed size: %s" msgstr "" -#: ../pakfire/transaction.py:227 +#: ../python/pakfire/transaction.py:227 #, python-format msgid "Freed size: %s" msgstr "" -#: ../pakfire/transaction.py:236 +#: ../python/pakfire/transaction.py:236 msgid "Is this okay?" msgstr "" -#: ../pakfire/transaction.py:242 +#: ../python/pakfire/transaction.py:242 msgid "Running transaction" msgstr "" -#: ../pakfire/util.py:66 +#: ../python/pakfire/util.py:66 #, python-format msgid "%s [y/N]" msgstr "" -#: ../scripts/pakfire:23 -msgid "" -"There has been an error when trying to import one or more of the modules, " -"that are required to run Pakfire." -msgstr "" - -#: ../scripts/pakfire:25 -msgid "Please check your installation of Pakfire." -msgstr "" - -#: ../scripts/pakfire:27 -msgid "The error that lead to this:" -msgstr "" - -#: ../scripts/pakfire:65 -msgid "An error has occured when running Pakfire." -msgstr "" - -#: ../scripts/pakfire:68 -msgid "Error message:" -msgstr "" - -#: ../scripts/pakfire:72 -msgid "Further description:" -msgstr "" - -#: ../src/problem.c:159 +#: ../python/src/problem.c:159 #, c-format msgid "%s does not belong to a distupgrade repository" msgstr "" -#: ../src/problem.c:166 +#: ../python/src/problem.c:166 #, c-format msgid "%s has inferior architecture" msgstr "" -#: ../src/problem.c:173 +#: ../python/src/problem.c:173 #, c-format msgid "problem with installed package %s" msgstr "" -#: ../src/problem.c:179 +#: ../python/src/problem.c:179 #, c-format msgid "conflicting requests" msgstr "" -#: ../src/problem.c:184 +#: ../python/src/problem.c:184 #, c-format msgid "nothing provides requested %s" msgstr "" -#: ../src/problem.c:190 +#: ../python/src/problem.c:190 #, c-format msgid "some dependency problem" msgstr "" -#: ../src/problem.c:195 +#: ../python/src/problem.c:195 #, c-format msgid "package %s is not installable" msgstr "" -#: ../src/problem.c:202 +#: ../python/src/problem.c:202 #, c-format msgid "nothing provides %s needed by %s" msgstr "" -#: ../src/problem.c:209 +#: ../python/src/problem.c:209 #, c-format msgid "cannot install both %s and %s" msgstr "" -#: ../src/problem.c:216 +#: ../python/src/problem.c:216 #, c-format msgid "package %s conflicts with %s provided by %s" msgstr "" -#: ../src/problem.c:224 +#: ../python/src/problem.c:224 #, c-format msgid "package %s obsoletes %s provided by %s" msgstr "" -#: ../src/problem.c:232 +#: ../python/src/problem.c:232 #, c-format msgid "installed package %s obsoletes %s provided by %s" msgstr "" -#: ../src/problem.c:240 +#: ../python/src/problem.c:240 #, c-format msgid "package %s implicitely obsoletes %s provided by %s" msgstr "" -#: ../src/problem.c:248 +#: ../python/src/problem.c:248 #, c-format msgid "package %s requires %s, but none of the providers can be installed" msgstr "" -#: ../src/problem.c:255 +#: ../python/src/problem.c:255 #, c-format msgid "package %s conflicts with %s provided by itself" msgstr "" -#: ../src/problem.c:264 +#: ../python/src/problem.c:264 #, c-format msgid "bad rule type" msgstr "" -#: ../src/solution.c:86 +#: ../python/src/solution.c:86 #, c-format msgid "do not keep %s installed" msgstr "" -#: ../src/solution.c:89 +#: ../python/src/solution.c:89 #, c-format msgid "do not install a solvable %s" msgstr "" -#: ../src/solution.c:92 +#: ../python/src/solution.c:92 #, c-format msgid "do not install %s" msgstr "" -#: ../src/solution.c:98 +#: ../python/src/solution.c:98 #, c-format msgid "do not forbid installation of %s" msgstr "" -#: ../src/solution.c:101 +#: ../python/src/solution.c:101 #, c-format msgid "do not deinstall all solvables %s" msgstr "" -#: ../src/solution.c:104 +#: ../python/src/solution.c:104 #, c-format msgid "do not deinstall %s" msgstr "" -#: ../src/solution.c:109 +#: ../python/src/solution.c:109 #, c-format msgid "do not install most recent version of %s" msgstr "" -#: ../src/solution.c:114 +#: ../python/src/solution.c:114 #, c-format msgid "do not lock %s" msgstr "" -#: ../src/solution.c:119 +#: ../python/src/solution.c:119 #, c-format msgid "do something different" msgstr "" -#: ../src/solution.c:126 +#: ../python/src/solution.c:126 #, c-format msgid "keep %s despite the inferior architecture" msgstr "" -#: ../src/solution.c:129 +#: ../python/src/solution.c:129 #, c-format msgid "install %s despite the inferior architecture" msgstr "" -#: ../src/solution.c:135 +#: ../python/src/solution.c:135 #, c-format msgid "keep obsolete %s" msgstr "" -#: ../src/solution.c:138 +#: ../python/src/solution.c:138 #, c-format msgid "install %s from excluded repository" msgstr "" -#: ../src/solution.c:150 +#: ../python/src/solution.c:150 #, c-format msgid "allow downgrade of %s to %s" msgstr "" -#: ../src/solution.c:154 +#: ../python/src/solution.c:154 #, c-format msgid "allow architecture change of %s to %s" msgstr "" -#: ../src/solution.c:159 +#: ../python/src/solution.c:159 #, c-format msgid "allow vendor change from '%s' (%s) to '%s' (%s)" msgstr "" -#: ../src/solution.c:163 +#: ../python/src/solution.c:163 #, c-format msgid "allow vendor change from '%s' (%s) to no vendor (%s)" msgstr "" -#: ../src/solution.c:169 +#: ../python/src/solution.c:169 #, c-format msgid "allow replacement of %s with %s" msgstr "" + +#. XXX Maybe we can make a more beautiful message here?! +#: ../scripts/pakfire-multicall.py:23 +msgid "" +"There has been an error when trying to import one or more of the modules, " +"that are required to run Pakfire." +msgstr "" + +#: ../scripts/pakfire-multicall.py:25 +msgid "Please check your installation of Pakfire." +msgstr "" + +#: ../scripts/pakfire-multicall.py:27 +msgid "The error that lead to this:" +msgstr "" + +#: ../scripts/pakfire-multicall.py:65 +msgid "An error has occured when running Pakfire." +msgstr "" + +#: ../scripts/pakfire-multicall.py:68 +msgid "Error message:" +msgstr "" + +#: ../scripts/pakfire-multicall.py:72 +msgid "Further description:" +msgstr "" diff --git a/python/Makefile b/python/Makefile new file mode 100644 index 000000000..88e4b01d5 --- /dev/null +++ b/python/Makefile @@ -0,0 +1,27 @@ + +include ../Makeconfig + +.PHONY: all +all: $(PACKAGE_VERSION_FILE) + # Build the binary parts. + $(MAKE) -C src + +.PHONY: install +install: $(PACKAGE_VERSION_FILE) + for mod in $(PYTHON_MODULES); do \ + mkdir -pv $(DESTDIR)$(PYTHON_DIR)/$${mod}; \ + cp -vrf $${mod}/*.py $(DESTDIR)$(PYTHON_DIR)/$${mod} || exit; \ + done + + $(MAKE) -C src install + +.PHONY: clean +clean: + rm -f $(PACKAGE_VERSION_FILE) + + $(MAKE) -C src clean + +$(PACKAGE_VERSION_FILE): ../Makeconfig + echo "# this file is autogenerated by the buildsystem" > $(PACKAGE_VERSION_FILE) + echo "PAKFIRE_VERSION = \"$(PACKAGE_VERSION)\"" >> $(PACKAGE_VERSION_FILE) + diff --git a/pakfire/__init__.py b/python/pakfire/__init__.py similarity index 100% rename from pakfire/__init__.py rename to python/pakfire/__init__.py diff --git a/pakfire/actions.py b/python/pakfire/actions.py similarity index 100% rename from pakfire/actions.py rename to python/pakfire/actions.py diff --git a/pakfire/api.py b/python/pakfire/api.py similarity index 100% rename from pakfire/api.py rename to python/pakfire/api.py diff --git a/pakfire/base.py b/python/pakfire/base.py similarity index 100% rename from pakfire/base.py rename to python/pakfire/base.py diff --git a/pakfire/builder.py b/python/pakfire/builder.py similarity index 100% rename from pakfire/builder.py rename to python/pakfire/builder.py diff --git a/pakfire/chroot.py b/python/pakfire/chroot.py similarity index 100% rename from pakfire/chroot.py rename to python/pakfire/chroot.py diff --git a/pakfire/cli.py b/python/pakfire/cli.py similarity index 100% rename from pakfire/cli.py rename to python/pakfire/cli.py diff --git a/pakfire/compress.py b/python/pakfire/compress.py similarity index 100% rename from pakfire/compress.py rename to python/pakfire/compress.py diff --git a/pakfire/config.py b/python/pakfire/config.py similarity index 100% rename from pakfire/config.py rename to python/pakfire/config.py diff --git a/pakfire/constants.py b/python/pakfire/constants.py similarity index 100% rename from pakfire/constants.py rename to python/pakfire/constants.py diff --git a/pakfire/distro.py b/python/pakfire/distro.py similarity index 100% rename from pakfire/distro.py rename to python/pakfire/distro.py diff --git a/pakfire/downloader.py b/python/pakfire/downloader.py similarity index 100% rename from pakfire/downloader.py rename to python/pakfire/downloader.py diff --git a/pakfire/errors.py b/python/pakfire/errors.py similarity index 100% rename from pakfire/errors.py rename to python/pakfire/errors.py diff --git a/pakfire/i18n.py b/python/pakfire/i18n.py similarity index 100% rename from pakfire/i18n.py rename to python/pakfire/i18n.py diff --git a/pakfire/logger.py b/python/pakfire/logger.py similarity index 100% rename from pakfire/logger.py rename to python/pakfire/logger.py diff --git a/pakfire/packages/__init__.py b/python/pakfire/packages/__init__.py similarity index 100% rename from pakfire/packages/__init__.py rename to python/pakfire/packages/__init__.py diff --git a/pakfire/packages/base.py b/python/pakfire/packages/base.py similarity index 100% rename from pakfire/packages/base.py rename to python/pakfire/packages/base.py diff --git a/pakfire/packages/file.py b/python/pakfire/packages/file.py similarity index 99% rename from pakfire/packages/file.py rename to python/pakfire/packages/file.py index 3a3deaff4..f6e370902 100644 --- a/pakfire/packages/file.py +++ b/python/pakfire/packages/file.py @@ -103,8 +103,8 @@ class InnerTarFile(tarfile.TarFile): try: tarfile.TarFile.extract(self, member, path) except OSError, e: - logging.warning(_("Could not extract file: /%s - %s") \ - % (member.name, e)) + logging.warning(_("Could not extract file: /%(src)s - %(dst)s") \ + % { "src" : member.name, "dst" : e, }) # ...and then apply the extended attributes. if member.pax_headers: diff --git a/pakfire/packages/installed.py b/python/pakfire/packages/installed.py similarity index 100% rename from pakfire/packages/installed.py rename to python/pakfire/packages/installed.py diff --git a/pakfire/packages/lexer.py b/python/pakfire/packages/lexer.py similarity index 100% rename from pakfire/packages/lexer.py rename to python/pakfire/packages/lexer.py diff --git a/pakfire/packages/make.py b/python/pakfire/packages/make.py similarity index 99% rename from pakfire/packages/make.py rename to python/pakfire/packages/make.py index 66cc0bf02..3d569f75f 100644 --- a/pakfire/packages/make.py +++ b/python/pakfire/packages/make.py @@ -413,7 +413,7 @@ class MakefilePackage(MakefileBase): return None def track_dependencies(self, builder, path): - result = builder.do("/usr/lib/buildsystem-tools/dependency-tracker %s" \ + result = builder.do("/usr/lib/pakfire/dependency-tracker %s" \ % path, returnOutput=True) for line in result.splitlines(): diff --git a/pakfire/packages/packager.py b/python/pakfire/packages/packager.py similarity index 100% rename from pakfire/packages/packager.py rename to python/pakfire/packages/packager.py diff --git a/pakfire/packages/solv.py b/python/pakfire/packages/solv.py similarity index 100% rename from pakfire/packages/solv.py rename to python/pakfire/packages/solv.py diff --git a/pakfire/repository/__init__.py b/python/pakfire/repository/__init__.py similarity index 100% rename from pakfire/repository/__init__.py rename to python/pakfire/repository/__init__.py diff --git a/pakfire/repository/base.py b/python/pakfire/repository/base.py similarity index 100% rename from pakfire/repository/base.py rename to python/pakfire/repository/base.py diff --git a/pakfire/repository/cache.py b/python/pakfire/repository/cache.py similarity index 100% rename from pakfire/repository/cache.py rename to python/pakfire/repository/cache.py diff --git a/pakfire/repository/database.py b/python/pakfire/repository/database.py similarity index 100% rename from pakfire/repository/database.py rename to python/pakfire/repository/database.py diff --git a/pakfire/repository/index.py b/python/pakfire/repository/index.py similarity index 100% rename from pakfire/repository/index.py rename to python/pakfire/repository/index.py diff --git a/pakfire/repository/installed.py b/python/pakfire/repository/installed.py similarity index 100% rename from pakfire/repository/installed.py rename to python/pakfire/repository/installed.py diff --git a/pakfire/repository/local.py b/python/pakfire/repository/local.py similarity index 100% rename from pakfire/repository/local.py rename to python/pakfire/repository/local.py diff --git a/pakfire/repository/metadata.py b/python/pakfire/repository/metadata.py similarity index 100% rename from pakfire/repository/metadata.py rename to python/pakfire/repository/metadata.py diff --git a/pakfire/repository/remote.py b/python/pakfire/repository/remote.py similarity index 100% rename from pakfire/repository/remote.py rename to python/pakfire/repository/remote.py diff --git a/pakfire/satsolver.py b/python/pakfire/satsolver.py similarity index 100% rename from pakfire/satsolver.py rename to python/pakfire/satsolver.py diff --git a/pakfire/server.py b/python/pakfire/server.py similarity index 100% rename from pakfire/server.py rename to python/pakfire/server.py diff --git a/pakfire/transaction.py b/python/pakfire/transaction.py similarity index 100% rename from pakfire/transaction.py rename to python/pakfire/transaction.py diff --git a/pakfire/util.py b/python/pakfire/util.py similarity index 100% rename from pakfire/util.py rename to python/pakfire/util.py diff --git a/python/src/Makefile b/python/src/Makefile new file mode 100644 index 000000000..d6192724a --- /dev/null +++ b/python/src/Makefile @@ -0,0 +1,29 @@ + +include ../../Makeconfig + +# The name of the module. +MODULENAME = _pakfire.so + +# Libs that are to be linked into the module. +MODULELIBS = -lpython$(PYTHON_VERSION) -lsolv -lsolvext + +SOURCES = $(wildcard *.c) +OBJECTS = $(patsubst %.c,%.o,$(SOURCES)) + +.PHONY: +all: $(MODULENAME) + +$(MODULENAME): $(OBJECTS) + $(PYTHON_CC) $(PYTHON_CFLAGS) -shared $^ $(MODULELIBS) -o $@ + +%.o: %.c Makefile + $(PYTHON_CC) $(PYTHON_CFLAGS) -o $@ -c $< + +.PHONY: clean +clean: + rm -f $(OBJECTS) $(MODULENAME) + +.PHONY: install +install: $(MODULENAME) + -mkdir -pv $(DESTDIR)$(PYTHON_DIR)/$(PACKAGE_NAME) + cp -vf $< $(DESTDIR)$(PYTHON_DIR)/$(PACKAGE_NAME)/ diff --git a/src/_pakfiremodule.c b/python/src/_pakfiremodule.c similarity index 100% rename from src/_pakfiremodule.c rename to python/src/_pakfiremodule.c diff --git a/src/config.h b/python/src/config.h similarity index 100% rename from src/config.h rename to python/src/config.h diff --git a/src/pool.c b/python/src/pool.c similarity index 100% rename from src/pool.c rename to python/src/pool.c diff --git a/src/pool.h b/python/src/pool.h similarity index 100% rename from src/pool.h rename to python/src/pool.h diff --git a/src/problem.c b/python/src/problem.c similarity index 100% rename from src/problem.c rename to python/src/problem.c diff --git a/src/problem.h b/python/src/problem.h similarity index 100% rename from src/problem.h rename to python/src/problem.h diff --git a/src/relation.c b/python/src/relation.c similarity index 100% rename from src/relation.c rename to python/src/relation.c diff --git a/src/relation.h b/python/src/relation.h similarity index 100% rename from src/relation.h rename to python/src/relation.h diff --git a/src/repo.c b/python/src/repo.c similarity index 100% rename from src/repo.c rename to python/src/repo.c diff --git a/src/repo.h b/python/src/repo.h similarity index 100% rename from src/repo.h rename to python/src/repo.h diff --git a/src/request.c b/python/src/request.c similarity index 100% rename from src/request.c rename to python/src/request.c diff --git a/src/request.h b/python/src/request.h similarity index 100% rename from src/request.h rename to python/src/request.h diff --git a/src/solution.c b/python/src/solution.c similarity index 100% rename from src/solution.c rename to python/src/solution.c diff --git a/src/solution.h b/python/src/solution.h similarity index 100% rename from src/solution.h rename to python/src/solution.h diff --git a/src/solvable.c b/python/src/solvable.c similarity index 100% rename from src/solvable.c rename to python/src/solvable.c diff --git a/src/solvable.h b/python/src/solvable.h similarity index 100% rename from src/solvable.h rename to python/src/solvable.h diff --git a/src/solver.c b/python/src/solver.c similarity index 100% rename from src/solver.c rename to python/src/solver.c diff --git a/src/solver.h b/python/src/solver.h similarity index 100% rename from src/solver.h rename to python/src/solver.h diff --git a/src/step.c b/python/src/step.c similarity index 100% rename from src/step.c rename to python/src/step.c diff --git a/src/step.h b/python/src/step.h similarity index 100% rename from src/step.h rename to python/src/step.h diff --git a/src/transaction.c b/python/src/transaction.c similarity index 100% rename from src/transaction.c rename to python/src/transaction.c diff --git a/src/transaction.h b/python/src/transaction.h similarity index 100% rename from src/transaction.h rename to python/src/transaction.h diff --git a/src/util.c b/python/src/util.c similarity index 100% rename from src/util.c rename to python/src/util.c diff --git a/src/util.h b/python/src/util.h similarity index 100% rename from src/util.h rename to python/src/util.h diff --git a/scripts/Makefile b/scripts/Makefile new file mode 100644 index 000000000..b67dabf09 --- /dev/null +++ b/scripts/Makefile @@ -0,0 +1,40 @@ + +include ../Makeconfig + +SCRIPTS = $(SCRIPTS_BIN) $(SCRIPTS_SHELL) +SCRIPTS_BIN = +SCRIPTS_SHELL = \ + chroot-shell \ + cleanup \ + dependency-tracker \ + pakfire-multicall.py \ + py-compile \ + quality-agent \ + $(wildcard functions-*) \ + $(wildcard *.prov) \ + $(wildcard *.req) + +.PHONY: all +all: $(SCRIPTS) + +.PHONY: install +install: $(SCRIPTS) + -mkdir -pv $(DESTDIR)$(SCRIPT_DIR) + for file in $^; do \ + cp -vrf $${file} $(DESTDIR)$(SCRIPT_DIR)/ || exit; \ + done + + # Create script aliases. + -mkdir -pv $(DESTDIR)/usr/bin + ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire + ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire-builder + ln -svf ../..$(SCRIPT_DIR)/pakfire-multicall.py $(DESTDIR)/usr/bin/pakfire-server + ln -svf pakfire-multicall.py $(DESTDIR)$(SCRIPT_DIR)/builder + + # Install QA. + -mkdir -pv $(DESTDIR)/usr/lib/quality-agent + cp -vf quality-agent.d/* $(DESTDIR)/usr/lib/quality-agent + +.PHONY: clean +clean: + : # Nothing yet to do diff --git a/tools/buildsystem-tools/chroot-shell b/scripts/chroot-shell similarity index 100% rename from tools/buildsystem-tools/chroot-shell rename to scripts/chroot-shell diff --git a/tools/buildsystem-tools/cleanup b/scripts/cleanup similarity index 100% rename from tools/buildsystem-tools/cleanup rename to scripts/cleanup diff --git a/tools/buildsystem-tools/dependency-tracker b/scripts/dependency-tracker similarity index 100% rename from tools/buildsystem-tools/dependency-tracker rename to scripts/dependency-tracker diff --git a/tools/buildsystem-tools/functions-common b/scripts/functions-common similarity index 100% rename from tools/buildsystem-tools/functions-common rename to scripts/functions-common diff --git a/tools/buildsystem-tools/functions-constants b/scripts/functions-constants similarity index 100% rename from tools/buildsystem-tools/functions-constants rename to scripts/functions-constants diff --git a/tools/buildsystem-tools/functions-directories b/scripts/functions-directories similarity index 100% rename from tools/buildsystem-tools/functions-directories rename to scripts/functions-directories diff --git a/tools/buildsystem-tools/functions-files b/scripts/functions-files similarity index 100% rename from tools/buildsystem-tools/functions-files rename to scripts/functions-files diff --git a/tools/buildsystem-tools/functions-lists b/scripts/functions-lists similarity index 100% rename from tools/buildsystem-tools/functions-lists rename to scripts/functions-lists diff --git a/tools/buildsystem-tools/functions-logging b/scripts/functions-logging similarity index 100% rename from tools/buildsystem-tools/functions-logging rename to scripts/functions-logging diff --git a/tools/buildsystem-tools/functions-packager-find b/scripts/functions-packager-find similarity index 100% rename from tools/buildsystem-tools/functions-packager-find rename to scripts/functions-packager-find diff --git a/scripts/pakfire b/scripts/pakfire-multicall.py similarity index 100% rename from scripts/pakfire rename to scripts/pakfire-multicall.py diff --git a/tools/buildsystem-tools/perl.prov b/scripts/perl.prov similarity index 100% rename from tools/buildsystem-tools/perl.prov rename to scripts/perl.prov diff --git a/tools/buildsystem-tools/perl.req b/scripts/perl.req similarity index 100% rename from tools/buildsystem-tools/perl.req rename to scripts/perl.req diff --git a/tools/buildsystem-tools/pkg-config.prov b/scripts/pkg-config.prov similarity index 100% rename from tools/buildsystem-tools/pkg-config.prov rename to scripts/pkg-config.prov diff --git a/tools/buildsystem-tools/pkg-config.req b/scripts/pkg-config.req similarity index 100% rename from tools/buildsystem-tools/pkg-config.req rename to scripts/pkg-config.req diff --git a/tools/buildsystem-tools/py-compile b/scripts/py-compile similarity index 100% rename from tools/buildsystem-tools/py-compile rename to scripts/py-compile diff --git a/tools/quality-agent/quality-agent b/scripts/quality-agent similarity index 100% rename from tools/quality-agent/quality-agent rename to scripts/quality-agent diff --git a/tools/quality-agent/quality-agent.d/001-include-files b/scripts/quality-agent.d/001-include-files similarity index 100% rename from tools/quality-agent/quality-agent.d/001-include-files rename to scripts/quality-agent.d/001-include-files diff --git a/tools/quality-agent/quality-agent.d/001-remove-info-files b/scripts/quality-agent.d/001-remove-info-files similarity index 100% rename from tools/quality-agent/quality-agent.d/001-remove-info-files rename to scripts/quality-agent.d/001-remove-info-files diff --git a/tools/quality-agent/quality-agent.d/001-remove-static-libs b/scripts/quality-agent.d/001-remove-static-libs similarity index 100% rename from tools/quality-agent/quality-agent.d/001-remove-static-libs rename to scripts/quality-agent.d/001-remove-static-libs diff --git a/tools/quality-agent/quality-agent.d/001-unsafe-files b/scripts/quality-agent.d/001-unsafe-files similarity index 100% rename from tools/quality-agent/quality-agent.d/001-unsafe-files rename to scripts/quality-agent.d/001-unsafe-files diff --git a/tools/quality-agent/quality-agent.d/002-bad-symlinks b/scripts/quality-agent.d/002-bad-symlinks similarity index 100% rename from tools/quality-agent/quality-agent.d/002-bad-symlinks rename to scripts/quality-agent.d/002-bad-symlinks diff --git a/tools/quality-agent/quality-agent.d/003-libs-location b/scripts/quality-agent.d/003-libs-location similarity index 100% rename from tools/quality-agent/quality-agent.d/003-libs-location rename to scripts/quality-agent.d/003-libs-location diff --git a/tools/quality-agent/quality-agent.d/050-canary b/scripts/quality-agent.d/050-canary similarity index 100% rename from tools/quality-agent/quality-agent.d/050-canary rename to scripts/quality-agent.d/050-canary diff --git a/tools/quality-agent/quality-agent.d/050-execstacks b/scripts/quality-agent.d/050-execstacks similarity index 100% rename from tools/quality-agent/quality-agent.d/050-execstacks rename to scripts/quality-agent.d/050-execstacks diff --git a/tools/quality-agent/quality-agent.d/050-invalid-interpreters b/scripts/quality-agent.d/050-invalid-interpreters similarity index 100% rename from tools/quality-agent/quality-agent.d/050-invalid-interpreters rename to scripts/quality-agent.d/050-invalid-interpreters diff --git a/tools/quality-agent/quality-agent.d/050-libs-needed b/scripts/quality-agent.d/050-libs-needed similarity index 100% rename from tools/quality-agent/quality-agent.d/050-libs-needed rename to scripts/quality-agent.d/050-libs-needed diff --git a/tools/quality-agent/quality-agent.d/050-libs-soname b/scripts/quality-agent.d/050-libs-soname similarity index 100% rename from tools/quality-agent/quality-agent.d/050-libs-soname rename to scripts/quality-agent.d/050-libs-soname diff --git a/tools/quality-agent/quality-agent.d/050-nx b/scripts/quality-agent.d/050-nx similarity index 100% rename from tools/quality-agent/quality-agent.d/050-nx rename to scripts/quality-agent.d/050-nx diff --git a/tools/quality-agent/quality-agent.d/050-relro b/scripts/quality-agent.d/050-relro similarity index 100% rename from tools/quality-agent/quality-agent.d/050-relro rename to scripts/quality-agent.d/050-relro diff --git a/tools/quality-agent/quality-agent.d/050-root-links-to-usr b/scripts/quality-agent.d/050-root-links-to-usr similarity index 100% rename from tools/quality-agent/quality-agent.d/050-root-links-to-usr rename to scripts/quality-agent.d/050-root-links-to-usr diff --git a/tools/quality-agent/quality-agent.d/050-rpaths b/scripts/quality-agent.d/050-rpaths similarity index 100% rename from tools/quality-agent/quality-agent.d/050-rpaths rename to scripts/quality-agent.d/050-rpaths diff --git a/tools/quality-agent/quality-agent.d/090-man-pages b/scripts/quality-agent.d/090-man-pages similarity index 100% rename from tools/quality-agent/quality-agent.d/090-man-pages rename to scripts/quality-agent.d/090-man-pages diff --git a/tools/quality-agent/quality-agent.d/090-python-hardlinks b/scripts/quality-agent.d/090-python-hardlinks similarity index 100% rename from tools/quality-agent/quality-agent.d/090-python-hardlinks rename to scripts/quality-agent.d/090-python-hardlinks diff --git a/tools/quality-agent/quality-agent.d/090-remove-empty-dirs b/scripts/quality-agent.d/090-remove-empty-dirs similarity index 100% rename from tools/quality-agent/quality-agent.d/090-remove-empty-dirs rename to scripts/quality-agent.d/090-remove-empty-dirs diff --git a/tools/quality-agent/quality-agent.d/095-directory-layout b/scripts/quality-agent.d/095-directory-layout similarity index 100% rename from tools/quality-agent/quality-agent.d/095-directory-layout rename to scripts/quality-agent.d/095-directory-layout diff --git a/tools/quality-agent/quality-agent.d/qa-include b/scripts/quality-agent.d/qa-include similarity index 96% rename from tools/quality-agent/quality-agent.d/qa-include rename to scripts/quality-agent.d/qa-include index 284673388..bdcf99e45 100644 --- a/tools/quality-agent/quality-agent.d/qa-include +++ b/scripts/quality-agent.d/qa-include @@ -1,7 +1,7 @@ #!/bin/bash # Include additional functions -. /usr/lib/buildsystem-tools/common-functions +. /usr/lib/pakfire/functions-common function debug() { [ "${NAOKI_DEBUG}" = "1" ] || [ "${DEBUG}" = "1" ] diff --git a/setup.py b/setup.py deleted file mode 100644 index a62407b7c..000000000 --- a/setup.py +++ /dev/null @@ -1,47 +0,0 @@ - -import os - -from distutils.core import Extension, setup - -from DistUtilsExtra.command import * - -PAKFIRE_VERSION = "0.9.9" - -_pakfire_module_files = [os.path.join("src", f) for f in os.listdir("src") if f.endswith(".c")] - -# Update program version. -f = open("pakfire/__version__.py", "w") -f.write("# this file is autogenerated by setup.py\n") -f.write("PAKFIRE_VERSION = \"%s\"\n" % PAKFIRE_VERSION) -f.close() - -setup( - name = "pakfire", - version = PAKFIRE_VERSION, - description = "Pakfire - Package manager for IPFire.", - author = "IPFire.org Team", - author_email = "info@ipfire.org", - url = "http://redmine.ipfire.org/projects/buildsystem3", - packages = [ - "pakfire", - "pakfire.packages", - "pakfire.repository", - ], - scripts = [ - "scripts/pakfire", - ], - data_files = [ - ("lib/pakfire/macros", [os.path.join("macros", f) for f in os.listdir("macros") if f.endswith(".macro")]), - ("lib/pakfire", ["tools/quality-agent/quality-agent",]), - ("lib/quality-agent", [os.path.join("tools/quality-agent/quality-agent.d", f) \ - for f in os.listdir("tools/quality-agent/quality-agent.d")]), - ("lib/buildsystem-tools", [os.path.join("tools/buildsystem-tools", f) \ - for f in os.listdir("tools/buildsystem-tools")]), - ], - ext_modules = [ - Extension("pakfire._pakfire", _pakfire_module_files, - extra_link_args = ["-lsolv", "-lsolvext"]) - ], - cmdclass = { "build" : build_extra.build_extra, - "build_i18n" : build_i18n.build_i18n }, -) diff --git a/tools/buildsystem-tools/common-functions b/tools/buildsystem-tools/common-functions deleted file mode 100644 index 4c44a58aa..000000000 --- a/tools/buildsystem-tools/common-functions +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# Simply import all files from this directory that -# begin with functions-*. - -BASEDIR=$(dirname ${BASH_SOURCE[0]}) - -for file in ${BASEDIR}/functions-*; do - # Avoid infinite loop when importing this file again - [ "$(basename ${file})" = "functions-common" ] && continue - - . ${file} -done - diff --git a/tools/buildsystem-tools/stripper b/tools/buildsystem-tools/stripper deleted file mode 100755 index b35d72e13..000000000 --- a/tools/buildsystem-tools/stripper +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# Based on RedHat's brp-strip*. - -BUILDROOT=${1} - -for f in `find ${BUILDROOT} -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ - grep -v "^${BUILDROOT}/\?usr/lib/debug" | \ - grep -v ' shared object,' | \ - sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do - - # Strip ELF binaries - strip -g "$f" || : - - note="-R .note" - if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ - grep ALLOC >/dev/null; then - note= - fi - strip -R .comment $note "$f" || : -done - -# Strip ELF shared objects -# Please note we don't restrict our search to executable files because -# our libraries are not (should not be, at least) +x. -for f in `find ${BUILDROOT} -type f -a -exec file {} \; | \ - grep -v "^${BUILDROOT}/\?usr/lib/debug" | \ - grep ' shared object,' | \ - sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do - strip --strip-unneeded "$f" -done -- 2.39.5