aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-12-19package_srpm: fix incorrect return values from parse_packageconfigHEADmasterRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-19package_srpm: replace base_do_configure with a stubRoss Burton
base_do_configure() simply does a clean of an existing build tree, so doesn't serve any purpose in spec files. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-19package_srpm: use translator-specific data when fetchingRoss Burton
Don't use the original data when fetching as there may be translator-specific overrides in effect on SRC_URI. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-19package_srpm: handle PACKAGECONFIG parse failures more gracefullyRoss Burton
Instead of emitting an error log and later hitting unbound variables, emit a warning log and set the expected values to empty strings. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-19package_srpm: Add srpm OVERRIDE when translatingRoss Burton
Add "srpm" to OVERRIDES when archiving and translating so that translation-specific modifications can be made to recipes. Based on a series of patches by Patrick Ohly. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-17package_srpm: rename functions to _srcrpmPatrick Ohly
Use _srcrpm in task and function names so that _srpm is free to be used as an override. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-17Rename "translator" task into "srpms"Patrick Ohly
This has two advantages: - it better describes what the task does ("translator - translate into what?!") - it allows using "translator" as override [ Rename changed from srpm to srpms - RB ] Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-16srpm_utils: replace systemd_unitdirRoss Burton
The Tizen RPM macro %{_unitdir} is the *system* unit directory, so this has to be expanded to the parent of that directory. Ugly, but it works. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-16gitignore: addRoss Burton
2014-12-16package_srpm: handle exceptions from parse_packageconfigRoss Burton
parse_packageconfig() causes lots of expansions which are prone to break due to Bitbake's poor handling of Python fragments. For example this string value when expanded causes a parse failure due to the embedded }: ${@some_python("%{foo}")} Instead of producing useless errors (which is due to bb.data.exec_func() silently failing), catch the exception and log it for clarity. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-15file-list-generator.py: additional debug output for matchingPatrick Ohly
Print full path of each file and what it gets added to. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-15file-list-generator.py: also include symlink info for filesPatrick Ohly
For consistency with dir symlinks, also add -> <target> for file symlinks. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-15file-list-generator.py: handle symlinks to dirsPatrick Ohly
os.walk() unexpectedly reports symlinks to directories as directories. We need to treat them like directory content, ie. like regular files. When listing the content of the install directory, show what the directory symlink points to. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-15fix multilib suppressionPatrick Ohly
Replacing oe_multilib_header with an empty function leads to a shell syntax error. A function must have at least one command, so replace with : instead. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-13package_srpm: move clean_data() to a Python moduleRoss Burton
The reference to ${EXTRA_OECONF} in the replacement autotools_do_configure can't be expanded until we want it to, but that's tricky/ugly if it is in the bbclass. Solve this by starting to move code to a new Python helper module. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-13handle PACKAGECONFIGRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-12package_srpm: refactor print_deps()Ross Burton
Refactor print_deps() so that its just a wrapper around prepare_deps(). Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05autoconf: check for files before autoreconf and configurePatrick Ohly
The autotools_do_configure also checks and thus works for recipes which do not have all the files that autoreconf and/or configure expect. Do likewise in .spec files. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05do not remove dependencies too aggressivelyPatrick Ohly
The assumption that certain tools are always installed is not true for Tizen. If it is true for other distros, then those distros can remove undesired dependencies by appending to SRPM_REWRITE_DEPENDS. Instead, properly map these tools to the package providing them. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05hook for per-package source and informationPatrick Ohly
One usage of the the hook is injecting a %manifest line into the %package sections of each (sub-)package and the necessary Source entry. Doing this via the general-purpose post-processing hook would have been more work and led to code-duplication, because the code adding the extra information would have had to parse the .spec file again and re-do the package renaming. The approach for the hook is the same as for a similar hook in package_rpm.bbclass: setting SRPM_EXTRA_PKGDATA to 1 enables a call to package_srpm_extra_pkgdata(), which must be a Python method provided by the user of the hook. This is simpler than looking up many different hook methods by name. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05handle epoch in intra-package dependencyPatrick Ohly
When making a sub-package depend on some other package from the same recipe, we need to take the epoch into account. Relevant for recipes like libnl and glib-2.0. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05autotools_do_configure: need to determine ac pathsPatrick Ohly
In some recipes (for example, expat), the -I parameters for aclocal is important. We need to use the same logic as in autotools_do_configure to determine them. In fact, if autotools.bbclass was refactored slightly we could call that code snippet directly. Creating a separate srpm_autotools_do_configure shell function also makes the code a bit easier. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05SRPM_REWRITE_RUNTIME_DEPS: rewrite RDEPENDS, RPROVIDES, etc.Patrick Ohly
Uses regular expressions as in SRPM_RENAME instead of string mapping as in SRPM_REWRITE_DEPENDS. Useful for replacing perl-module and python-module runtime dependencies in Tizen: SRPM_REWRITE_RUNTIME_DEPS_append = " \ perl-module-.*=perl \ python-core=python \ python-textutils=python \ " Uses the same code as SRPM_RENAME, thus the refactoring. The actual replacement happens after turning one versioned dependency into a single string and before concatenating all of them; bb.utils.join_deps() had to be copied to inject the regex replacement. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05fix freetype replacementPatrick Ohly
freetype is actually version 2.x and provides freetype2.pc. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05avoid arch dependenciesPatrick Ohly
Several arch-specific variables get inserted into generated .spec files, for example in boost. We need to use the corresponding spec macros to avoid arch dependencies in the .spec file. Also makes the toolchain replacement simpler, because we don't need to list all the possible compilerlibs and gcc variants. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05gtk-doc-stub-native: also provides introspection.m4Patrick Ohly
For some reason gtk-doc-stub-native also contains introspection.m4, so the replacement must also contain gobject-introspection, because that is the package that normally has that file. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05SRPM_REWRITE_DEPENDS: support replacement with multiple packagesPatrick Ohly
This makes the right hand side a comma-separated list that gets expanded into one dependency per entry. Needed for gtk-doc-stub-native=gtk-doc,gobject-introspection. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05enable autoreconfPatrick Ohly
Some recipes patch autotools input files, in which case we get autotools version mismatches during "make" when it tries to rebuild the output files. We must recreate all files using the current set of autotools. Even if this is not necessary for some recipe, doing it always ensures that it'll work once it becomes necessary for some reason. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05file-list-generator.py: fix packaging of entire directoriesPatrick Ohly
The "is directory" check only worked for directories also present on the build file system because the install directory path was dropped by os.path.join(). Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05file-list-generator.py: INFO listing of installed filesPatrick Ohly
It is useful to know the output of the install phase. Print an indented listing of files and directories at INFO level. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-05file-list-generator.py: --keep unmatched filesPatrick Ohly
It may be useful to not delete files that are not in any package. Not used at the moment, though. The original use case was bundling of locale files with Tizen's %find_lang macro. It turned out that not removing the -locale packages from PACKAGES is easier. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-01package_srpm: hack away oe_multilib_headerRoss Burton
Stub away this function for now, until we need to support multilib translations. RPM-land does ML differently anyway. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-27package_srpm: fix base_do_compile (finally?)Ross Burton
Don't forget to pass EXTRA_OEMAKE to make in base_do_compile. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-27package_srpm: rewrite data cleanupRoss Burton
Instead of cleaning the data in two different ways at two different times which leads to bugs (e.g. PATH no longer contains the native sysroot), have an original data (od) and a cleaned data (d). Also improve variable cleaning, correctly setting S, B, and WORKDIR. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-26package_srpm: if emitting function fails, say what recipe failedRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-24meta-translator.conf: add more build dependency rewrite rulesRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-24patch handling: honor striplevelPatrick Ohly
Not all patches uses striplevel=1. We must remember the parameter and later use it when generating the patch command. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-24license_to_tizen: example license hookPatrick Ohly
This shows the parameters of a license hook and also implements the transformation needed for Tizen. The advantage of defining it here, besides serving as example, is that no separate class is needed for it (a distro conf cannot contain a Python function). Example usage in a distro conf: RPM_LICENSE_HOOK = "license_to_tizen" Optionally also map PD, which is not valid in Tizen at the moment: SPDXLICENSEMAP[PD] = "ISC" Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-24SRPM_LICENSE_HOOK: optionally rewrite license textsPatrick Ohly
The exact format of the License field depends on the target distro. Allow transforming the string from .bb via a custom hook function. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-24MERGEPERFILEDEPS: use same logic as for SRPM_SAME_GROUPPatrick Ohly
Now only "1" enables the feature, everything else disables it. Previously, setting values like "false" enabled the feature. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-24SRPM_SAME_GROUP: optionally override group of additional packagesPatrick Ohly
Tizen requires all packages to be in the same group, the one configured for the PN package. SRPM_SAME_GROUP must be set to 1 to enable this; any other value disables it. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-24SRPM_REWRITE_DEPENDS: fallbacks for -native and -devPatrick Ohly
Some rewrites are done automatically and unconditionally when a package is not listed explicitly in SRPM_REWRITE_DEPENDS: the suffix -native is stripped (because such a dependency is for a tool to be run, not something to be linked against), otherwise the -dev suffix is appended (otherwise, in contrast to bitbake, the development files would not get installed because they are packaged separately). Appending -dev may lead to installing too many files when the real dependency is on the base package, but because that typically gets installed, too, the build will still succeed. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-24postin/postun ldconfigPatrick Ohly
The translator cannot know whether a certain package will contain shared libraries because it does not actually build the packages. This information must be provided by setting the new SRPM_IS_LIB to a space separated list of packages. Example for usage in a distro config: SRPM_IS_LIB_pn-popt = "${PN}" SRPM_IS_LIB_pn-xz = "liblzma" Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-24better dependencies when generating file listsPatrick Ohly
Avoid duplicate "Requires: python" when python already is a dependency by de-duplicating the dependencies. May also help when mapping dependencies (not sure, not seen in practice yet). Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-24fix dependencies for generating file listsPatrick Ohly
When adding "python" as build dependency, also insert space to avoid appending it to the last existing dependency. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-21file lists: avoid empty linesPatrick Ohly
This is merely a cosmetic change which makes the .spec files shorter. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-21rename packagesPatrick Ohly
SRPM_RENAME is a space-separated list of <regex>=<replacement string> pairs. Each replacement is applied to package names with re.sub(). The entire name must match the regex (simplifies setting SRPM_RENAME because there's no need to embed a $, and prevents accidental matching of sub-strings). Example usage in a distro conf: SRPM_RENAME = "(.*)-dev=\1-devel" SRPM_RENAME += "\ readline=libreadline \ gmp=libgmp \ " Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-21fix base_do_compilePatrick Ohly
The usage of %make_build was questionable (redundant smp flags?!) and did not work in Tizen (no such macro?). Instead use the invocation recommended for Tizen .spec files. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-19meta-translator.conf: add conf file to centralise default configurationRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-19optionally generate file lists during rpmbuildPatrick Ohly
When SRPM_DYNAMIC_FILE_LISTS is set, the .bb FILES and CONFIGFILES semantic for packages is replicated in the .src.rpm, i.e. it is not necessary to override FILES to match the installed files exactly. To achieve this, the generated src.rpm contains a file-list-generator.py that is called after the normal install with information about the .bb FILES and CONFFILES values. The script then generates file lists for the %files section, following the .bb semantic.