Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: Creating .deb containing bash scripts

  1. #1
    Join Date
    Aug 2005
    Location
    Belgium
    Beans
    45
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Creating .deb containing bash scripts

    I'm deploying scripts to about 10-15 machines around the office and in the datacenter and i'm currently using them from a git repository and placing them in /usr/bin. Ofcourse, none of the machines have the latest version, etc etc.

    So having some experience with creating deb's and deploying the lateste git-core packages through our ppa to those machines, i believe creating deb packages is the way to go. There even is a git-buildpackage script to help with deb's from git sources. (http://honk.sigxcpu.org/projects/git...-html/gbp.html)

    Unfortunately i can't seem to be able to create a .deb that just places several bash scripts in /usr/bin.

    I followed the guide i mentioned above, ran dh_make, and configured the control file. I also commented out "make clean" and the make command in the generated rules file. Following some guide on the forums i created a usr/bin folder in the package dir and placed the scripts there.

    Launchpad was as helpful as:

    Rejected:
    Upload rejected because it contains binary packages. Ensure you are using `debuild -S`, or an equivalent command, to generate only the source package before re-uploading. See https://help.launchpad.net/PPAQuickStart/ for more information.
    I've googled until i was blue in the face, so i really need some help

    Thx

  2. #2
    Join Date
    Nov 2006
    Beans
    21

    Re: Creating .deb containing bash scripts

    I haven't used ubuntu's ppa's before but my guess is you have to use some option to dpkg-buildpackage to make it generate only a source package.

  3. #3
    Join Date
    Feb 2007
    Location
    Nowhere important
    Beans
    1,198
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Creating .deb containing bash scripts

    Do this;
    Code:
    mkdir ~/bash-1.0
    cd bash-1.0
    mkdir bash-1.0
    cd bash-1.0
    touch source
    dh_make -f source
    cd debian
    gedit rules
    Comment every line that contains '$(MAKE)' (with #).

    Add this line between 'dh_md5sums' and 'dh_builddeb':
    Code:
    cd debian/bash/usr/bin; cp /path/to/bash/script .
    Save and exit;
    Code:
    cd ..
    dpkg-buildpackage -rfakeroot
    Now your deb package is in ~/bash-1.0!
    Last edited by Martje_001; July 26th, 2008 at 07:28 PM.
    ➙ Synchronize all your files across Windows, Linux and Mac OS with Dropbox (2GB free storage!). By signing up via this link I'll get some extra space also, thanks!

    Multiseat on Ubuntu 10.04

  4. #4
    Join Date
    Jun 2007
    Beans
    331
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Creating .deb containing bash scripts

    I'm also trying to make a package for 3 bash scripts, and a perl script...

    The ubuntu guide is not very helpfull, so... could someone give me some help with this ? Do i need to make a custom install script ? Are there helpers scripts for this task ? Etc.

  5. #5
    Join Date
    Feb 2007
    Location
    Nowhere important
    Beans
    1,198
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Creating .deb containing bash scripts

    Read.. the.. thread..
    ➙ Synchronize all your files across Windows, Linux and Mac OS with Dropbox (2GB free storage!). By signing up via this link I'll get some extra space also, thanks!

    Multiseat on Ubuntu 10.04

  6. #6
    Join Date
    Jun 2007
    Beans
    331
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Creating .deb containing bash scripts

    Quote Originally Posted by Martje_001 View Post
    Read.. the.. thread..
    I read the thread. Maybe, i'm a bit too tired... i dunno... but i did not see the info.

  7. #7
    Join Date
    Aug 2005
    Location
    Belgium
    Beans
    45
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Creating .deb containing bash scripts

    The solution Martje_001 supplies worked fine. I changed some stuff but the essence is the same, check it out here: https://launchpad.net/~smartlounge/+archive

  8. #8
    Join Date
    Jun 2007
    Beans
    331
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Creating .deb containing bash scripts

    Wouldn't the binary-indep section be a better suited place to insert the commands ?

  9. #9
    Join Date
    Jun 2007
    Beans
    331
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Creating .deb containing bash scripts

    Well i made some changes, but i can't seem to make the package.

    I get this:

    dpkg-buildpackage: set CPPFLAGS to default value:
    dpkg-buildpackage: set CFLAGS to default value: -g -O2
    dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
    dpkg-buildpackage: set FFLAGS to default value: -g -O2
    dpkg-buildpackage: set LDFLAGS to default value: -Wl,-Bsymbolic-functions
    dpkg-buildpackage: pacote fonte urltoys
    dpkg-buildpackage: versão da fonte 1.28
    dpkg-buildpackage: fonte alterada por unknown <unknown@unknown.org>
    dpkg-buildpackage: arquitectura do anfitrião amd64
    fakeroot debian/rules clean
    dh_testdir
    dh_testroot
    rm -f build-indep-stamp configure-stamp
    dh_clean
    dpkg-source -b urltoys-1.28
    dpkg-source: building urltoys in urltoys_1.28.tar.gz
    dpkg-source: building urltoys in urltoys_1.28.dsc
    debian/rules build
    dh_testdir
    # Add here commands to configure the package.
    touch configure-stamp
    # Add here commands to compile the indep part of the package.
    # Nothing to do
    touch build-indep-stamp
    fakeroot debian/rules binary
    dh_testdir
    dh_testroot
    dh_clean -k -i
    dh_clean: I have no package to build
    dh_installdirs -i
    dh_installdirs: I have no package to build
    cp /home/######/workspace/debs/urltoys/urltoys-1.28/bin/* /home/########/workspace/debs/urltoys/urltoys-1.28/debian/urltoys/usr/bin
    cp: o alvo `/home/carlos/workspace/debs/urltoys/urltoys-1.28/debian/urltoys/usr/bin' não é uma directoria
    make: *** [install-indep] Error 1
    dpkg-buildpackage: failure: fakeroot debian/rules binary gave error exit status 2
    Any ideas ?

  10. #10
    Join Date
    Feb 2007
    Location
    Nowhere important
    Beans
    1,198
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Creating .deb containing bash scripts

    I assume you're also copying folders? Try:
    Code:
    cp -ap /folder /move
    ➙ Synchronize all your files across Windows, Linux and Mac OS with Dropbox (2GB free storage!). By signing up via this link I'll get some extra space also, thanks!

    Multiseat on Ubuntu 10.04

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •