Jump to content

Photo

Learning to create newer versions of e-builds


Best Answer hencb , 12 March 2017 - 02:48 AM

Ok there's quite a few outdated documents and command warnings that cause problems here.

 

First of, emerge <ebuildname>.ebuild from the current overlay directory tends to work. I generally don't use it since the ebuild

tool allows you to install a package just like emerge does, but it does this by going through different stages.

 

Let's start with the prerequisite: The manifest file.

 

You don't have to run ebuild *.ebuild manifest, just run ebuild <ebuildname>.ebuild manifest, which will generate a manifest for all ebuilds in the current directory. There's also repoman, which Gentoo uses, and which can create manifests as well: repoman manifest will create manifest entries for all ebuilds that don't have one already.

 

I highly recommend reading "man ebuild" on how to use the ebuild tool. It will make debugging ebuild problems a lot easier. A basic way to install a custom ebuild using the ebuild tool can be done like this, if the manifest is correct:

ebuild gdal-2.0.3.ebuild fetch (downloads the package and verifies that its integrity using the manifest file)
ebuild gdal-2.0.3.ebuild unpack (downloads the package and untars it into /var/tmp/portage/sci-libs/gdal-2.0.3.ebuild)
ebuild gdal-2.0.3.ebuild prepare (applies any patches and prepares the ebuild)
ebuild gdal-2.0.3.ebuild configure (runs the configure script of autotools)
ebuild gdal-2.0.3.ebuild compile (compiles the packages)
ebuild gdal-2.0.3.ebuild install (this will install the package into a sandbox, that is, into /var/tmp/portage/sci-libs/gdal-2.0.3/image folder)
ebuild gda1 qmerge (install the package into the system. At this point, the whole process is completed and is equivalent to running emerge)

Some phases also include others. Typically, you'll skip the fetch and configure phase, they are included in the other commands (unpack and compile). I haven't listed some of the phases due to brevity. This is still a very verbose way to install an ebuild, and a bit tedious.  A simpler way to use the ebuild tool is to run:

ebuild <ebuildname>.ebuild merge ,which is equivalent to running: emerge <ebuildname>.ebuild.

 

Consider reading both man ebuild (for the tool) and man 5 ebuild (for the ebuild syntax). They're the most accurate documents at the moment.

 

It seems somebody masked the newer versions of gdal for some reason. This needs further investigation. It might be a malformed mask and you should add an entry to package.unmask for the time being:

>=sci-libs/gdal-2.0.3

 

Drop by on IRC sometime and I'll be glad to assist you with any questions. Just ping me (bhenc) and I'll help you get started with the ebuilds. If you're unfamiliar with IRC, the www.funtoo.org/Getting_Help  page might be a good place to start.

 

Happy hacking!

Go to the full post »


2 replies to this topic

#1
NikosAlexandris

NikosAlexandris

    Advanced Member

  • Members
  • PipPipPip
  • 66 posts
  • LocationSwitzerland

I want to create newer e-builds for

 

To start, I have followed the steps outlined at <http://www.funtoo.or...Local_Overlay>.  I created a local overlay named osgeo and went through the rest of the steps.  What are the next steps?  In example, what is the first thing to do in the "new" ebuild which is still a copy of the latest older existing ebuild, after having ran

ebuild  gdal-2.1.3.ebuild manifest

Note, running

ebuild *.ebuild manifest 

as suggested in the Wiki, I get

!!! doebuild: 'gdal-2.1.3.ebuild' is not one of the following valid commands:
!!! clean      cleanrm    compile    config     configure  depend
!!! digest     fetch      fetchall   help       info       install
!!! manifest   merge      nofetch    package    postinst   postrm
!!! preinst    prepare    prerm      pretend    qmerge     rpm
!!! setup      test       unmerge    unpack 

Trying to emerge the "local" ebuild, comes with a WARNING not doing so:

*** emerging by path is broken and may not always work!!!


These are the packages that would be merged, in order:

Calculating dependencies \
*** You are emerging a masked package. It is MUCH better to use
*** /etc/portage/package.* to accomplish this. See portage(5) man
*** page for details.
>>> Waiting 10 seconds before starting...
>>> (Control-C to abort)...
Continuing... in: 10 9 8... done!

For example, I navigate in /var/overlay/local/sci-libs/gdal where there are

-rw-r--r-- 1 root root  758 Mar 11 13:47 Manifest
drwxr-xr-x 2 root root    2 Mar 11 13:53 files
-rw-r--r-- 1 root root 7439 Mar 11 13:43 gdal-2.0.3.ebuild
-rw-r--r-- 1 root root 7439 Mar 11 13:45 gdal-2.1.3.ebuild

What's on here?  -- Similar I have done for grass. Thanks for any hints.

 

See also


Edited by NikosAlexandris, 11 March 2017 - 05:16 PM.

Nikos Alexandris | Remote Sensing *
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3


#2
hencb

hencb

    Member

  • Members
  • PipPip
  • 13 posts
✓  Best Answer

Ok there's quite a few outdated documents and command warnings that cause problems here.

 

First of, emerge <ebuildname>.ebuild from the current overlay directory tends to work. I generally don't use it since the ebuild

tool allows you to install a package just like emerge does, but it does this by going through different stages.

 

Let's start with the prerequisite: The manifest file.

 

You don't have to run ebuild *.ebuild manifest, just run ebuild <ebuildname>.ebuild manifest, which will generate a manifest for all ebuilds in the current directory. There's also repoman, which Gentoo uses, and which can create manifests as well: repoman manifest will create manifest entries for all ebuilds that don't have one already.

 

I highly recommend reading "man ebuild" on how to use the ebuild tool. It will make debugging ebuild problems a lot easier. A basic way to install a custom ebuild using the ebuild tool can be done like this, if the manifest is correct:

ebuild gdal-2.0.3.ebuild fetch (downloads the package and verifies that its integrity using the manifest file)
ebuild gdal-2.0.3.ebuild unpack (downloads the package and untars it into /var/tmp/portage/sci-libs/gdal-2.0.3.ebuild)
ebuild gdal-2.0.3.ebuild prepare (applies any patches and prepares the ebuild)
ebuild gdal-2.0.3.ebuild configure (runs the configure script of autotools)
ebuild gdal-2.0.3.ebuild compile (compiles the packages)
ebuild gdal-2.0.3.ebuild install (this will install the package into a sandbox, that is, into /var/tmp/portage/sci-libs/gdal-2.0.3/image folder)
ebuild gda1 qmerge (install the package into the system. At this point, the whole process is completed and is equivalent to running emerge)

Some phases also include others. Typically, you'll skip the fetch and configure phase, they are included in the other commands (unpack and compile). I haven't listed some of the phases due to brevity. This is still a very verbose way to install an ebuild, and a bit tedious.  A simpler way to use the ebuild tool is to run:

ebuild <ebuildname>.ebuild merge ,which is equivalent to running: emerge <ebuildname>.ebuild.

 

Consider reading both man ebuild (for the tool) and man 5 ebuild (for the ebuild syntax). They're the most accurate documents at the moment.

 

It seems somebody masked the newer versions of gdal for some reason. This needs further investigation. It might be a malformed mask and you should add an entry to package.unmask for the time being:

>=sci-libs/gdal-2.0.3

 

Drop by on IRC sometime and I'll be glad to assist you with any questions. Just ping me (bhenc) and I'll help you get started with the ebuilds. If you're unfamiliar with IRC, the www.funtoo.org/Getting_Help  page might be a good place to start.

 

Happy hacking!


  • NikosAlexandris likes this

#3
NikosAlexandris

NikosAlexandris

    Advanced Member

  • Members
  • PipPipPip
  • 66 posts
  • LocationSwitzerland

Here the result https://github.com/N...s/osgeo-overlay, which would not exist without hencb's help.

 

There are still issues with the gdal-2.1.3.ebuild (see https://github.com/N...-overlay/issues), but it was an overall good learning session.


Nikos Alexandris | Remote Sensing *
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users