gentoo-php-overlay / php-overlay

Unofficial PHP Overlay for Gentoo Linux
7 stars 3 forks source link

Further Instructions For Adding PHP Overlay? #30

Open jlpoolen opened 9 months ago

jlpoolen commented 9 months ago

Current README.md has:

PHP Overlay

Unofficial PHP Overlay for Gentoo Linux
Install

Install using Eselect Repository:

eselect repository enable php-overlay

Install using Layman:

layman -a php-overlay

However, running the command eselect repository enable php-overlay in a standard Gentoo install results in:

!!! Error: Can't load module repository

My eselect has:

 eselect
Usage: eselect <global options> <module name> <module options>

Global options:
  --brief                   Make output shorter
  --colour=<yes|no|auto>    Enable or disable colour output (default 'auto')
  --eprefix=<path>          Override the EPREFIX variable for a cross-prefix build
  --root=<path>             The target root path for eselect's operations

Built-in modules:
  help                      Display a help message
  usage                     Display a usage message
  version                   Display version information

Extra modules:
  arptables                 Manage the iptables/arptables/ebtables symlinks
  binutils                  Manage installed versions of sys-devel/binutils
  ctags                     Manage /usr/bin/ctags implementations
  ebtables                  Manage the iptables/arptables/ebtables symlinks
  ecj                       Manage ECJ targets
  editor                    Manage the EDITOR environment variable
  emacs                     Manage /usr/bin/emacs version
  env                       Manage environment variables set in /etc/env.d/
  etags                     Manage /usr/bin/etags implementations
  fontconfig                Manage fontconfig /etc/fonts/conf.d symlinks
  gcc                       Manage installed versions of sys-devel/gcc
  gnuclient                 Manage /usr/bin/gnuclient implementations
  iptables                  Manage the iptables/arptables/ebtables symlinks
  java-vm                   Manage the Java system and user VM
  kernel                    Manage the /usr/src/linux symlink
  locale                    Manage the LANG environment variable
  maven                     Manage Maven targets
  modules                   Query eselect modules
  mpg123                    Manage /usr/bin/mpg123 implementation
  news                      Read Gentoo ("GLEP 42") news items
  pager                     Manage the PAGER environment variable
  php                       Manage php installations
  pinentry                  Manage /usr/bin/pinentry implementation
  postgresql                Manage active PostgreSQL client applications and libraries
  profile                   Manage the make.profile symlink
  rc                        Manage /etc/init.d scripts in runlevels
  rust                      Manage the Rust compiler versions
  visual                    Manage the VISUAL environment variable

So if there is some additional step needed, it would be helpful to such.

I'm coming to you because I'm trying to install Lychee 5+ and it needs php's composer which is not current in Gentoo's portage. Yes, I can try to research how to accomplish, but these instructions looked so inviting and appears to be only what is needed. I don't do overlays much, so working knowledge of them escapes me for the moment.

r7l commented 9 months ago

@jlpoolen You need to install it first with emerge app-eselect/eselect-repository. The readme is kinda expecting it. As much as it expects you to have Layman installed, when using that option.

We are not having Lychee 5.x yet. I am running Lychee myself and haven't had the time yet to do the update. At some point in the past, i've done a major release update with Lychee (i think it was 3.x to 4.x) and had allot of issues. That's why i am kinda hesitating. I am planning to do update at some point soon. Just need some time to test everything properly.

I'll leave this issues open, in order to be additionally motivated to finally do the update.

jlpoolen commented 9 months ago

Thank you for the instruction re: app-select/eselect-repository. I did so, but I guess there is something else I'm suppose to do. See my session:

janus /usr/local/src/Lychee5/Lychee # eselect repository enable php-overlay
error: php-overlay: repository already enabled, in /var/db/repos/php-overlay
janus /usr/local/src/Lychee5/Lychee # ls /var/db/repos/
gentoo
janus /usr/local/src/Lychee5/Lychee # eselect repository disable php-overlay
Updating repos.conf ...
1 repositories disabled
janus /usr/local/src/Lychee5/Lychee # eselect repository enable php-overlay
Adding php-overlay to /etc/portage/repos.conf/eselect-repo.conf ...
1 repositories enabled
janus /usr/local/src/Lychee5/Lychee # ls /var/db/repos/
gentoo
janus /usr/local/src/Lychee5/Lychee #

It's been over five years since I have used overlays and it looks like the process is not intuitive, and I see the Gentoo page for layman had this warning:

Warning
[app-portage/layman](https://packages.gentoo.org/packages/app-portage/layman) is pmasked for removal. The [eselect repository](https://wiki.gentoo.org/wiki/Eselect/Repository) eselect module supersedes layman and is currently the preferred way for managing ebuild repositories.

Also, I had to create a directory /etc/portage/package.accept_keywords as my installation was using the file method, no problem to adjust, but your instructions might flag a warning that migrating to the package.accept_keywords directory structure is needed if there currently exists a file. I think your approach of using links is a good approach, hence I encourage the use of package management with directories rather than files containing combined entries.

Ahah, I found this page: https://wiki.gentoo.org/wiki/Eselect/Repository and see that I need to: emaint sync -r php-overlay

Sometimes it is helpful to have a perspective of someone unfamiliar with your project coming from a different, yet standard, set-up.

jlpoolen commented 9 months ago

We are not having Lychee 5.x yet. I am running Lychee myself and haven't had the time yet to do the update. At some point in the past, i've done a major release update with Lychee (i think it was 3.x to 4.x) and had allot of issues. That's why i am kinda hesitating. I am planning to do update at some point soon. Just need some time to test everything properly.

Beware on trying to upgrade to Lychee 5.x. Lychee 5.x requires a version of composer and/or PHP, e.g. 8.2.15, whereas Lychee 4 was running under PHP 8.1.26-r1. "eselecting" to the higher version of PHP broke Lychee 4. I was trying to have Lychee 4 continue to operate while I fiddled with getting Lychee 5.x up and running. I don't think you can do so on the same server as apache setting for php differ.

r7l commented 9 months ago

Thanks and yes, i am aware of the version dependencies. It might be good to have another environment for the update tests. At least that's what i usually do.