Skip to content

Instantly share code, notes, and snippets.

View therealromster's full-sized avatar

therealromster

View GitHub Profile
@therealromster
therealromster / nvidia.patch
Created March 11, 2023 13:31
Nvidia fix for firmware and wayland
diff --git a/nvidia/Pkgfile b/nvidia/Pkgfile
index 122bb90cb..f43423b4a 100644
--- a/nvidia/Pkgfile
+++ b/nvidia/Pkgfile
@@ -38,9 +38,9 @@ build() {
ln -s libnvidia-allocator.so.$version $PKG/usr/lib/nvidia-drm_gbm.so
# wayland EGL library and config
- if [ $(prt-get isinst wayland > /dev/null) -ne 0 ]; then
+ if [ $(prt-get isinst wayland > /dev/null; echo $?) -eq 0 ]; then
@therealromster
therealromster / crux-lxc-container.sh
Created October 8, 2021 10:36
CRUX lxc container
# download crux iso image, mount and cd to it then run this to make a LXC container.
fakeroot -- /bin/bash - << 'EOF'
VERSION="$(cat crux-media)"
mkdir -p rootfs/var/lib/pkg
touch rootfs/var/lib/pkg/db
for pkg in crux/core/*.pkg.tar.xz
do
pkgadd -r rootfs "$pkg"
done
@therealromster
therealromster / DISTCC_CMDLIST
Created February 2, 2021 21:34
CRITICAL! distcc seems to have invoked itself recursively!
export DISTCC_CMDLIST='/etc/distcc/DISTCC_CMDLIST'
cat /etc/distcc/DISTCC_CMDLIST
/usr/lib/ccache/c++
/usr/lib/ccache/cc
/usr/lib/ccache/clang
/usr/lib/ccache/clang++
/usr/lib/ccache/clang-9
/usr/lib/ccache/clang-9.0
/usr/lib/ccache/cpp
@therealromster
therealromster / Pkgfile
Created January 3, 2020 15:10
qt5 changes to use python3
# Description: Qt Free Edition, version 5.x.
# URL: http://www.qt.io/
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: dbus gdk-pixbuf gst-plugins-base libepoxy libmng libxkbcommon xorg-libxcomposite xorg-libxcursor xorg-libxi xorg-libxinerama xorg-xcb-util-image xorg-xcb-util-keysyms xorg-xcb-util-wm
name=qt5
version=5.13.2
release=2
source=(https://download.qt.io/official_releases/qt/${version::4}/$version/single/qt-everywhere-src-$version.tar.xz
qt5-logo.png)
root@space
Sun Sep 01 20:19:23
/usr/ports/contrib/gtkglextmm
# revdep -vvvv pangomm
** calculating deps
** checking 1 ports
** checking linking
pangomm:/usr/: checking file
pangomm:/usr/include/: checking file
pangomm:/usr/include/pangomm-1.4/: checking file
romster@arkanoid
Sun Sep 01 20:12:30
~/projects/crux/contrib
$ sudo prt-get update -fr pangomm gtkglextmm
Password:
prt-get: updating /usr/ports/contrib/pangomm
=======> Building '/usr/ports/contrib/pangomm/pangomm#2.42.0-1.pkg.tar.xz'.
bsdtar -p -o -C /usr/ports/work/pangomm/src -xf /var/ports/distfiles/pangomm-2.42.0.tar.xz
+ build
+ cd pangomm-2.42.0
/usr/ports/xorg
# for p in *; do
> cd $p
> unset existing new update
> existing="$(grep '^# Depends on:' Pkgfile | tr ',' ' ' | tr -s ' ' | cut -d' ' -f4- | tr ' ' '\n' | sort | uniq | tr '\n' ' ')"
> new="$(finddeps $(basename $PWD) | cut -d' ' -f1 | sed -e '/\(glibc\|binutils\|gcc\)/d' | xargs)"
> update="$(echo "$existing $new" | tr -s ' ' | tr ' ' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/^ \+//')"
> sed -i -e "s/\(^# Depends on:\).*/\1 $update/" Pkgfile
> findredundantdeps -s -f $(basename $PWD)
> cd - >/dev/null
@therealromster
therealromster / gist:90a66368ecf07344ae368f3299f454bb
Created August 24, 2019 14:44
i got lazy and fixed the dependencies
/usr/ports/xfce-pedja
# for p in *; do
> cd $p
> unset existing new
> existing="$(grep '^# Depends on:' Pkgfile | cut -d' ' -f4-)"
> new="$(finddeps $(basename $PWD) | cut -d' ' -f1 | sed -e '/\(glibc\|binutils\|gcc\)/d' | xargs)"
> sed -i -e "s/^# Depends on: /& $existing $new/" Pkgfile
> findredundantdeps -s -f $(basename $PWD)
> cd - >/dev/null
> done
$ prt-get deptree steam-native-runtime
-- dependencies ([i] = installed, '-->' = seen before)
[i] steam-native-runtime
[i] brotli-32
[i] brotli
[i] cmake
[i] curl
[i] openssl
[i] zlib
[i] libarchive
@therealromster
therealromster / ports-1.5_permissions.patch
Created February 27, 2019 07:55
crux ports permisions as user pkgmk
diff -pruN ports-1.5.orig ports-1.5
--- ports-1.5.orig/ports.in 2004-03-08 07:55:24.000000000 +1100
+++ ports-1.5/ports.in 2009-01-14 16:53:29.000000000 +1100
@@ -118,6 +118,11 @@
fi
}
+fix_permissions() {
+ chown -R pkgmk:pkgmk "${PORTS_DIR}"
+ find "${PORTS_DIR}" -type d -exec chmod 0775 {} \;