Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

HOWTO write ebuild for non-conformant filename [SOLVED]

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
binro
l33t
l33t
User avatar
Posts: 753
Joined: Fri May 06, 2005 7:16 pm
Location: Bangkok

HOWTO write ebuild for non-conformant filename [SOLVED]

  • Quote

Post by binro » Thu Aug 10, 2006 3:37 pm

I want to install protoeditor which is not in portage. To keep thinks kosher I thought I would write my own ebuild in my overlay. However the download file name is

Code: Select all

protoeditor-1.1beta3
and an ebuild of that name is not allowed by portage. I can change the ebuild name to

Code: Select all

protoeditor-1.1_beta3.ebuild
but then the download fails. If I download the file first and change its name, the compile stage fails because the unpacked source directory still has the old name. How do I avoid having to download the tarball first, unpacking it, renaming it and packing it up again?

TIA
Last edited by binro on Fri Aug 11, 2006 12:31 pm, edited 1 time in total.
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Top
sageman
Guru
Guru
User avatar
Posts: 363
Joined: Wed May 04, 2005 2:25 pm
Location: New Hampshire

  • Quote

Post by sageman » Thu Aug 10, 2006 3:43 pm

What's the ebuild look like? Can you post it here?
Top
binro
l33t
l33t
User avatar
Posts: 753
Joined: Fri May 06, 2005 7:16 pm
Location: Bangkok

  • Quote

Post by binro » Thu Aug 10, 2006 4:22 pm

protoeditor is a standard KDE app so I just copied another one:

Code: Select all


inherit kde

DESCRIPTION="Python debug editor"
HOMEPAGE="https://sourceforge.net/project/showfiles.php?group_id=129439"
SRC_URI="http://jaist.dl.sourceforge.net/sourceforge/protoeditor/${P}.tar.gz"
LICENSE="GPL-2"

SLOT="0"
KEYWORDS="x86"
IUSE=""

need-kde 3
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Top
sternklang
Veteran
Veteran
User avatar
Posts: 1641
Joined: Sat Sep 10, 2005 1:22 pm
Location: Somewhere in time and space

  • Quote

Post by sternklang » Thu Aug 10, 2006 5:24 pm

Take a look at the Variables page of the Gentoo Development Guide, specifically the last section on the page, "Version Formatting Issues" for an explanation of how to handle this. The devguide is an excellent resource if you want to know the correct way to write an ebuild.
Top
lnxz
Guru
Guru
Posts: 472
Joined: Sun Jul 03, 2005 4:53 am
Location: Earth

  • Quote

Post by lnxz » Thu Aug 10, 2006 5:24 pm

Code: Select all

MY_P="protoeditor-1.1beta3"
S="${WORKDIR}/${MY_P}"
SRC_URI="http://jaist.dl.sourceforge.net/sourceforge/protoeditor/${MY_P}.tar.gz
not very pretty, but it might be a starting point.
Top
PaulBredbury
Watchman
Watchman
User avatar
Posts: 7310
Joined: Thu Jul 14, 2005 3:47 pm

  • Quote

Post by PaulBredbury » Thu Aug 10, 2006 8:37 pm

Should be:

Code: Select all

MY_P=${P/_beta/beta}
...
HOMEPAGE="http://sourceforge.net/project/showfiles.php?group_id=129439"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
...
S="${WORKDIR}/${MY_P}"
Top
binro
l33t
l33t
User avatar
Posts: 753
Joined: Fri May 06, 2005 7:16 pm
Location: Bangkok

  • Quote

Post by binro » Thu Aug 10, 2006 9:37 pm

Thanks guys, that's what I needed to know! :D
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Top
binro
l33t
l33t
User avatar
Posts: 753
Joined: Fri May 06, 2005 7:16 pm
Location: Bangkok

  • Quote

Post by binro » Fri Aug 11, 2006 11:46 am

Ok, the ebuild now finds and compiles the right source but at the install stage I get this:
  • Making install in libs
    make[2]: Entering directory `/var/tmp/portage/protoeditor-1.1_beta3/work/protoeditor-1.1beta3/data/libs'
    mkdir -p /usr/share/apps/protoeditor/libs/perl/
    tar xfz ../../data/libs/perl_dbgp.tar.gz -C /usr/share/apps/protoeditor/libs/perl/
    ACCESS DENIED open_wr: /usr/share/apps/protoeditor/libs/perl/DB/IO/Scalar.pm
    tar: DB/IO/Scalar.pm: Cannot open: Permission denied
    ACCESS DENIED open_wr: /usr/share/apps/protoeditor/libs/perl/DB/IO/Stringy.pm
    tar: DB/IO/Stringy.pm: Cannot open: Permission denied
    ACCESS DENIED open_wr: /usr/share/apps/protoeditor/libs/perl/DB/IO/Wrap.pm
Since I am running as root, has emerge su'ed to some other userid? I have never seen this problem before in two years of Gentooing! If I cd to the work directory and "make install" the installation completes correctly. Other packages emerge as usual.
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Top
sternklang
Veteran
Veteran
User avatar
Posts: 1641
Joined: Sat Sep 10, 2005 1:22 pm
Location: Somewhere in time and space

  • Quote

Post by sternklang » Fri Aug 11, 2006 12:05 pm

Portage builds packages within a sandbox, then during the install phase copies the files from the sandbox to the live filesystem. These ACCESS DENIED errors mean the install script or makefile is trying to write outside the sandbox.

Take a look at the makefile and find the places where it's doing this. Then, modify the makefile to put "${D}" in front of the destination paths so when "make install" is run the files will be copied to the sandbox. You can either use sed to modify the makefile from the ebuild or create a modified makefile, diff the makefile to create a patch, and use epatch in the ebuild to apply the patch to the makefile. In either case, you would change the makefile in the src_unpack function. Take a look at the development guide for more details.
Top
binro
l33t
l33t
User avatar
Posts: 753
Joined: Fri May 06, 2005 7:16 pm
Location: Bangkok

  • Quote

Post by binro » Fri Aug 11, 2006 12:31 pm

Sternklang, thanks for the pointers. Basically, what you are saying is that the package's makefiles are badly constructed, in which case I shall not worry to much. However, I shall give massaging the makefiles with sed a go... :D
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Top
Post Reply

10 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy