This repository was archived by the owner on Aug 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Gentoo Support #3175
Open
JoseJX
wants to merge
49
commits into
dnschneid:master
Choose a base branch
from
JoseJX:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Gentoo Support #3175
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
8493f95
Gentoo: Add initial support for the core target.
30e634a
Gentoo: Add support for the audio target.
7a18dbd
Gentoo: Make portage rebuild packages if the use flags have changed.
48d0585
Gentoo: Add support for the cli-extra target.
a9d7b84
Gentoo: Add support for the xorg and x11-common targets.
06f3ccc
Gentoo: Fix sudo duplication and group GID.
d191fd2
Gentoo: Support the gtk-extra target.
96cc337
Gentoo: Update the portage tree during a core update.
5eaeb25
Gentoo: Add support for the xfce and xfce-desktop targets.
53ce0cb
Gentoo: Don't call install when there's nothing passed to install.
495a933
Gentoo: Add support for extension target.
c07cc92
Gentoo: Add support for enlightenment.
4dcbe08
Gentoo: Add the ability to keyword packages and accept licenses.
2db07c6
Gentoo: Add support for the chrome targets.
a6ed7f7
Gentoo: Add support for lxde target.
835ccde
Gentoo: Add support for the xiwi target.
40a0601
Gentoo: Remove the suid bit to allow LD_PRELOAD for libcroutonfreon.
0ba9260
Gentoo: Support use expand variables for simultaneous xiwi and xorg.
a026730
Gentoo: Add support for RSYNC_PROXY.
acbc6a2
Gentoo: Add support for MIRROR, remove debugging code.
28e09e8
Gentoo: Use CHOST from make.conf to determine architecture.
fd765fb
Gentoo: Simplify prepare functions.
2051ba1
Gentoo: Simplify changes to prepare.sh.
70a8ce7
Gentoo: Simplify packages for core target. Add dbus to global use flags.
a875747
Gentoo: Clean up audio target changes, remove redundant check.
ddabc68
Gentoo: Remove extra dbus use flag setting from cli-extra.
27cce46
Gentoo: Remove unused X utils from extension target.
8f71234
Gentoo: Simplify the gtk-extra target's install logic.
9bc8bef
Gentoo: Fix lxde-desktop target, remove lightdm.
fafe25e
Gentoo: Fix use flags, clean up package installation for X targets.
d9b3507
Gentoo: Update cpu flag code for cpuid2cflags >=2.
c9379bd
Gentoo: Add ability to turn off use flags in prepare.
6b58f4f
Gentoo: Make sure to trigger a world update in core.
4d0b883
Gentoo: Add support for other arches, remove temporary files.
f90cc28
Gentoo: Patch xf86-video-dummy and xf86-video-intel before the build.
85f1b94
Gentoo: Change xorg input targets to remove unused targets.
2ef3ccf
Gentoo: Make Gentoo update chrome using the package manager.
6f82d65
Let the user change the /tmp directory for low memory devices.
b430183
Gentoo: Simplify audio dependency code.
5ef61c3
Gentoo: Simplify creating the sudo group in core.
69ed164
Gentoo: Add support for extra arm targets, fix ARCH variable usage.
ec2bbfb
Gentoo: Rework intel and fbdev video_cards use expand.
821d21d
Gentoo: Add note for users installing *-desktop targets.
9d5e783
Gentoo: Adjust CPU use expand code to be more reliable.
a61e162
Gentoo: Set flags earlier to prevent recompiles. Add i915, i965 to VI…
fb56dff
Gentoo: Support switching profiles. Add support for kde and gnome tar…
8928954
Gentoo: Add kodi support and make the xbmc package work with kodi.
723dd74
Gentoo: Update copyright year for all of the files I've touched.
5655d86
Gentoo: Fix issue where disabled flags would cause prepare script to …
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Gentoo: Add support for the xorg and x11-common targets.
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,17 +18,38 @@ if [ -n "$offset" ]; then | |
| conv=notrunc,nocreat 2>/dev/null | ||
| fi | ||
|
|
||
| # Make sure the use flags on gentoo are set that we'll need for X | ||
| if [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then | ||
| set_flags X dbus guile networking | ||
| fi | ||
|
|
||
| # Install utilities and links for powerd-poking daemon | ||
| compile xi2event '-lX11 -lXi' libx11-dev libxi-dev | ||
| install --minimal dbus xdg-utils | ||
| XILIBS="" | ||
| if [ "${DISTROAKA:-"$DISTRO"}" = 'debian' ]; then | ||
| XILIBS="libx11-dev libxi-dev" | ||
| elif [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then | ||
| XILIBS="x11-libs/libXi" | ||
| fi | ||
| compile xi2event '-lX11 -lXi' ${XILIBS} | ||
|
|
||
| # On Gentoo, we need to set the text useflag for xdg-utils | ||
| if [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then | ||
| echo "app-text/xmlto text" >> /etc/portage/package.use/package.use | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Every time you update the chroot, package.use will get longer... |
||
| fi | ||
|
|
||
| install --minimal gentoo=sys-apps/dbus,dbus xdg-utils | ||
| ln -sf croutonpowerd /usr/local/bin/gnome-screensaver-command | ||
| ln -sf croutonpowerd /usr/local/bin/xscreensaver-command | ||
|
|
||
| # Install nicer cursors | ||
| install --minimal dmz-cursor-theme | ||
| install --minimal gentoo=vanilla-dmz-xcursors,dmz-cursor-theme | ||
|
|
||
| # Install bsdmainutils, xbindkeys and xautomation for shortcuts | ||
| install --minimal bsdmainutils xbindkeys xautomation | ||
| PKG_SC="xbindkeys xautomation" | ||
| if [ "${DISTROAKA:-"$DISTRO"}" = 'debian' ]; then | ||
| PKG_SC="${PKG_SC} bsdmainutils" | ||
| fi | ||
| install --minimal ${PKG_SC} | ||
|
|
||
| # We need chvt on freon systems | ||
| if [ -f "/sys/class/tty/tty0/active" ]; then | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,18 @@ XMETHOD="${XMETHOD:-xorg}" | |
| # Migration from ambiguous XMETHOD | ||
| rm -f '/etc/crouton/xserverrc-x11' | ||
|
|
||
| # Set the use flags on gentoo that we'll need for X | ||
| if [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then | ||
| set_flags libkms uxa dri3 xvmc opengl | ||
|
|
||
| # Set VIDEO_CARDS and INPUT_DEVICES | ||
| # FIXME: Perhaps make this more flexible, right now just pick all of them | ||
| VIDEO_CARDS=`grep VIDEO_CARDS /etc/portage/make.conf | cut -d= -f1` | ||
| if [ -z ${VIDEO_CARDS} ]; then | ||
| echo "VIDEO_CARDS=\"intel fbdev vesa dummy\"" >> /etc/portage/make.conf | ||
| echo "INPUT_DEVICES=\"keyboard libinput mouse evdev\"" >> /etc/portage/make.conf | ||
| fi | ||
| fi | ||
|
|
||
| # Figure out what we need on this system | ||
|
|
||
|
|
@@ -44,7 +56,11 @@ intelhasfbc='' | |
| pinmesa='' | ||
| intelfbcsupport='y' | ||
| if [ "${ARCH#arm}" = "$ARCH" ]; then | ||
| inteldriver="xserver-xorg-video-intel$backport" | ||
| if [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then | ||
| inteldriver="xf86-video-intel" | ||
| else | ||
| inteldriver="xserver-xorg-video-intel$backport" | ||
| fi | ||
|
|
||
| # If the system has an Intel FBC-capable video card but has too old a driver | ||
| # to support the chipset, we'll need to disable hardware acceleration. | ||
|
|
@@ -64,11 +80,17 @@ if [ "${ARCH#arm}" = "$ARCH" ]; then | |
| fi | ||
|
|
||
| # Unhold xserver-xorg-video-intel, modification will be reapplied later. | ||
| apt-mark unhold "$inteldriver" 2>/dev/null || true | ||
| if [ "${DISTROAKA:-"$DISTRO"}" = 'debian' ]; then | ||
| apt-mark unhold "$inteldriver" 2>/dev/null || true | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what are you going to do about the binary hack on the intel driver? In this case, you could probably also make an overlay patch... |
||
| fi | ||
| fi | ||
|
|
||
| # Catalog relevant and irrelevant video drivers | ||
| fbdev="xserver-xorg-video-fbdev$backport" | ||
| if [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then | ||
| fbdev="xf86-video-fbdev" | ||
| else | ||
| fbdev="xserver-xorg-video-fbdev$backport" | ||
| fi | ||
|
|
||
| if release -lt sid -lt kali-rolling -lt vivid; then | ||
| modesetting="xserver-xorg-video-modesetting$backport" | ||
|
|
@@ -97,7 +119,7 @@ fi | |
|
|
||
| # On Freon, we need crazy xorg hacks | ||
| if [ -n "$freon" ]; then | ||
| compile freon '-ldl -ldrm -I/usr/include/libdrm' so libdrm-dev | ||
| compile freon '-ldl -ldrm -I/usr/include/libdrm' so gentoo=x11-libs/libdrm,libdrm-dev | ||
| fi | ||
|
|
||
| # Pin precise's version of mesa if necessary | ||
|
|
@@ -197,9 +219,14 @@ if [ -z "$inteldriver" -a -n "$backport" ] && release -eq precise; then | |
| x11-session-utils x11-utils x11-xfs-utils x11-xkb-utils \ | ||
| x11-xserver-utils xauth xinit xfonts-utils xkb-data xorg-docs-core \ | ||
| xterm x11-common xinput | ||
| elif [ "${DISTROAKA:-"$DISTRO"}" = 'gentoo' ]; then | ||
| install xorg-x11 xorg-server ${installvideodrivers} | ||
|
|
||
| # We don't need to remove video drivers | ||
| removevideodrivers="" | ||
| else | ||
| install xorg $installvideodrivers -- xserver-xorg-video-all$backport \ | ||
| $vmmouse | ||
| install xorg $installvideodrivers -- xserver-xorg-video-all$backport \ | ||
| $vmmouse | ||
| fi | ||
|
|
||
| # Remove bad video drivers | ||
|
|
@@ -233,7 +260,9 @@ if [ -n "$freon" -a -e "$inteldrv" ]; then | |
| if grep -F -q -a 'getuid0' "$inteldrv" 2>/dev/null; then | ||
| # Hold xserver-xorg-video-intel to make sure that the modification | ||
| # (which may have been made in a previous update) does not get erased. | ||
| apt-mark hold "$inteldriver" | ||
| if [ "${DISTROAKA:-"$DISTRO"}" = 'debian' ]; then | ||
| apt-mark hold "$inteldriver" | ||
| fi | ||
| fi | ||
| fi | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set pkgs to "$*" and prefix in the debian branch?
Alternatively, I think you could just
debian=gcc, debian=libc6-devand be done with it.