Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 146436 - Perforce ebuilds
Summary: Perforce ebuilds
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords: EBUILD
: 146461 (view as bug list)
Depends on:
Blocks: 263087
  Show dependency tree
 
Reported: 2006-09-05 12:41 UTC by Mark Charlebois
Modified: 2017-07-27 22:47 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
perforce-cli ebuild (2006.1) (perforce-cli-2006.1.ebuild,779 bytes, text/plain)
2006-09-05 14:34 UTC, Mark Charlebois
Details
perforce-gui ebuild 2006.1 (perforce-gui-2006.1.ebuild,873 bytes, text/plain)
2006-09-05 15:06 UTC, Mark Charlebois
Details
perforce-gui ebuild 2006.1 (minus the cruft) (perforce-gui-2006.1.ebuild,689 bytes, text/plain)
2006-09-05 15:08 UTC, Mark Charlebois
Details
p4python ebuild 2006.1 (p4python-2006.1.ebuild,800 bytes, text/plain)
2006-09-05 15:23 UTC, Mark Charlebois
Details
perforce-server ebuild (2006.1) (perforce-server-2006.1.ebuild,769 bytes, text/plain)
2006-09-05 17:14 UTC, Jesus de Santos Garcia
Details
files\p4d (p4d,622 bytes, text/plain)
2006-09-05 17:16 UTC, Jesus de Santos Garcia
Details
perforce-cli ebuild (2006.1) with fetch restriction (perforce-cli-2006.1.ebuild,1018 bytes, text/plain)
2006-09-06 09:29 UTC, Mark Charlebois
Details
perforce-cli ebuild (2006.1) with fetch restriction (perforce-cli-2006.1.ebuild,1019 bytes, text/plain)
2006-09-06 09:40 UTC, Mark Charlebois
Details
perforce-gui ebuild 2006.1 with fetch restriction (perforce-gui-2006.1.ebuild,966 bytes, text/plain)
2006-09-06 09:41 UTC, Mark Charlebois
Details
perforce-server ebuild (2006.1) (perforce-server-2006.1.ebuild,1.19 KB, text/plain)
2006-09-06 17:21 UTC, Jesus de Santos Garcia
Details
files\p4d.initd (p4d.initd,592 bytes, text/plain)
2006-09-06 17:21 UTC, Jesus de Santos Garcia
Details
files\p4d.confd (p4d.confd,244 bytes, text/plain)
2006-09-06 17:22 UTC, Jesus de Santos Garcia
Details
Portage overlay for server, GUI and CLI (perforce-portage-overlay-2009.2.tar.bz2,2.87 KB, application/octet-stream)
2010-04-02 05:24 UTC, Jac Goudsmit
Details
Improved overlay for Perforce server, CLI client and GUI client (P4V) (perforce-portage-overlay-2010.1.tar.bz2,2.67 KB, application/octet-stream)
2010-07-11 07:24 UTC, Jac Goudsmit
Details
Overlay with support for amd64 (p4.tgz,2.96 KB, application/octet-stream)
2010-11-21 22:11 UTC, Jose Quinteiro
Details
Improved overlay for Perforce server (P4D), CLI Client (P4) and GUI client (P4V) (perforce-portage-overlay-2010.1.tar.bz2,3.53 KB, application/octet-stream)
2010-12-11 23:05 UTC, Jac Goudsmit
Details
Improved overlay for Perforce server (P4D), CLI Client (P4) and GUI client (P4V) (perforce-portage-overlay-2010.1.tar.bz2,3.85 KB, application/octet-stream)
2010-12-19 06:06 UTC, Jac Goudsmit
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Charlebois 2006-09-05 12:41:43 UTC
Mark Charlebois has offered to maintain the perforce client ebuilds. New ebuilds will be posted here as the previous bug has been closed.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-09-05 14:32:13 UTC
*** Bug 146461 has been marked as a duplicate of this bug. ***
Comment 2 Mark Charlebois 2006-09-05 14:34:18 UTC
Created attachment 96113 [details]
perforce-cli ebuild (2006.1)

This ebuild names the executable p4-${PV} so it does not collide with other versions.
Comment 3 Mark Charlebois 2006-09-05 14:36:02 UTC
This bug carries on from #93828 which is now closed.
Comment 4 Mark Charlebois 2006-09-05 15:06:32 UTC
Created attachment 96116 [details]
perforce-gui ebuild 2006.1

Adds the version suffix to the p4v binary and the instalation directory for the help files.
Comment 5 Mark Charlebois 2006-09-05 15:08:06 UTC
Created attachment 96117 [details]
perforce-gui ebuild 2006.1 (minus the cruft)
Comment 6 Mark Charlebois 2006-09-05 15:23:53 UTC
Created attachment 96118 [details]
p4python ebuild 2006.1
Comment 7 Jesus de Santos Garcia 2006-09-05 17:14:58 UTC
Created attachment 96132 [details]
perforce-server ebuild (2006.1)

My first approach to the ebuild server. Things I am working on:

- Create a /etc/conf.d/p4 for variables like: port, logfile, journal file
- Create a logrotate file for the log
- Create a cron job for creating checkpoing (disabled by default)
Comment 8 Jesus de Santos Garcia 2006-09-05 17:16:06 UTC
Created attachment 96133 [details]
files\p4d
Comment 9 Mark Charlebois 2006-09-05 21:24:32 UTC
(In reply to comment #7)
> Created an attachment (id=96132) [edit]
> perforce-server ebuild (2006.1)
> 
> My first approach to the ebuild server. Things I am working on:
> 
> - Create a /etc/conf.d/p4 for variables like: port, logfile, journal file
> - Create a logrotate file for the log
> - Create a cron job for creating checkpoing (disabled by default)
> 

In the following code, shouldn't p4d be p4d-${PV} ?

src_install() {
	dosbin ${DISTDIR}/p4d

	exeinto /etc/init.d
	doexe ${FILESDIR}/p4d
}
Comment 10 Håvard Wall 2006-09-06 00:54:46 UTC
These ebuilds still have the problems I explained in bug #93828. Different versions of p4 will be downloaded with the same filename into ${DISTDIR} giving digest conflicts and possibly corrupted binaries. 

I don't think installing p4 with a different name, p4-${PV}, solves any problem. There should always be only one p4 binary installed. p4 should be downloaded and stored in ${DISTDIR} as p4-${PV}, and then renamed to p4 when installed.
Comment 11 Bryan Østergaard (RETIRED) gentoo-dev 2006-09-06 01:31:58 UTC
Not a recruiters bug, bouncing to bug-wranglers.

You need to find a mentor that can open a proper new-dev bug if you want to become a developer.
Comment 12 Mark Charlebois 2006-09-06 07:16:13 UTC
(In reply to comment #10)
> These ebuilds still have the problems I explained in bug #93828. Different
> versions of p4 will be downloaded with the same filename into ${DISTDIR} giving
> digest conflicts and possibly corrupted binaries. 
> 
> I don't think installing p4 with a different name, p4-${PV}, solves any
> problem. There should always be only one p4 binary installed. p4 should be
> downloaded and stored in ${DISTDIR} as p4-${PV}, and then renamed to p4 when
> installed.
> 

Ah! I totally misunderstood your previous comment. I see what you mean now. I'll see if I can host the renamed binaries somewhere and I'll remove the ${PV} from the installed binary's name. 
Comment 13 Mark Charlebois 2006-09-06 09:29:34 UTC
Created attachment 96184 [details]
perforce-cli ebuild (2006.1) with fetch restriction

This version of the ebuild forces the user to download the p4 binary and rename it with the version extension.
Comment 14 Mark Charlebois 2006-09-06 09:40:48 UTC
Created attachment 96187 [details]
perforce-cli ebuild (2006.1) with fetch restriction

Fixed comment for download URL
Comment 15 Mark Charlebois 2006-09-06 09:41:31 UTC
Created attachment 96188 [details]
perforce-gui ebuild 2006.1 with fetch restriction
Comment 16 Jesus de Santos Garcia 2006-09-06 17:21:02 UTC
Created attachment 96221 [details]
perforce-server ebuild (2006.1)

perforce-gui ebuild 2006.1 with fetch restriction and conf.d/p4d file support
Comment 17 Jesus de Santos Garcia 2006-09-06 17:21:50 UTC
Created attachment 96222 [details]
files\p4d.initd
Comment 18 Jesus de Santos Garcia 2006-09-06 17:22:14 UTC
Created attachment 96223 [details]
files\p4d.confd
Comment 19 Mark Charlebois 2006-09-07 08:26:03 UTC
H
Comment 20 Mark Charlebois 2006-09-07 08:26:03 UTC
Håvard,

How should we proceed about having this bug assigned to a developer and in the longer term becoming developers to maintain the client and server ebuilds?

- Mark
Comment 21 Håvard Wall 2006-09-07 08:51:11 UTC
I'm not entirely sure, but take a look at comment 11 in bug #93828. Maybe you should try to contact this guy and see if he could review your ebuilds?
Comment 22 Jac Goudsmit 2010-04-02 05:24:45 UTC
Created attachment 226221 [details]
Portage overlay for server, GUI and CLI

This overlay was tested with Perforce 2009.2, GUI (P4V) build 2362331 and server/CLI build 238357. I haven't tested it extensively but I thought I'd share it anyway for those who are still interested in Perforce on Gentoo. Thanks to the other contributors of this bug for the original ebuilds that I based this on!

Usage:
1. su to become root.
2. Untar this in /usr/local/portage (it unpacks to a directory "p4").
3. Add perforce-server, perforce-gui and perforce-cli to your /etc/portage/package.keywords file (alternatively, use ACCEPT_KEYWORDS=~x86 on emerge).
4. emerge perforce-server and/or perforce-gui and/or perforce-cli as needed.

Note, the ebuilds will tell you where to download the files and how to rename them. Unfortunately Perforce doesn't use the version in the file name which is a problem when using Portage.
Comment 23 Jac Goudsmit 2010-04-02 05:28:09 UTC
Oops I forgot you also need to add this to your /etc/make.conf: PORTDIR_OVERLAY=/usr/local/portage/p4
Comment 24 Denis Dupeyron (RETIRED) gentoo-dev 2010-04-16 22:20:37 UTC
(In reply to comment #22)
> Note, the ebuilds will tell you where to download the files and how to rename
> them. Unfortunately Perforce doesn't use the version in the file name which is
> a problem when using Portage.

You could use arrows to change names on the fly instead, see the Package Manager Specification [1] section 9.2.7 and table 9.1. Look for an example in the app-admin/rudy ebuild.

You can also check for the arch (see an example in the app-admin/flexlm ebuild) to be able to install for amd64 too, as that's what most people run nowadays.

If you're interested I could proxy-maintain that for you.

Denis.

[1] http://distfiles.gentoo.org/distfiles/pms-3.pdf
Comment 25 Jac Goudsmit 2010-07-11 07:24:04 UTC
Created attachment 238265 [details]
Improved overlay for Perforce server, CLI client and GUI client (P4V)

Thanks for the remarks about using the arrow on SRC_URI. I changed the EAPI on each ebuild to 2 and used the arrow to automate the downloading.

I didn't implement x64 because I'm running a 32 bit Gentoo but it shouldn't be very hard to do: the only change that should be made for x64 compatibility is the download location: ...bin.linux26x64... instead of ...bin.linux26x86...

The ebuilds should now be version-independent for any version later than 2000: if you want to install another version simply copy the ebuild to the version you're interested in and do e.g. ebuild perforce-server-2005.1.ebuild digest, then emerge your version as usual.

If this would ever go into the main repository, keep in mind that there's a potential problem with updating servers: the updated server will update the database and there's no way to downgrade the server because an older server will not recognize the database. This is an issue if you're using a license file with an expiration date earlier than the server version you're installing: the new server will be happy to update the database but then it won't be able to log anyone in because it sees the expired license. I couldn't think of an easy way to prevent this from happening e.g. in case of a world update.

Which brings me to another issue: when you do a revdep-rebuild, it may detect that the GUI needs updated libraries so it will re-emerge perforce-gui which (obviously) doesn't install the later libraries. The program will know where to get its libraries and it will keep working fine, it's just that revdep-rebuild will always think it's out of date. That's a minor nuisance that I'm willing to live with.
Comment 26 Jose Quinteiro 2010-11-21 22:11:39 UTC
Created attachment 255071 [details]
Overlay with support for amd64

I modified Jac's excellent ebuilds to add support for amd64. These should work on both x86 and amd64.
Comment 27 Jac Goudsmit 2010-12-11 23:05:45 UTC
Created attachment 256928 [details]
Improved overlay for Perforce server (P4D), CLI Client (P4) and GUI client (P4V) 

This overlay fixes the problem that a revdep-rebuild would always try to rebuild p4v. It does this by installing a file into the /etc/revdep-rebuild directory.

I incorporated Jose Quinteiro's improvements for x64 support. Thanks Jose!

I also updated the Perforce build numbers to those of the current release: 2010.1.271261 (p4v), 2010.1.265509 (p4) and 2010.1.273938 (p4d). The Perforce people unfortunately have a nasty habit of not using the patch level in their file names so if you run into checksum errors when you emerge anything from this overlay, it's because Perforce updated their stuff; you will just have to rename the ebuilds to the current patch level, generate a manifest with the ebuild(1) command, and then do the emerge again.

To use this:
 - Use su to become root
 - If you installed one of the previous overlays, delete it
 - Unpack the tarball in /usr/local/portage
 - Add /usr/local/portage/p4 to the PORTDIR_OVERLAY definition in your /etc/make.conf (e.g. PORTDIR_OVERLAY="/usr/local/portage/p4")
 - Unmask the dev-vcs/perforce-server, dev-vcs/perforce-cli and dev-vcs/perforce-gui e.g. by adding their names to the /etc/portage/package.keywords file
 - Emerge the package(s) that you need.

Enjoy!
Comment 28 Jac Goudsmit 2010-12-19 06:06:22 UTC
Created attachment 257525 [details]
Improved overlay for Perforce server (P4D), CLI Client (P4) and GUI client (P4V)

This patch updates p4v to the latest version (2010.1.276058) and adds an icon for P4V to the menu.

See previous entries for instructions on how to install.

Please note, because Perforce doesn't make downloads available with the full patch version in the name, the ebuild will stop working as soon as the Perforce people update their software. If emerge fails with a file size mismatch or checksum error, it probably just means Perforce updated their software. You will need to rename the ebuilds to match the updated version and then run ebuild(1) to update the manifest. Don't update the manifest without renaming the ebuild; if you do, Portage will think you are using a different version than you actually are using.
Comment 29 Jose Quinteiro 2011-02-14 03:51:36 UTC
I've added Jac's latest changes to my user overlay:

http://git.overlays.gentoo.org/gitweb/?p=user/JoseQ.git;a=summary

Please note that because of Perforce's lame non-versioning you may get manifest errors unless you rm /usr/portage/distfiles/perforce-* before re-emerging.
Comment 30 Jac Goudsmit 2011-02-14 19:45:47 UTC
(In reply to comment #29)
> Please note that because of Perforce's lame non-versioning you may get manifest
> errors unless you rm /usr/portage/distfiles/perforce-* before re-emerging.

To clarify this: if you get a manifest error, it probably means that Perforce has updated their files. Since they don't update their file names, Portage has no way of detecting whether this happened or whether something went wrong during the download.

My brain is too deep into other stuff to know what it means to do the rm as Jose proposes, but if you re-generate the manifest without renaming the ebuild files, you are basically telling Portage: "Oh wait, I said version XXX has checksum CCC but it has checksum DDD". What you really want to do is tell Portage "Okay, I said version XXX has checksum CCC but now there's a NEW version with checksum DDD" so that it knows that what you have installed is out of date.

Bottom line: If you run into the problem that the manifest is incorrect, you should rename the ebuilds as well as generate new manifests.

I asked Perforce if they could add the version number to the downloaded file or path but their answer was basically: "This is what works for us". Too bad, because I think the file name problem prevents Perforce from ever becoming part of the main Portage tree.
Comment 31 Jose Quinteiro 2011-02-24 05:21:14 UTC
(In reply to comment #30)

I had already installed these ebuilds.  Portage detected that I already had the tarballs in /usr/portage/distfiles, and did not try to download them again. Since I'd made the manifest against the latest from the Perforce site, the manifest check failed against the old tarballs.

Everything should work fine as long as you use the latest tarballs with these ebuilds.
Comment 32 Maciej Piechotka 2017-04-20 21:55:02 UTC
There seems to be an overlay here: https://github.com/VladRassokhin/perforce-overlay (I'm not the owner).

I found a few ebuilds in random overlays as well.