ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
2

Add postinstall rule for deb package creation

asked 2014-09-03 03:32:00 -0500

Ugo gravatar image

I'm trying to get a fork of the pr2-grant released for our ros_ethercat package as we find it very useful. In the pr2 repo, there were some post-install rules to set the sticky bit of pr2-grant.

Is there a way to do this with catkin / bloom?

Below is the debian/postinst rule

#!/bin/sh
set -e
PKG=pr2-grant
case "$1" in
 configure)
   chown root.root /usr/bin/pr2_grant
   chmod +s /usr/bin/pr2_grant
   chown root.root /usr/bin/pr2-grant
   chmod +s /usr/bin/pr2-grant
   ;;
 *)
       echo "postinst called with unknown argument \`$1'" >&2
       exit 0
   ;;   
esac
#DEBHELPER#

Thanks in advance!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-09-03 13:33:17 -0500

Dirk Thomas gravatar image

Bloom allows you to patch the generated Debian files at your will. So yes, you can add whatever post-install rule you would like.

The comfortable thing is that bloom will automatically reapply your patch for future releases.

edit flag offensive delete link more

Comments

great thanks

Ugo gravatar imageUgo ( 2014-09-03 14:27:26 -0500 )edit
2

answered 2014-09-03 15:39:09 -0500

William gravatar image

To build on @Dirk Thomas's answer, you can add your post install rule amongst the debian folder template files and it will get copied over (unmodified) into each OS version specific branch for Ubuntu.

For example, you would add your file to this branch:

https://github.com/ros-gbp/openni2_ca...

So in this case the branch name is debian/indigo/openni2_camera, which contains the generic templates for all debian/ubuntu release targets. Then the files which end in .em in this branch get their templates expanded and copied into version specific branches, e.g. debian/indigo/trusty/openni2_camera. If you put your files into the debian/indigo/openni2_camera branch without a .em extension they will just be copied over.

edit flag offensive delete link more

Comments

Thanks for the clarification William!

Ugo gravatar imageUgo ( 2014-09-04 00:55:54 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-03 03:32:00 -0500

Seen: 325 times

Last updated: Sep 03 '14