dartsim / dart-debian

:package: Debian meta files for DART PPA
https://launchpad.net/~dartsim/+archive/ubuntu/ppa
1 stars 3 forks source link

Binary files in dart6-data are installed without being decompressed #3

Closed scpeters closed 6 years ago

scpeters commented 6 years ago

While testing an ign-physics pull request, I had trouble finding the example models in the data folder in the debian packages. Since they are installed with a source build, I think they should be included in one of the debian packages.

cc @mxgrey

jslee02 commented 6 years ago

Hm, that's weird. We have dart6-data for installing the data folder and it's included in libdart6-all-dev. :thinking:

scpeters commented 6 years ago

You are right! I didn't see it because I was grepping for libdart. Thanks

scpeters commented 6 years ago

It looks like a bunch of the files are gzipped though

scpeters commented 6 years ago
$ dpkg -L dart6-data | grep KR5
/usr/share/doc/dart/data/urdf/KR5
/usr/share/doc/dart/data/urdf/KR5/ground.urdf
/usr/share/doc/dart/data/urdf/KR5/KR5 sixx R650.urdf.gz
/usr/share/doc/dart/data/urdf/KR5/meshes
/usr/share/doc/dart/data/urdf/KR5/meshes/palm.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/shoulder.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/bicep.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/forearm.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/base_link.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/wrist.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/elbow.STL.gz
jslee02 commented 6 years ago

It looks like a bunch of the files are gzipped though

I believe those files are compressed as being packaged as debian package and will be extracted when they are installed. dart6-data just copies the raw data files under <dart>/data. For example, the KR5 files are at here (unzipped).

scpeters commented 6 years ago

They still look compressed to me:

$ find /usr/share/doc/dart/data/urdf | grep KR5
/usr/share/doc/dart/data/urdf/KR5
/usr/share/doc/dart/data/urdf/KR5/KR5 sixx R650.urdf.gz
/usr/share/doc/dart/data/urdf/KR5/ground.urdf
/usr/share/doc/dart/data/urdf/KR5/meshes
/usr/share/doc/dart/data/urdf/KR5/meshes/wrist.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/base_link.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/bicep.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/forearm.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/palm.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/shoulder.STL.gz
/usr/share/doc/dart/data/urdf/KR5/meshes/elbow.STL.gz
scpeters commented 6 years ago

The STL and urdf files have .gz extensions in the dart6-data deb

jslee02 commented 6 years ago

I could reproduce this issue. When I replied above, I was confused because the compressed and uncompressed files existed at the same time in the same directory. But that's because I installed uncompressed files manually a while ago (while dart6-data installed the compressed files).

Let me try to figure out what's the cause.

jslee02 commented 6 years ago

It seems overriding dh_compress should work as

# rules file
override_dh_compress:
    dh_compress --exclude=*/share/doc/data/dart/*

Let me try with this.

scpeters commented 6 years ago

Did you have a chance to try overriding dh_compress?

jslee02 commented 6 years ago

Yes. I tried following script

override_dh_compress:
    dh_compress -X.STL

but it seemed not working (see build log). It didn't install any of data files weirdly. Let me investigate further.

jslee02 commented 6 years ago

Oh, it actually worked. I only checked amd64 build but dart6-data is only built in i386. This is probably because dart6-data is non-binary package so it doesn't need to be built for both of architectures.

For a test, I just excluded *.stl, and this is what I get:

find /usr/share/doc/dart/data/urdf | grep stl
/usr/share/doc/dart/data/urdf/test/invalid_mesh.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RAP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LSP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_NK2.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RWP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LHP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LSY_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LF2.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RKP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_NK1_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RSY_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LF3.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LWP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RAR_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RF1.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LWY_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RWY_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RHY_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LAP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LAR_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LEP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LF1.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_TSY_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RF3.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LKP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RHP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_Torso_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RWR_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RF2.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_REP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LHY_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LHR_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RSR_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LWR_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_NKY_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_LSR_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RSP_merged.stl
/usr/share/doc/dart/data/urdf/drchubo/meshes/convhull_RHR_merged.stl

Other extensions are all excluded, and they are being built now. You should be able to check it in about a half hour.

Edit: This is the rule file I used.

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

override_dh_auto_configure:
    dh_auto_configure -- \
        -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo

override_dh_auto_build:
    dh_auto_build -- tests

override_dh_compress:
    dh_compress \
        -X.dae -X.obj -X.stl -X.STL \
        -X.sdf -X.skel -X.urdf -X.vsk -X.world \
        -X.c3d -X.changelog -X.dof -X.path -X.tris

%:
    dh $@
scpeters commented 6 years ago

Thanks, it looks good now!