[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: executable scripts in debian/



Eric Cooper <ecc@cmu.edu> writes:

> I need to run a script as part of debian/rules.  I can't rely on it
> being executable when unpacked, since dpkg-source doesn't preserve the
> mode.

Specifically, files that are created by the ‘foo_1.2-1.diff.gz’ won't have
the mode preserved.

Files that were executable in the ‘foo_1.2.orig.tar.gz’ will have
executable permissions preserved:

    dpkg-source(1)
    […]

    -x filename.dsc [output-directory]
          Extract a source package. […]

          The files in the extracted package will have their
          permissions and ownerships set to those which would have
          been expected if the files and directories had simply been
          created - directories and executable files will be 0777 and
          plain files will be 0666, both modified by the extractors’
          umask […]

This doesn't affect your problem of creating an executable file from
the diff, but I hope it clarifies what can be expected.

-- 
 \     “We are not gonna be great; we are not gonna be amazing; we are |
  `\           gonna be *amazingly* amazing!” —Zaphod Beeblebrox, _The |
_o__)                Hitch-Hiker's Guide To The Galaxy_, Douglas Adams |
Ben Finney


Reply to: