Commit 94f13d46 authored by Jochen Sprickerhof's avatar Jochen Sprickerhof

Update upstream source from tag 'upstream/0.9.0'

Update to upstream version '0.9.0'
with Debian dir 5b2e363c60cfe09c105ce9c0f7e3998fa7029450
parents 6023ed7e 8761db36
0.9.0 (2019-10-18 14:15:00 -0800)
---------------------------------
- Fixed possibly unescaped logger formatting in version. `#553 <https://github.com/ros-infrastructure/bloom/pull/553>`_
- Added ament package support to RPM generation. `#534 <https://github.com/ros-infrastructure/bloom/pull/534>`_
- Added ROS_PYTHON_VERSION to dependency condtionals. `#551 <https://github.com/ros-infrastructure/bloom/pull/551>`_
With this change rosdistro v4 indexes must define the ``python_version`` field introduced in `ros-infrastructure/rep#207 <https://github.com/ros-infrastructure/rep/pull/207`_.
- Fixed deprecation warnings by using yaml.safe_load. `#530 <https://github.com/ros-infrastructure/bloom/pull/530>`_
- Changed release suites, dropping all older than Ubuntu Xenial and adding Ubuntu Cosmic, Disco, and Eoan. `#543 <https://github.com/ros-infrastructure/bloom/pull/543>`_
- Improved error handling for package conditions and index files. `#537 <https://github.com/ros-infrastructure/bloom/pull/537>`_
- Added feature to disable pull request generation via argument or ``BLOOM_NO_ROSDISTRO_PULL_REQUEST`` environment variable. `#548 <https://github.com/ros-infrastructure/bloom/pull/548>`_
- Updated RPM generator to always create a source archive. `#540 <https://github.com/ros-infrastructure/bloom/pull/540>`_
- Updated RPM spec templates. `#533 <https://github.com/ros-infrastructure/bloom/pull/533>`_
0.8.0 (2019-04-12 13:45:00 -0800)
---------------------------------
- Start release increment at 1. `#528 <https://github.com/ros-infrastructure/bloom/pull/528>`_
......
......@@ -85,7 +85,7 @@ def version_check(version):
return
last_tag_version = last_tag.split('/')[-1]
info(fmt("The latest upstream tag in the release repository is '@!{0}@|'."
.format(last_tag)))
.format(last_tag.replace('@', '@@'))))
# Ensure the new version is greater than the last tag
if parse_version(version) < parse_version(last_tag_version):
warning("""\
......
......@@ -547,7 +547,7 @@ def generate_ros_distro_diff(track, repository, distro, override_release_reposit
info(line, use_prefix=False, end='')
# Assert that only this repository is being changed
distro_file_yaml = yaml.safe_load(distro_file_raw)
distro_yaml = yaml.load(distro_dump)
distro_yaml = yaml.safe_load(distro_dump)
if 'repositories' in distro_file_yaml:
distro_file_repos = distro_file_yaml['repositories']
for repo in distro_yaml['repositories']:
......@@ -1110,26 +1110,27 @@ def perform_release(
repository, track, distro, new_track, interactive, pretend, tracks_dict,
override_release_repository_url, override_release_repository_push_url
)
# Propose github pull request
info(fmt("@{gf}@!==> @|") +
"Generating pull request to distro file located at '{0}'"
.format(get_distribution_file_url(distro)))
try:
pull_request_url = open_pull_request(
track, repository, distro, interactive, override_release_repository_url
)
if pull_request_url:
info(fmt(_success) + "Pull request opened at: {0}".format(pull_request_url))
if 'BLOOM_NO_WEBBROWSER' not in os.environ and platform.system() in ['Darwin']:
webbrowser.open(pull_request_url)
else:
info("The release of your packages was successful, but the pull request failed.")
info("Please manually open a pull request by editing the file here: '{0}'"
.format(get_distribution_file_url(distro)))
info(fmt(_error) + "No pull request opened.")
except Exception as e:
debug(traceback.format_exc())
error("Failed to open pull request: {0} - {1}".format(type(e).__name__, e), exit=True)
if 'BLOOM_NO_ROSDISTRO_PULL_REQUEST' not in os.environ:
# Propose github pull request
info(fmt("@{gf}@!==> @|") +
"Generating pull request to distro file located at '{0}'"
.format(get_distribution_file_url(distro)))
try:
pull_request_url = open_pull_request(
track, repository, distro, interactive, override_release_repository_url
)
if pull_request_url:
info(fmt(_success) + "Pull request opened at: {0}".format(pull_request_url))
if 'BLOOM_NO_WEBBROWSER' not in os.environ and platform.system() in ['Darwin']:
webbrowser.open(pull_request_url)
else:
info("The release of your packages was successful, but the pull request failed.")
info("Please manually open a pull request by editing the file here: '{0}'"
.format(get_distribution_file_url(distro)))
info(fmt(_error) + "No pull request opened.")
except Exception as e:
debug(traceback.format_exc())
error("Failed to open pull request: {0} - {1}".format(type(e).__name__, e), exit=True)
def get_argument_parser():
......@@ -1146,6 +1147,8 @@ def get_argument_parser():
help="if used, a new track will be created before running bloom")
add('--pretend', '-s', default=False, action='store_true',
help="Pretends to push and release")
add('--no-pull-request', default=False, action='store_true',
help="Prevents a pull request from being opened after release")
add('--no-web', default=False, action='store_true',
help="prevents a web browser from being opened at the end")
add('--pull-request-only', '-p', default=False, action='store_true',
......@@ -1173,6 +1176,9 @@ def main(sysargs=None):
list_tracks(args.repository, args.ros_distro, args.override_release_repository_url)
return
if args.no_pull_request:
os.environ['BLOOM_NO_ROSDISTRO_PULL_REQUEST'] = '1'
if args.no_web:
os.environ['BLOOM_NO_WEBBROWSER'] = '1'
......
......@@ -41,6 +41,8 @@ from bloom.logging import error
from bloom.logging import info
from bloom.rosdistro_api import get_distribution_type
from bloom.rosdistro_api import get_index
from bloom.rosdistro_api import get_python_version
from bloom.util import code
from bloom.util import maybe_continue
......@@ -120,6 +122,16 @@ def resolve_more_for_os(rosdep_key, view, installer, os_name, os_version):
def package_conditional_context(ros_distro):
"""
Creates a dict containing the conditional evaluation context for
package.xml format three packages.
:param ros_distro: The codename of the rosdistro to generate context for.
:returns: dict defining ROS_VERSION and ROS_DISTRO.
"""
if get_index().version < 4:
error("Bloom requires a version 4 or greater rosdistro index to support package format 3.", exit=True)
distribution_type = get_distribution_type(ros_distro)
if distribution_type == 'ros1':
ros_version = '1'
......@@ -128,12 +140,42 @@ def package_conditional_context(ros_distro):
else:
error("Bloom cannot cope with distribution_type '{0}'".format(
distribution_type), exit=True)
python_version = get_python_version(ros_distro)
if python_version is None:
error(
'No python_version found in the rosdistro index. '
'The rosdistro index must include this key for bloom to work correctly.',
exit=True)
elif python_version == 2:
ros_python_version = '2'
elif python_version == 3:
ros_python_version = '3'
else:
error("Bloom cannot cope with python_version '{0}'".format(
python_version), exit=True)
return {
'ROS_VERSION': ros_version,
'ROS_DISTRO': ros_distro,
'ROS_PYTHON_VERSION': ros_python_version,
}
def evaluate_package_conditions(package, ros_distro):
"""
Evaluates a package's conditional fields if it supports them.
:param package: The package to be evaluated.
:param ros_distro: The codename of the rosdistro use for context.
:returns: None. The given package will be modified.
"""
# Conditional fields were introduced in package format 3.
# Earlier formats should have their conditions evaluated with no context so
# the evaluated_condition is set to True in all cases.
if package.package_format >= 3:
package.evaluate_conditions(package_conditional_context(ros_distro))
def resolve_rosdep_key(
key,
os_name,
......
......@@ -58,7 +58,7 @@ from bloom.generators import update_rosdep
from bloom.generators.common import default_fallback_resolver
from bloom.generators.common import invalidate_view_cache
from bloom.generators.common import package_conditional_context
from bloom.generators.common import evaluate_package_conditions
from bloom.generators.common import resolve_rosdep_key
from bloom.git import inbranch
......@@ -313,17 +313,17 @@ def generate_substitutions_from_package(
# Installation prefix
data['InstallationPrefix'] = installation_prefix
# Resolve dependencies
package.evaluate_conditions(package_conditional_context(ros_distro))
evaluate_package_conditions(package, ros_distro)
depends = [
dep for dep in (package.run_depends + package.buildtool_export_depends)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
build_depends = [
dep for dep in (package.build_depends + package.buildtool_depends + package.test_depends)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
unresolved_keys = [
dep for dep in (depends + build_depends + package.replaces + package.conflicts)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
# The installer key is not considered here, but it is checked when the keys are checked before this
resolved_deps = resolve_dependencies(unresolved_keys, os_name,
os_version, ros_distro,
......@@ -660,19 +660,19 @@ class DebianGenerator(BloomGenerator):
key_to_packages_which_depends_on = collections.defaultdict(list)
keys_to_ignore = set()
for package in self.packages.values():
package.evaluate_conditions(package_conditional_context(ros_distro))
evaluate_package_conditions(package, ros_distro)
depends = [
dep for dep in (package.run_depends + package.buildtool_export_depends)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
build_depends = [
dep for dep in (package.build_depends + package.buildtool_depends + package.test_depends)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
unresolved_keys = [
dep for dep in (depends + build_depends + package.replaces + package.conflicts)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
keys_to_ignore = {
dep for dep in keys_to_ignore.union(package.replaces + package.conflicts)
if dep.evaluated_condition}
if dep.evaluated_condition is not False}
keys = [d.name for d in unresolved_keys]
keys_to_resolve.extend(keys)
for key in keys:
......
Source: @(Package)
Section: misc
Priority: extra
Priority: optional
Maintainer: @(Maintainer)
Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends))
Homepage: @(Homepage)
......
Source: @(Package)
Section: misc
Priority: extra
Priority: optional
Maintainer: @(Maintainer)
Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends)), python3-all, python3-setuptools
Homepage: @(Homepage)
......
Source: @(Package)
Section: misc
Priority: extra
Priority: optional
Maintainer: @(Maintainer)
Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends))
Homepage: @(Homepage)
......
Source: @(Package)
Section: misc
Priority: extra
Priority: optional
Maintainer: @(Maintainer)
Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(BuildDepends))
Homepage: @(Homepage)
......
......@@ -44,6 +44,8 @@ from bloom.generators.rpm.generate_cmd import prepare_arguments
from bloom.logging import info
from bloom.rosdistro_api import get_index
from bloom.util import get_distro_list_prompt
......@@ -86,6 +88,37 @@ class RosRpmGenerator(RpmGenerator):
fallback_resolver=fallback_resolver
)
subs['Package'] = rosify_package_name(subs['Package'], self.rosdistro)
# ROS 2 specific bloom extensions.
ros2_distros = [
name for name, values in get_index().distributions.items()
if values.get('distribution_type') == 'ros2']
if self.rosdistro in ros2_distros:
# Add ros-workspace package as a dependency to any package other
# than ros_workspace and its dependencies.
if package.name not in ['ament_cmake_core', 'ament_package', 'ros_workspace']:
workspace_pkg_name = rosify_package_name('ros-workspace', self.rosdistro)
subs['BuildDepends'].append(workspace_pkg_name)
subs['Depends'].append(workspace_pkg_name)
# Add packages necessary to build vendor typesupport for rosidl_interface_packages to their
# build dependencies.
if self.rosdistro in ros2_distros and \
self.rosdistro not in ('r2b2', 'r2b3', 'ardent') and \
'rosidl_interface_packages' in [p.name for p in package.member_of_groups]:
ROS2_VENDOR_TYPESUPPORT_DEPENDENCIES = [
'rmw-connext-cpp',
'rmw-fastrtps-cpp',
'rmw-implementation',
'rmw-opensplice-cpp',
'rosidl-typesupport-connext-c',
'rosidl-typesupport-connext-cpp',
'rosidl-typesupport-opensplice-c',
'rosidl-typesupport-opensplice-cpp',
]
subs['BuildDepends'] += [
rosify_package_name(name, self.rosdistro) for name in ROS2_VENDOR_TYPESUPPORT_DEPENDENCIES]
return subs
def generate_branching_arguments(self, package, branch):
......
......@@ -60,7 +60,7 @@ from bloom.generators import update_rosdep
from bloom.generators.common import default_fallback_resolver
from bloom.generators.common import invalidate_view_cache
from bloom.generators.common import package_conditional_context
from bloom.generators.common import evaluate_package_conditions
from bloom.generators.common import resolve_rosdep_key
from bloom.git import inbranch
......@@ -232,16 +232,16 @@ def generate_substitutions_from_package(
# Installation prefix
data['InstallationPrefix'] = installation_prefix
# Resolve dependencies
package.evaluate_conditions(package_conditional_context(ros_distro))
evaluate_package_conditions(package, ros_distro)
depends = [
dep for dep in (package.run_depends + package.buildtool_export_depends)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
build_depends = [
dep for dep in (package.build_depends + package.buildtool_depends + package.test_depends)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
unresolved_keys = [
dep for dep in (depends + build_depends + package.replaces + package.conflicts)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
# The installer key is not considered here, but it is checked when the keys are checked before this
resolved_deps = resolve_dependencies(unresolved_keys, os_name,
os_version, ros_distro,
......@@ -267,25 +267,9 @@ def generate_substitutions_from_package(
elif build_type == 'cmake':
pass
elif build_type == 'ament_cmake':
error(
"Build type '{}' is not supported by this version of bloom.".
format(build_type), exit=True)
pass
elif build_type == 'ament_python':
error(
"Build type '{}' is not supported by this version of bloom.".
format(build_type), exit=True)
# Don't set the install-scripts flag if it's already set in setup.cfg.
package_path = os.path.abspath(os.path.dirname(package.filename))
setup_cfg_path = os.path.join(package_path, 'setup.cfg')
data['pass_install_scripts'] = True
if os.path.isfile(setup_cfg_path):
setup_cfg = SafeConfigParser()
setup_cfg.read([setup_cfg_path])
if (
setup_cfg.has_option('install', 'install-scripts') or
setup_cfg.has_option('install', 'install_scripts')
):
data['pass_install_scripts'] = False
pass
else:
error(
"Build type '{}' is not supported by this version of bloom.".
......@@ -539,19 +523,19 @@ class RpmGenerator(BloomGenerator):
key_to_packages_which_depends_on = collections.defaultdict(list)
keys_to_ignore = set()
for package in self.packages.values():
package.evaluate_conditions(package_conditional_context(rosdistro))
evaluate_package_conditions(package, rosdistro)
depends = [
dep for dep in (package.run_depends + package.buildtool_export_depends)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
build_depends = [
dep for dep in (package.build_depends + package.buildtool_depends + package.test_depends)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
unresolved_keys = [
dep for dep in (depends + build_depends + package.replaces + package.conflicts)
if dep.evaluated_condition]
if dep.evaluated_condition is not False]
keys_to_ignore = {
dep for dep in keys_to_ignore.union(package.replaces + package.conflicts)
if dep.evaluated_condition}
if dep.evaluated_condition is not False}
keys = [d.name for d in unresolved_keys]
keys_to_resolve.extend(keys)
for key in keys:
......@@ -781,8 +765,10 @@ class RpmGenerator(BloomGenerator):
template_files = process_template_files('.', subs)
# Remove any residual template files
execute_command('git rm -rf ' + ' '.join("'{}'".format(t) for t in template_files))
# Add changes to the rpm folder
execute_command('git add ' + rpm_dir)
# Add marker file to tell mock to archive the sources
open('.write_tar', 'a').close()
# Add marker file changes to the rpm folder
execute_command('git add .write_tar ' + rpm_dir)
# Commit changes
execute_command('git commit -m "Generated RPM files for ' +
rpm_distro + '"')
......
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%global __provides_exclude_from ^@(InstallationPrefix)/.*$
%global __requires_exclude_from ^@(InstallationPrefix)/.*$
Name: @(Package)
Version: @(Version)
Release: @(RPMInc)%{?dist}
Summary: ROS @(Name) package
License: @(License)
@[if Homepage and Homepage != '']URL: @(Homepage)@\n@[end if]Source0: %{name}-%{version}.tar.gz
@[if NoArch]@\nBuildArch: noarch@\n@[end if]
@[for p in Depends]Requires: @p@\n@[end for]@[for p in BuildDepends]BuildRequires: @p@\n@[end for]@[for p in Conflicts]Conflicts: @p@\n@[end for]@[for p in Replaces]Obsoletes: @p@\n@[end for]
%description
@(Description)
%prep
%autosetup
%build
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
mkdir -p obj-%{_target_platform} && cd obj-%{_target_platform}
%cmake3 \
-UINCLUDE_INSTALL_DIR \
-ULIB_INSTALL_DIR \
-USYSCONF_INSTALL_DIR \
-USHARE_INSTALL_PREFIX \
-ULIB_SUFFIX \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
-DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
..
%make_build
%install
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
%make_install -C obj-%{_target_platform}
%files
@(InstallationPrefix)
%changelog@[for change_version, (change_date, main_name, main_email) in changelogs]@\n* @(change_date) @(main_name) <@(main_email)> - @(change_version)@\n- Autogenerated by Bloom@\n@[end for]
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%global __provides_exclude_from ^@(InstallationPrefix)/.*$
%global __requires_exclude_from ^@(InstallationPrefix)/.*$
Name: @(Package)
Version: @(Version)
Release: @(RPMInc)%{?dist}
Summary: ROS @(Name) package
License: @(License)
@[if Homepage and Homepage != '']URL: @(Homepage)@\n@[end if]Source0: %{name}-%{version}.tar.gz
@[if NoArch]@\nBuildArch: noarch@\n@[end if]
@[for p in Depends]Requires: @p@\n@[end for]@[for p in sorted(BuildDepends + ['python%{python3_pkgversion}-devel'])]BuildRequires: @p@\n@[end for]@[for p in Conflicts]Conflicts: @p@\n@[end for]@[for p in Replaces]Obsoletes: @p@\n@[end for]
%description
@(Description)
%prep
%autosetup
%build
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
%py3_build
%install
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
%py3_install -- --prefix "@(InstallationPrefix)"
%files
@(InstallationPrefix)
%changelog@[for change_version, (change_date, main_name, main_email) in changelogs]@\n* @(change_date) @(main_name) <@(main_email)> - @(change_version)@\n- Autogenerated by Bloom@\n@[end for]
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%global __provides_exclude_from ^@(InstallationPrefix)/.*$
%global __requires_exclude_from ^@(InstallationPrefix)/.*$
Name: @(Package)
Version: @(Version)
Release: @(RPMInc)%{?dist}
Summary: ROS @(Name) package
Group: Development/Libraries
License: @(License)
@[if Homepage and Homepage != '']URL: @(Homepage)@\n@[end if]Source0: %{name}-%{version}.tar.gz
@[if NoArch]@\nBuildArch: noarch@\n@[end if]
......@@ -12,7 +15,7 @@ License: @(License)
@(Description)
%prep
%setup -q
%autosetup
%build
# In case we're installing to a non-standard location, look for a setup.sh
......@@ -20,27 +23,27 @@ License: @(License)
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
mkdir -p obj-%{_target_platform} && cd obj-%{_target_platform}
%cmake .. \
-UINCLUDE_INSTALL_DIR \
-ULIB_INSTALL_DIR \
-USYSCONF_INSTALL_DIR \
-USHARE_INSTALL_PREFIX \
-ULIB_SUFFIX \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
-DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_BUILD_BINARY_PACKAGE="1" \
make %{?_smp_mflags}
%cmake3 \
-UINCLUDE_INSTALL_DIR \
-ULIB_INSTALL_DIR \
-USYSCONF_INSTALL_DIR \
-USHARE_INSTALL_PREFIX \
-ULIB_SUFFIX \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
-DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_BUILD_BINARY_PACKAGE="1" \
..
%make_build
%install
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
cd obj-%{_target_platform}
make %{?_smp_mflags} install DESTDIR=%{buildroot}
%make_install -C obj-%{_target_platform}
%files
@(InstallationPrefix)
......
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%global __provides_exclude_from ^@(InstallationPrefix)/.*$
%global __requires_exclude_from ^@(InstallationPrefix)/.*$
Name: @(Package)
Version: @(Version)
Release: @(RPMInc)%{?dist}
Summary: ROS @(Name) package
Group: Development/Libraries
License: @(License)
@[if Homepage and Homepage != '']URL: @(Homepage)@\n@[end if]Source0: %{name}-%{version}.tar.gz
@[if NoArch]@\nBuildArch: noarch@\n@[end if]
......@@ -12,7 +15,7 @@ License: @(License)
@(Description)
%prep
%setup -q
%autosetup
%build
# In case we're installing to a non-standard location, look for a setup.sh
......@@ -20,27 +23,27 @@ License: @(License)
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
mkdir -p obj-%{_target_platform} && cd obj-%{_target_platform}
%cmake .. \
-UINCLUDE_INSTALL_DIR \
-ULIB_INSTALL_DIR \
-USYSCONF_INSTALL_DIR \
-USHARE_INSTALL_PREFIX \
-ULIB_SUFFIX \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
-DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_BUILD_BINARY_PACKAGE="1" \
make %{?_smp_mflags}
%cmake3 \
-UINCLUDE_INSTALL_DIR \
-ULIB_INSTALL_DIR \
-USYSCONF_INSTALL_DIR \
-USHARE_INSTALL_PREFIX \
-ULIB_SUFFIX \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
-DCMAKE_PREFIX_PATH="@(InstallationPrefix)" \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DCATKIN_BUILD_BINARY_PACKAGE="1" \
..
%make_build
%install
# In case we're installing to a non-standard location, look for a setup.sh
# in the install tree that was dropped by catkin, and source it. It will
# set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi
cd obj-%{_target_platform}
make %{?_smp_mflags} install DESTDIR=%{buildroot}
%make_install -C obj-%{_target_platform}
%files
@(InstallationPrefix)
......
......@@ -137,6 +137,10 @@ def get_distribution_type(distro):
return get_index().distributions[distro].get('distribution_type')
def get_python_version(distro):
return get_index().distributions[distro].get('python_version')
def get_most_recent(thing_name, repository, reference_distro):
reference_distro_type = get_distribution_type(reference_distro)
distros_with_entry = {}
......
......@@ -10,7 +10,7 @@ install_requires = [
'python-dateutil',
'PyYAML',
'rosdep >= 0.15.0',
'rosdistro >= 0.7.0',
'rosdistro >= 0.7.5',
'vcstools >= 0.1.22',
]
......@@ -22,7 +22,7 @@ if sys.version_info[0] == 2 and sys.version_info[1] <= 6:
setup(
name='bloom',
version='0.8.0',
version='0.9.0',
packages=find_packages(exclude=['test', 'test.*']),
package_data={
'bloom.generators.debian': [
......
[DEFAULT]
Depends: python-yaml, python-empy, python-argparse, python-rosdep (>= 0.15.0), python-rosdistro (>= 0.7.0), python-vcstools (>= 0.1.22), python-setuptools, python-catkin-pkg (>= 0.4.3)
Depends3: python3-yaml, python3-empy, python3-rosdep (>= 0.15.0), python3-rosdistro (>= 0.7.0), python3-vcstools (>= 0.1.22), python3-setuptools, python3-catkin-pkg (>= 0.4.3)
Depends: python-yaml, python-empy, python-argparse, python-rosdep (>= 0.15.0), python-rosdistro (>= 0.7.5), python-vcstools (>= 0.1.22), python-setuptools, python-catkin-pkg (>= 0.4.3)
Depends3: python3-yaml, python3-empy, python3-rosdep (>= 0.15.0), python3-rosdistro (>= 0.7.5), python3-vcstools (>= 0.1.22), python3-setuptools, python3-catkin-pkg (>= 0.4.3)
Conflicts: python3-bloom
Conflicts3: python-bloom
Copyright-File: LICENSE.txt
Suite: trusty utopic vivid wily xenial yakkety zesty artful bionic jessie stretch buster
Suite: xenial yakkety zesty artful bionic cosmic disco eoan jessie stretch buster
X-Python3-Version: >= 3.4
......@@ -49,7 +49,7 @@ def test_create_a_bloom_repository(directory=None):
assert os.path.exists('tracks.yaml'), \
"no tracks.yaml file in the 'bloom' branch"
with open('tracks.yaml', 'r') as f:
tracks_dict = yaml.load(f.read())
tracks_dict = yaml.safe_load(f.read())
assert 'tracks' in tracks_dict, "bad bloom configurations"
assert 'foo' in tracks_dict['tracks'], "bad bloom configurations"
track = tracks_dict['tracks']['foo']
......
......@@ -362,3 +362,29 @@ def test_multi_package_repository(directory=None):
with open('debian/copyright', 'r') as f:
assert pkg + ' license' in f.read(), \
"debian/copyright does not include right license text"
@in_temporary_directory
def test_upstream_tag_special_tag(directory=None):
"""
Release a single package catkin (melodic) repository, first put
an upstream tag into the release repository to test that bloom
can handle it.
"""
directory = directory if directory is not None else os.getcwd()
# Setup
upstream_dir = create_upstream_repository(['foo'], directory)
upstream_url = 'file://' + upstream_dir
release_url = create_release_repo(
upstream_url,
'git',
'melodic_devel',
'melodic')
release_dir = os.path.join(directory, 'foo_release_clone')
release_client = get_vcs_client('git', release_dir)
assert release_client.checkout(release_url)
with change_directory(release_dir):
user('git tag upstream/0.0.0@baz')
import bloom.commands.git.release
_test_unary_package_repository(release_dir, '0.1.0', directory)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment