Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alpine support #616

Merged
merged 8 commits into from
May 6, 2019
Merged

Conversation

at-wat
Copy link
Contributor

@at-wat at-wat commented Jul 13, 2018

This PR adds support for Alpine Linux apk package manager.

It's currently not ready to be merged, since it requires latest (not yet released) rospkg with alpine detection. The change on rospkg has been merged and released.

I have tested rosdep install with forked rosdistro with some alpine package definitions, in docker alpine 3.7. (https://github.com/at-wat/alpine-ros)

at-wat added a commit to at-wat/rosdistro that referenced this pull request Jul 13, 2018
With ros-infrastructure/rospkg#148 and
ros-infrastructure/rosdep#616,
ros_core is ready to be built on Alpine Linux (edge version)
at-wat added a commit to at-wat/rosdistro that referenced this pull request Jul 13, 2018
With ros-infrastructure/rospkg#148 and
ros-infrastructure/rosdep#616,
ros_core can be built from source on Alpine Linux (edge version)
at-wat added a commit to at-wat/rosdistro that referenced this pull request Jul 13, 2018
With ros-infrastructure/rospkg#148 and ros-infrastructure/rosdep#616,
All packages required by ros_core can be installed by rosdep on Alpine Linux (edge version)
at-wat added a commit to at-wat/rosdistro that referenced this pull request Jul 13, 2018
With ros-infrastructure/rospkg#148 and ros-infrastructure/rosdep#616,
all packages required by ros_core can be installed by rosdep on Alpine Linux (edge version)
@at-wat at-wat changed the title Add alpine support Add alpine support [latest rospkg is required] Jul 13, 2018
Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had one quick comment on the copyright.

The other elements look reasonable. I haven't had a chance to test it on a live system.

@@ -0,0 +1,90 @@
#!/usr/bin/env python
# Copyright (c) 2018, rosdep authors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'rosdep authors' is not a valid copyright entity. If you want to assign the copyright please use the foundation, Open Source Robotics Foundation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to:

# Copyright (c) 2018, Open Source Robotics Foundation, Inc.
# Copyright (c) 2018, SEQSENSE, Inc.

Is it OK?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the copyright is to SEQSENSE, Inc don't add OSRF. We haven't setup a formal copyright assignment process. So I'd suggest just use the 2nd line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thanks for your suggestion.

@@ -0,0 +1,91 @@
# Copyright (c) 2018, rosdep authors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@nuclearsandwich
Copy link
Contributor

I have a couple of alpine systems, one physical, one an lxc container, that I can review this on.

@tfoote
Copy link
Member

tfoote commented Jul 13, 2018

@Minipada if you could test this it would be great too. Thanks

@Minipada
Copy link

I just tested your container, everything is working well.
How I tested:

Check one modified key is resolved (your patch here)

/test_ws # rosdep resolve apr
#apk
apr apr-util

Check one can install from rosdep:

/test_ws # cat src/package.xml 
<?xml version="1.0"?>
<package format="2">
  <name>sample_pkg</name>
  <version>0.0.0</version>
  <description>sample package</description>

  <maintainer email="atsushi.w@ieee.org">Atsushi Watanabe</maintainer>
  <license>BSD</license>
  <author email="atsushi.w@ieee.org">Atsushi Watanabe</author>

  <depend>tinyxml</depend>
</package>



/test_ws # apk del tinyxml-dev
(1/4) Purging tinyxml-dev (2.6.2-r1)
(2/4) Purging tinyxml (2.6.2-r1)
(3/4) Purging libstdc++ (6.4.0-r5)
(4/4) Purging libgcc (6.4.0-r5)
OK: 62 MiB in 25 packages

/test_ws # rosdep install -y --from-paths src
executing command [apk add tinyxml-dev]
(1/4) Installing libgcc (6.4.0-r5)
(2/4) Installing libstdc++ (6.4.0-r5)
(3/4) Installing tinyxml (2.6.2-r1)
(4/4) Installing tinyxml-dev (2.6.2-r1)
OK: 63 MiB in 29 packages
#All required rosdeps installed successfully

mikaelarguedas pushed a commit to ros/rosdistro that referenced this pull request Jul 30, 2018
* Add minimal alpine rosdeps for ros_core

With ros-infrastructure/rospkg#148 and ros-infrastructure/rosdep#616,
all packages required by ros_core can be installed by rosdep on Alpine Linux (edge version)

* Use apk gtest and src gmock

* Use libressl instead of openssl

since Alpine Linux recommends to use libressl instead of openssl
(https://bugs.alpinelinux.org/issues/4970)

* Fix to use python2-dev instead of python2
@at-wat at-wat changed the title Add alpine support [latest rospkg is required] Add alpine support Aug 15, 2018
@at-wat
Copy link
Contributor Author

at-wat commented Aug 15, 2018

Latest rospkg with Alpine Linux detection is released.
This PR should now pass CI test.
@tfoote Could you re-trigger Travis build?

@tfoote
Copy link
Member

tfoote commented Aug 17, 2018

@at-wat It looks to be failing on OSX due to a test config error something must have moved in the osx packaging.

 nosetests --with-coverage --cover-package=rosdep2 --with-xunit test
/Users/travis/.travis/job_stages: line 78: nosetests: command not found

I know it's not your issue, but if you could look into it it would help us land this patch.

@at-wat
Copy link
Contributor Author

at-wat commented Nov 14, 2018

@tfoote test config problem seems fixed by #629. Now, this should pass all tests.

@nuclearsandwich
Copy link
Contributor

@at-wat in order for your PR to benefit from the changes in #629 it needs to be updated to include those features. I've opened a PR on your PR at-wat#1 to merge in the latest commits from master. Merging that if it is to your liking should re-trigger CI.

@at-wat
Copy link
Contributor Author

at-wat commented Nov 14, 2018

Oh, I've forgotten to merge master into this. Thank you @nuclearsandwich

@@ -0,0 +1,90 @@
#!/usr/bin/env python
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shebang is not needed here (#630)

@codecov-io
Copy link

codecov-io commented Nov 15, 2018

Codecov Report

Merging #616 into master will increase coverage by 0.3%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #616     +/-   ##
=========================================
+ Coverage   75.19%   75.49%   +0.3%     
=========================================
  Files          30       31      +1     
  Lines        2890     2926     +36     
=========================================
+ Hits         2173     2209     +36     
  Misses        717      717
Impacted Files Coverage Δ
src/rosdep2/platforms/alpine.py 100% <100%> (ø)
src/rosdep2/__init__.py 77.77% <100%> (+0.41%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d41913...709d2ca. Read the comment docs.

Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, I don't have alpine to test on. Thanks for the mocked tests to make sure there's some coverage.

@russkel
Copy link
Contributor

russkel commented May 3, 2019

What's holding this up being merged? Let me know how I can help. Maybe it would be a good idea to get it merged after all the source dependencies are removed from rosdistro. I will try and work on upstreaming the remaining dependencies.

@russkel
Copy link
Contributor

russkel commented May 4, 2019

There seems to be some conflicts between the pip installed PyYAML and the apk installed PyYAML. It causes the rosdep installing of dependencies to fail.

If pip installs pyyaml before it is installed by apk then we get this failure.

ERROR: the following rosdeps failed to install
  apk: command [apk add apr apr-util tinyxml2-dev lz4-dev py-nose py-imaging sbcl py-yaml bzip2-dev cmake] failed
(28/31) Installing py2-yaml (5.1-r0)
ERROR: py2-yaml-5.1-r0: failed to rename usr/lib/python2.7/site-packages/.apk.f759bf6f1398870b2e65d7d6bebb047f9911fdf8b72b5bed to usr/lib/python2.7/site-packages/PyYAML-5.1-py2.7.egg-info.

Also, should we just opt for python3 by default in adding the alpine platform?

@russkel
Copy link
Contributor

russkel commented May 5, 2019

In addition to this, the newest version of boost has removed the deprecated boost-signals library, so this fails on building roscpp. As seen in ros/ros_comm#1580

@at-wat
Copy link
Contributor Author

at-wat commented May 6, 2019

@russkel the problems around PyYAML and boost-signals are independent of this PR.
Mixing pip and distribution native package manager can cause conflict not only on Alpine Linux. Especially, Alpine doesn't have a lot of packages on native package repository because of their policy to keep it light-weighted. I'm maintaining third-party Alpine package repository to provide such kind of packages (https://github.com/alpine-ros/alpine-ros, https://github.com/seqsense/aports-ros-experimental). Please try https://github.com/alpine-ros/alpine-ros docker image which uses our public repository providing many ported/backported packages compatible with kinetic.
Valid pair of boost version and ROS distro is limited. (It's also not Alpine specific problem.) I confirmed that boost and gcc on Alpine 3.7 are compatible with kinetic and 3.8 looks compatible with melodic.

@tfoote @nuclearsandwich Our company is already using ROS on Alpine Linux. rosdep in this PR looks working correctly. If you need any additional information to go forward, please let me know.

@russkel
Copy link
Contributor

russkel commented May 6, 2019

@russkel the problems around PyYAML and boost-signals are independent of this PR.

Yep I understand this. I just wanted to document the issues one would have trying to bring up a ROS melodic setup with this (and I am trying to work on them so I can get melodic running in docker).

Thanks for your repositories! Good to know you are having success with Alpine at your company.

@tfoote tfoote merged commit 81e72cb into ros-infrastructure:master May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants