Actualización

Se han reorganizado la ubicación de los archivos para tener un mejor control de ellos
This commit is contained in:
Tuxliban Torvalds 2021-07-10 00:57:25 -05:00
parent b51ca8b96d
commit fe2076daba
114 changed files with 62894 additions and 0 deletions

394
Guías/Chroot.md Normal file
View File

@ -0,0 +1,394 @@
# **GUÍA CHROOT VOID LINUX**
## Autores
### Telegram
* @tenshalito Tuxliban Torvalds
* @lumaro Luis
-----
### **ÍNDICE**
* [Indroducción](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#1-introducci%C3%B3n)
* [Preparar el sistema de archivos](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#2-preparar-el-sistema-de-archivos)
* [Crear punto de montaje para el nuevo sistema de archivos (raíz)](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#3-crear-punto-de-montaje-para-el-nuevo-sistema-de-archivos-ra%C3%ADz)
* [Instalación del sistema](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#4-instalaci%C3%B3n-del-sistema)
* [XBPS](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#4-1-xbps)
* [Tarball rootfs](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#4-2-tarball-rootfs)
* [Configuración](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#5-configuraci%C3%B3n)
* [Configurar jaula chroot](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#5-1-configurar-jaula-chroot)
* [Instalación de sistema (ROOTFS)](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#5-1-1-instalaci%C3%B3n-de-sistema-rootfs)
* [Configuración de la instalación](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#5-2-configuraci%C3%B3n-de-la-instalaci%C3%B3n)
* [Crear la contraseña para la cuenta de root](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#5-3-crear-la-contrase%C3%B1a-para-la-cuenta-de-root)
* [Establecer permisos para la cuenta de root](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#5-4-establecer-permisos-para-la-cuenta-de-root)
* [Configurar el fichero fstab](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#5-5-configurar-el-fichero-fstab)
* [Instalación del kernel](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#6-instalaci%C3%B3n-del-kernel)
* [Configurar archivos de arranque](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#6-1-configurar-archivos-de-arranque)
* [Instalación de GRUB](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#7-instalaci%C3%B3n-de-grub)
* [Para sistemas BIOS](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#para-sistemas-bios=)
* [Para sistemas EFI](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#7-2-para-sistemas-efi)
* [Finalización](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#8-finalizaci%C3%B3n)
* [Referencias](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Chroot.md#9-referencias)
-----
## 1. Introducción
El método de instalación mediante chroot en lugar de la instalación por defecto mediante el menú basado en ncurses, nos aportará un mayor control sobre los paquetes y configuración que se instalarán en nuestro sistema.
Chroot o *Change root* es una utilidad de Unix empleada principalmente para crear un nuevo entorno conocido como "jaula chroot", separado lógicamente del directorio raíz del sistema principal. Uno de los usos principales del enjaulamiento es crear un sistema Linux independiente encima del sistema huesped que se utiliza para llevar a cabo esta tarea. Explicado y expuesto el método, se expondrá la medología para realizar este tipo de instalación montando la jaula Chroot desde distintas fuentes para adquirir nuestro sistema.
Void permite al usuario poder instalar el sistema a través de dos métodos siguiendo la metodología de chroot. El primero es realizarlo utilizando el gestor de paquetes XBPS y descargar el sistema base y paquetes apoyándose de un sistema host (Glibc o Musl) y el segundo método es hacerlo descomprimiendo un tarball de ROOTFS obteniendo un sistema host que permita ingresar a una jaula chroot. Un tercer método, fuera del alcance de esta guía es compilando desde fuentes todo el sistema mediante XBPS-SRC, instalación más compleja que merece una guía a parte.
Antes de comenzar el proceso de instalación, debemos fijarnos si el comando se debe ejecutar como root, precedido de #, o bien como usuario del sistema, precedido por $. Aclarado esto, estamos preparados para abordar la instalación.
-----
## 2. Preparar el sistema de archivos
Antes de comenzar con la instalación del sistema, es necesario llevar a cabo el proceso de particionamiento del disco. En nuestro caso nos apoyaremos de crear las particiones de la herramienta [cfdisk](https://man.voidlinux.org/cfdisk.8) que está incluída en las ISOs que distribuye Void.
Para nuestro ejemplo consideraremos que el sistema estará compuesto de cuatro particiones:
1. /boot
2. /
3. /home
4. swap
Ante cualquier duda sobre qué tamaño asignar a la partición swap, en este [link](https://docs.voidlinux.org/installation/live-images/partitions.html#swap-partitions) podrán ver algunas recomendaciones.
**NOTA:** En sistemas de arranque UEFI será necesario contar con una partición de por lo menos unos 200 MB y estar formateada en FAT32.
Procedemos a formatear las particiones:
`# mkfs.vfat /dev/sdaX` ← Partición para /boot
`# mkfs.ext4 /dev/sdaY` ← Partición para /
`# mkfs.ext4 /dev/sdaZ` ← Partición para /home
`# mkswap /dev/sdaW` ← Partición para swap
-----
## 3. Crear punto de montaje para el nuevo sistema de archivos (raíz)
Dado que esta guía se basa en el supuesto de que la tabla de particiones es tipo GPT, entonces será necesario de un punto de montaje especial para el sistema EFI. Para ello montaremos primero la partición que se ha designado para el sistema raíz:
# mount /dev/sdaY /mnt
Crear el punto de montaje para el sistema EFI y montar la partición
# mkdir -p /mnt/boot/efi
# mount /dev/sdaX /mnt/boot/efi
Activar el área de intercambio (swap)
# swapon /dev/sdaW
Montar la partición que se ha designado para el home del usuario:
# mkdir /mnt/home
# mount /dev/sdaZ /mnt/home
**Nota:** Después de haber montado todas las particiones que usaremos en el sistema, opcionalmente se puede exportar a texto plano cómo están distribuidas las particiones para que cuando estemos en la jaula chroot terminemos de editarlo y usarlo como nuestro fstab de forma sencilla:
# lsblk -o NAME,UUID,MOUNTPOINT,FSTYPE > /mnt/etc/fstab
-----
## 4. Instalación del sistema
Como se mencionó anteriormente, Void Linux puede instalarse mediante chroot siguiendo dos métodos: a través de XBPS descargando el sistema del repositorio o descomprimiendo un tarball que ya contiene un sistema base.
### 4.1 XBPS
Si escogió este método, tendrá que elegir el mirror más cercano a usted. Para ver cuáles están disponibles consulte este [artículo](https://docs.voidlinux.org/xbps/repositories/mirrors/index.html)
**NOTA:** Si desea instalar la versión de *Void + Glibc*, añadir al final del mirror seleccionado `/current`; si desea instalar la versión de *Void + Musl* añadir al final del mirror seleccionado `/current/musl`.
Cabe mencionar que Musl es una implementación de libc que se esfuerza por ser liviana, rápida, simple y correcta. Void admite oficialmente musl al usarlo en su base de código para todas las plataformas de destino (aunque los paquetes binarios no están disponibles para i686). Además, todos los paquetes compatibles de los repositorios oficiales están disponibles con binarios vinculados a musl además de sus equivalentes glibc. En caso de que opten por instalar la versión compilada para musl, tener en cuenta, que algunos binarios de los repositorios *non-free*, no estarán disponibles para esta versión, por lo tanto si busca una mejor compatibilidad se recomienda altamente instalar la versión con glibc. Por ejemplo si desea utilizar los drivers privativos de Nvidia.
Para comenzar a descargar el sistema, es necesario indicarle a *XBPS* qué arquitectura se necesita, es decir *x86_64, x86_64-musl o para i686*. ¡Claro, Void Linux también da soporte para arquitecturas de 32 Bits!
Dependiendo de la aquitectura que haya elegido y tomando como ejemplo que se seleccionó el mirror de Alemania, proceder del siguiente modo:
1. Para la versión con glibc:
`export XBPS_ARCH=x86_64 && xbps-install -S -R https://alpha.de.repo.voidlinux.org/current -r /mnt base-minimal`
2. Para la versión con musl:
`export XBPS_ARCH=x86_64-musl && xbps-install -S -R https://alpha.de.repo.voidlinux.org/current/musl -r /mnt base-minimal`
**NOTA 1:** Void Linux provee al usuario de tres opciones para tomar como base la construcción del sistema:
1. *base-minimal:* Metapaquete con las herramientas mínimas para el sistema
2. *base-system:* Metapaquete del sistema base que viene con las ISO's que provee Void
3. *base-voidstrap:* Conjunto de herramientas necesarias para crear contenedores o jaulas chroot
**NOTA 2:** Si se instaló el paquete *base-minimal*, quizá desee instalar algunos paquetes extras para que el sistema funcione correctamente, es decir, paquetes que brinden funciones como soporte de wifi, detección de periféricos, etc.
**NOTA 3:** Algunas de las funciones que desearía habilitar si optó por el paquete *base-minimal* se consigue instalando paquetes como los siguientes:
* nano/vim - editor de texto cli de su preferencia
* less paginador de archivos de texto
* man-pages manuales
* e2fsprogs Utilidades de sistema de archivos para ext2, ext3 y ext4 (badbloks, blkid, fsck)
* procps-ng Utilidades para monitorizar el sistema y sus procesos (free, pkill, top, etc)
* pciutils Conjunto de programas para enumerar dispositivos PCI (lspci)
* usbutils Utilidades para mostrar información de buses USB (lsusb)
* iproute2 Programas para redes básicas y avanzadas en IPV4 (ip, bridge, ifstat,etc)
* util-linux Diversos programas de utilidad (blkid, dmesg,kill, mkfs, mount, etc)
* kbd Fuentes de consola y utilidades de teclado (setfont, fgconsole, loadkeys, etc)
* wifi-firmware - Metapaquete con driver para tarjetas *ipw2100, ipw2200, zd1211*
* ethtool Utilidades para examinar controladores y hardware de red
* kmod Utilidades para cargar módulos del núcleo (depmod, lsmod, modprobe, etc)
* traceroute - Rastrea la ruta tomada por los paquetes a través de una red IPv4 / IPv6
* iputils - Utilidades eficaces para redes Linux (incluido ping)
**NOTA 4:** Al instalar *base-system* tener en cuenta que se tiene menos control de los paquetes instalados para el sistema ya que de manera predeterminada instala los metapaquetes *linux, linux-firmware, wifi-firmware*, además de un paquete que no es de mucha utilidad: *void-artwork*
Por lo tanto, con una instalación mínima es posible escoger qué paquetes realmente necesita y no tener en el sistema paquetes que nunca utilizará (*linux-firmware-amd linux-firmware-nvidia linux-firmware-intel ipw2100-firmware ipw2200-firmware zd1211-firmware*) o una versión de kernel que reemplazará después.
### 4.2 Tarball rootfs
Descargar del siguiente [link](https://alpha.de.repo.voidlinux.org/live/current/) la versión que desea instalar: glibc o musl.
**NOTA:** Para la arquitectura de i686 no está disponible una versión con musl
Una vez seleccionado el tarball proceder a descomprimirlo en la partición que será asignda para el directorio raíz:
# tar xvf <ROOTFS_VERSIÓN>.tar.xz -C /path
**NOTA:** Reemplazar *path* por la ruta que han definido para la construcción del sistema
-----
## 5. Configuración
A partir de estos pasos y exceptuando la instalación base del sistema usando un tarball, la metodología aplicará a ambos métodos, tanto para XBPS como para ROOTFS.
### 5.1 Configurar jaula chroot
Montar los directorios **sys dev proc** para el correcto funcionamiento de la jaula chroot:
# for i in sys dev proc; do $(mount --rbind /$i /mnt/$i && mount --make-rslave /mnt/$i); done
También será necesario copiar el fichero resolv.conf del sistema anfitrión ya que contiene la configuración de DNS necesarios para que XBPS descargue los paquetes más recientes dentro de la jaula recien creada:
# cp /etc/resolv.conf /mnt/etc
Se procede a ingresar a la jaula chroot y para mayor comodidad se cambia el prompt para recordarnos que lo estamos usando. Así mismo, se establece a *bash* como shell de trabajo durante la instalación y configuración,
# PS1='(chroot) # ' chroot /mnt /bin/bash
#### 5.1.1 Instalación de sistema (ROOTFS)
Debido a que los tarball no tienen una fecha de publicación reciente, suelen estar desactualizados, por lo que una vez que se ha extraido el contenido en la partición que se utilizará como directorio raíz, hay que proceder a actualizar los paquetes:
# xbps-install -uy xbps
# xbps-install -Suy
### 5.2 Configuración de la instalación
Crear el hostname para la nueva instalación:
# echo HOSTNAME > /etc/hostname
Editar el fichero rc.conf del sistema que se está configurando. Para que el sistema lea esas configuraciones será necesario eliminar '#' que está al inicio de cada una de las líneas respectivas.
Para llevar a cabo esta tarea, utilice el editor [VI](https://man.voidlinux.org/nvi.1) que viene incluído en el chroot. Para introducir texto presione la tecla **i** de insertar o la tecla **a** de añadir. Para salir del modo edición presione la tecla **Esc**
# vi /etc/rc.conf
HOSTNAME="foo"
HARDWARECLOCK="UTC"
TIMEZONE="America/Mexico_City" <-- Ejemplo para México / "Europe/Madrid" <-- Ejemplo para España
KEYMAP="la-latin" <-- Distribución de teclado para español latinoamericano / "es" <-- Distribución para español
Una vez haya finalizado de editar, para guardar los cambios presione las teclas **:wq** y después la tecla **Enter**
Para conocer más zonas horarias (TIMEZONE) liste las ubicaciones con:
# ls -l /usr/share/zoneinfo/
Como se darán cuenta, mostrará directorios con los continentes disponibles, por lo que deben de ubicar la ruta completa para reemplazarla en el ejemplo que se muestra arriba.
La distribución de teclado para las consolas virtuales en español España se añade reemplazando *la-latin* por **es**.
NOTA: Si se optó por instalar la versión de Void con glibc, hay que editar el fichero */etc/default/libc.locales* y descomentar quitando el símbolo **#** del entorno de [locales](https://docs.voidlinux.org/config/locales.html) que desee. Se recomienta altamente utilizar las opciones UTF.
LANG=es_MX.UTF-8 <-- Configuración para México
LANG=es_ES.UTF-8 <-- Configuración para España
Generar los archivos locales (sólo para glibc)
# xbps-reconfigure -f glibc-locales
### 5.3 Crear la contraseña para la cuenta de root
# passwd
### 5.4 Establecer permisos para la cuenta de root
# chown root:root /
# chmod 755 /
### 5.5 Configurar el fichero fstab
#### 5.5.1 Modo avanzado
El fichero fstab (File System TABle) es el encargado de montar las particiones en cada inicio del sistema. Su configuración inicial se puede generar tomando como base las particiones que se tengan montadas en el fichero */proc/monts*, así que se procederemos a copiar dicho fichero en nuestra jaula chroot:
# cp /proc/mounts /etc/fstab
**NOTA:** Una vez que se ha copiado el fichero hay que editarlo y eliminar las líneas que hacen referencia a *proc, sys, devtmpfs* y *pts*.
Con ayuda de la herramienta [blkid](https://man.voidlinux.org/blkid.8) podremos identificar el UUID de cada una de las particiones que serán parte de nuestro sistema. Ejecutamos el programa así:
# blkid
Si tiene más de un disco duro conectado, entonces especificar cuál es el que se desea analizar. Por ejemplo:
# blkid /dev/sda
# blkid /dev/sdc
El sistema devolverá algo parecido a esto:
```
/dev/sda1: UUID="7EE1-A537" TYPE="vfat" PARTLABEL="EFI" PARTUUID="b35386b0-30d8-4d9d-9bc1-b02e78a2c708"
/dev/sda2: UUID="39b09ece-b3c5-4d72-b8a2-7f1611504820" TYPE="ext4" PARTLABEL="GRUB" PARTUUID="824a24e5-5795-4a98-9977-1e534e480fa6"
/dev/sda3: UUID="b7c453a3-332b-4feb-9e57-29a3c08f6fb5" TYPE="ext4" PARTLABEL="tmp" PARTUUID="12e852ce-79cc-4447-a8a0-d93c41b1967a"
/dev/sda4: UUID="95abee86-9bcf-40d6-83bd-2afd30e78e90" PARTLABEL="swap" PARTUUID="e4f25f1c-f74b-487b-9413-0f43a1ac1a99"
```
Ahora que ya se conoce la UUID de cada una de las particiones reemplazarlas en nuestro fstab para que quede de la siguiente manera:
```
# <UUID> <dir> <type> <options> <dump> <pass>
UUID=39b09ece-b3c5-4d72-b8a2-7f1611504820 / ext2 defaults 0 1 # Partición raíz
UUID=7EE1-A537 /boot/efi vfat defaults 0 2 # Partición de arranque
UUID=b7c453a3-332b-4feb-9e57-29a3c08f6fb5 /home ext4 defaults 0 2 # Partición home
UUID=95abee86-9bcf-40d6-83bd-2afd30e78e90 none swap sw 0 0 # Área de intercambio
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0 # Sistema de archivos virtual para almacenar archivos en memoria RAM
```
Al configurar el fstab (File System TABle), es necesario asignar el valor de 1 para la entrada de la partición del directorio raíz (columna pass) y asignar un 2 para las demás particiones exeptuando a la partición swap y para tmpfs (ver más detalles [aquí](https://man.voidlinux.org/fsck.8))
La ventaja de configurar el fstab de este modo es que las particiones serán detectadas por el sistema incluso si tuvieran un nombre y se les modificara más adelante.
#### 5.5.2 Modo sencillo
Ahora procederemos a terminar de editar el fichero fstab. Como recordarán, antes de ingresar a la jaula chroot se creó un fichero en texto plano que contiene información que usaremos para definir las particiones que usará el sistema. Procedemos a abrir el fichero y a editarlo:
# vi /etc/fstab
Comenzamos añadiendo una almohadilla **#** al inicio de la palabra *NAME* para que no sea leída por el sistema y se procede a eliminar las líneas que no se utilizarán teniendo cuidado de no borrar las que se usarán para el sistema:
```
#NAME UUID MOUNTPOINT FSTYPE
loop0 squashfs # Eliminar línea
loop1 xxxxx /run/rootfsbase ext # Eliminar línea
sda xxxxx iso9660 # Eliminar línea
sda1 xxxxx /run/initramfs/live iso9660 # Eliminar línea
sda2 ... # Eliminar línea
sdb xxxxx # Eliminar línea
sdb1 xxxxx /mnt/boot/efi vfat
sdb2 xxxxx /mnt ext4
sdb3 xxxxx [SWAP] swap
sdb4 xxxxx /mnt/home ext4
sdb5 xxxxx xxxxx xxx
```
Para la creación del fichero fstab y fácil lectura nos apoyaremos de usar columnas. Para ello nos aseguraremos de tener en la primera línea los siguientes nombres: UUID MOUNTPOINT FSTYPE OPTIONS DUMP PASS y procedemos a hacer lo siguiente:
1. Eliminar la columna **NAME** que corresponde al nombre y número de partición
2. Añadir **UUID=** antes de la serie alfanumérica que corresponde a cada uuid
3. Colocar a la partición raíz **/** en la parte superior
4. Eliminar la palabra **mnt** de la columna *MOUNTPOINT*
5. Reemplazar *[SWAP]* por **none**
6. Añadir la palabra **defaults** en la columna *OPTIONS* para todas las particiones exceptuando a la partición SWAP a la cual se le añadirá `rw,noatime,discard`
7. En la columna *PASS* añadir **1** para la partición raíz; **0** (cero) para la partición swap, así como para el directorio `/tmp`; y añadir **2** para la partición `/boot /home` o cualquier otra que también hayan definido
8. Añadir una línea adicional para montar al directorio **/tmp** en la ram. En la columna **UUID** poner `tmpfs` en lugar de UUID
Tras haber realizado lo anterior, el resultado debería verse similar a este ejemplo:
```
#UUID MOUNTPOINT FSTYPE OPTIONS DUMP PASS
UUID=xxxx / ext4 defaults 0 1 # Partición raíz
UUID=xxxx /boot/efi vfat defaults 0 2 # Partición sistema EFI
UUID=xxxx none swap rw,noatime,discard 0 0 # Partición swap
UUID=xxxx /home ext4 defaults 0 2 # Partición home
tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0 # Partición de tmp montada en la ram
```
-----
## 6. Instalación del kernel
Si no eligió instalar el paquete *base-system* entonces puede continuar con este paso, de lo contrario omitirlo y continuar con el siguiente punto ya que el paquete *base-system* ya incluye un kernel.
# xbps-install linuxX.XX dracut
**NOTA:** Si compilará módulos para el kernel entonces también será necesario instalar los *headers* de la misma versión del kernel que desee:
# xbps-install linux-headersX.XX
Reemplazar X.XX por la serie del kernel que desea instalar
**NOTA:** Si su sistema necesita firmware adicional, es el momento de instalarlo, en otro caso puede que el sistema no arranque correctamente por falta de dichos controladores:
# xbps-install linux-firmware-XXX
Dependiendo de su sistema, tendrá que instalar un paquete o varios, las opciones de firmware son *linux-firmware-amd linux-firmware-intel linux-firmware-network linux-firmware-nvidia*
### 6.1 Configurar archivos de arranque
# xbps-install -fy linuxX.XX
-----
## 7. Instalación de GRUB
Usar el comando [grub-install](https://www.gnu.org/software/grub/manual/grub/html_node/Installing-GRUB-using-grub_002dinstall.html) para instalar GRUB en el disco de arranque:
### 7.1 Para sistemas BIOS
```
# xbps-install -y grub
# grub-install --target=i386-pc /dev/sdX
```
### 7.2 Para sistemas EFI
```
# xbps-install -y grub-x86_64-efi
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id="Void"
```
-----
## 8. Finalización
Utilice el comando [xbps-reconfigure](https://man.voidlinux.org/xbps-reconfigure.1) para asegurar que todos los paquete que se han instalado han sido configurados apropiadamente:
# xbps-reconfigure -fa
El comando anterior hará que dracut genere un initramfs el cual hará que grub genere una configuración de trabajo. En este punto la instalación del sistema ya está completa, por lo que lo único que resta es salir de la jaula chroot y reiniciar el sistema:
# exit
# umount -R /mnt
# shutdown -r now
-----
## 9. Referencias
* GNU Operating System (s.f.) Installing GRUB using grub-install. Sitio web de Manual Page Search Parameters:https://www.gnu.org/software/grub/manual/grub/html_node/Installing-GRUB-using-grub_002dinstall.html
* Void Linux (2009). FSCK(8). Sitio web de Manual Page Search Parameters: https://man.voidlinux.org/fsck.8
* Void Linux (2014). CFDISK(8). Sitio web de Manual Page Search Parameters: https://man.voidlinux.org/cfdisk.8
* Void Linux (2019). XBPS-RECONFIGURE(1). Sitio web de Manual Page Search Parameters:https://man.voidlinux.org/xbps-reconfigure.1
* Void Linux (2020). Download installable base live images and rootfs tarballs. Sitio web de Download: https://alpha.de.repo.voidlinux.org/live/current/
* Void Linux (s.f.). Mirrors. Sitio web de Handbook's Void: https://docs.voidlinux.org/installation/live-images/partitions.html#swap-partitions
* Void Linux (s.f.). Partition notes. Sitio web de Handbook's Void: https://docs.voidlinux.org/installation/live-images/partitions.html#swap-partitions
* Void Linux. (2013). BLKID(8). Sitio web de Manual Page Search Parameters: https://man.voidlinux.org/blkid.8

View File

@ -0,0 +1,272 @@
# CREATING A GLIBC CONTAINER IN VOID MUSL
-----
## Authors
Telegram
* @tenshalito Tuxliban Torvalds
* @lumaro Lumaro
-----
## Introduction
When the Musl version of Void is installed, some users may have noticed that there are some programs that cannot be used natively due to the incompatibility of the standard Glibc and Musl C libraries. (Anonymous, 2015).
Musl is a lighter, faster, simpler, free implementation of the C standard, striving for compliance and security.
Void officially supports Musl for all platforms except i686. All packages provided through the official repositories are available with Musl binaries, in addition to their Glibc equivalents.
As Glibc is almost a standard in most GNU / Linux distributions, it is almost 100% sure that the software is compiled with it. Fortunately, Void offers the user to choose which C standard they want to install: Musl and Glibc, as well as the installation mode: Void-live or chroot, through tarball or through the download of the different system bases available from the repository: base -chroot, base-minimal, base-system, or base-voidstrap.
-----
## Creating the sandbox (container)
As mentioned above, if the Musl version is used in Void (or another distro that supports this library) they will not be able to run binaries that do not have an open source license or similar. It will even be impossible to try running i686 (32-bit) architecture programs.
Therefore, when creating a container, the options or advantages that we will have is that you can run all the packages available for the Void + Glibc version, or install development tools to do and undo whatever you want without fear of breaking the main system.
As mentioned on the Void site, with the base-voidstrap metapackage an isolated environment will be created in a directory of our system (Void, 2017). Therefore, we proceed with the following steps:
1.- Create the directory to be used as the container:
```
sudo mkdir -p /glibc
```
2.- Download and install the base-voidstrap metapackage in the directory created in the previous step:
```
sudo env XBPS_ARCH=x86_64 xbps-install --repository=http://alpha.de.repo.voidlinux.org/current -r /glibc -S base-voidstrap
```
You may wonder what does the command line above mean?
3.- Well, it means the following:
* **sudo:** Required to be able to scale write permissions to the root directory.
* **env:** Because sudo is being used, this command is required to execute run xbps-install with the environment variables modified without being affected by those that are set by default by the system.
* **XBPS_ARCH=x86_64:** When using the version of Void with Musl, you must download the version of Glibc also for 64-bit architectures. So with this version it will also be possible to run 32-bit programs.
* **--repository=http://alpha.de.repo.void.linux.org/current:** The mirror that will be used to download the necessary packages. It can be modified and configured by someone who is closer to the user.
* **-r /glibc:** It is the "root" directory where the executables will be stored.
* **base-voidstrap:** It's the metapackage used to create containers. Contains basic programs for minimalist operation.
4.- When executing the command line of step two, the system will ask the user if they want to import the fingerprint of the package that they want to install.
![01](Images/01.png)
 *You have to accept to continue with the installation*
![02](Images/02.png)
***Author's note:** I replaced sudo with doas*
5.- Once you have configured and installed the necessary packages, you have to create a C program that will help us execute the container binaries.
6.- For obvious reasons, and to identify what we will execute, the name we will give to this program will be glibc.c
![03](Images/03.png)
*We create a file with that name and then we will proceed to edit*
7.- The program called glibc.c will create a new mount namespace. In turn, the rest of the root directory will be reused(Alejandroliu, 2019).
![04](Images/04.png)
```
#define _GNU_SOURCE
#include <stdio.h>
#include <sched.h>
#include <sys/mount.h>
#include <unistd.h>
#define e(n,f) if (-1 == (f)) {perror(n);return(1);}
#define SRC "/glibc"
int main(int argc, const char const *argv[]) {
        const char const *shell[] = { "/bin/sh", NULL };
        // move glibc stuff in place
        e("unshare",unshare(CLONE_NEWNS));
        e("mount",mount(SRC "/usr", "/usr", NULL, MS_BIND, NULL));
        e("mount",mount(SRC "/var/db/xbps", "/var/db/xbps", NULL, MS_BIND, NULL));
        // drop the rights suid gave us
        e("setuid",setreuid(getuid(),getuid()));
        e("setgid",setregid(getgid(),getgid()));
        argv++;
        if (!argv[0]) argv = shell;
        e("execv",execvp(argv[0], argv));
}
```
8.- Now the next step is to compile and install the program.
a) We compile the code as follows:
```
gcc -s -o glibc glibc.c
```
![05](Images/05.png)
*Note: It will show us these warnings that, for our purposes, are not serious.*
b) Put the binary in a directory that appears within our path. In this case it will be in the root directory of the system executables:
```
doas cp glibc /usr/bin
```
![06](Images/06.png)
c) Now for the binary to work correctly you have to change its ownership to administrator (root)
```
doas chown root:root /usr/bin/glibc
```
![07](Images/07.png)
d) The user or group ID is set on execution and is assigned execution permissions:
```
doas chmod +sx /usr/bin/glibc
```
![08](Images/08.png)
*Including the + sign adds the specified properties*
9.- Now we install a package that cannot be natively run in Musl such as MEGAsync, openshot or dropbox (precompiled binary from the official dropbox site)
a) First we enter the container calling the binary that we previously created.
**Note:** In case you have configured bash or another shell as default, when you write the name of the glibc binary in the console, it will automatically change to dash
```
glibc
```
b) We proceed to change from user to administrator (root) in order to update the system (if updates are available), or install packages
```
su
xbps-install -Su
```
![09](Images/09.png)
c) For this example we will install MEGAsync which, according to your template, cannot be built for use with Musl (Johnnynator, 2019)
![10](Images/10.png)
*In the template it is clearly appreciated that both for musl and ppc, this package cannot be built*
```
xbps-install --repository=/path/ foo
```
**Author's note:** replace /path with the absolute path of the package you want to install in case you have created a binary using xbps-src and replace foo with the package name
![11](Images/11.png)
*We proceed to install the package that was previously built using xbps-src*
![12](Images/12.png)
d) Now to run the binary it can be done in two ways:
I. Run it from the container:
i. We leave the administrator account with exit or with the key combination *ctrl d*
ii. We run it from the console emulator
```
megasync
```
![13](Images/13.png)
*If you want to leave the program in the background, just add an & at the end of the command line*
II. Run it from the host system (Musl)
i. Directly from the host system console emulator write:
```
glibc megasync
```
![14](Images/14.png)
*As in the previous case, if you want to leave the process in the background add a **&***
**Another example of running Vivalvi in Void Musl**
![15](Images/15.png)
-----
## Endnotes
* The installation and execution process of compiled binaries for the Glibc library will be the same.
* If desired, you can add shortcuts or keyboard shortcuts, but the process will depend on the configuration and desktop that the user has.
-----
## Anexxes
If you want to install the following packages, install their respective dependencies as well
1. Telegram
```
# xbps-install libdrm libICE libSM
```
2. Brave
```
# xbps-install nss at-spi2-atk libgbm alsa-lib gtk+3
```
3. Palemoon
```
# xbps-install libvpx alsa-lib dbus-glib libXt gtk+
```
4. Zoom meeting
```
# xbps-install fontconfig glib libpulseaudio libSM libX11 libxcb libXcomposite libXfixes libXi libXcursor xcb-util-keysyms xcb-util-image nss libxshmfence libXrender libXrandr qt5-quickcontrols qt5-script mesa mesa-dri libxslt
```
5. Dropbox
```
# xbps-install libglapi libxshmfence libXxf86vm qt5dxcb-plugin
```
-----
## References
* Alejandroliu. (2019). Void Glibc in Musl. Github [Website]: https://github.com/alejandroliu/0ink.net/blob/master/snippets/void-glibc-in-musl/glibc.c
* Anonymous. (August 16th, 2015). Difference between Musl and non-Musl ISOs? Reddit [Website]. https://www.reddit.com/r/voidlinux/comments/3h8aug/difference_between_musl_and_nonmusl_isos/
* Jonnynator. (2019). Megasync/template. Github [Website]:  https://github.com/void-linux/void-packages/blob/master/srcpkgs/MEGAsync/template
* Voidlinux (2017). The Advent of Void: Day 4: containers. Voidlinux [Website]: https://voidlinux.org/news/2017/12/advent-containers.html
-----
GUIDE TO CREATING A GLIBC CONTAINER IN VOID MUSL by [Tuxliban Torvalds in collaboration with Lumaro ](https://www.dropbox.com/s/4nbh5f1xva84h1m/Contenedor_Void.pdf?dl=0)is distributed under a [Creative Commons Attribution Share-Alike 4.0 International License.](http://creativecommons.org/licenses/by-sa/4.0/)
Based on a work in https://github.com/alejandroliu/0ink.net/blob/master/snippets/void-glibc-in-musl/glibc.c

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

693
Guías/Postinstall.md Normal file
View File

@ -0,0 +1,693 @@
# **Guía de instalación *postinstall* para Void Linux**
## Autores
### Telegram
* @tenshalito Tuxliban Torvalds
* @lumaro Luis
-----
## **ÍNDICE**
* [Creación de usuario normal](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#1-creaci%C3%B3n-de-usuario-normal)
* [Establecer contraseña de usuario](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#1-1-establecer-contrase%C3%B1a-de-usuario)
* [Permisos administrativos para la cuenta de usuario](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-permisos-administrativos-para-la-cuenta-de-usuario)
* [sudo](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-1-sudo)
* [Usuario normal con permisos de superusuario](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-1-1-usuario-normal-con-permisos-de-superusuario)
* [Añadir usuario al grupo wheel](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-1-2-a%C3%B1adir-usuario-al-grupo-wheel)
* [doas](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-2-doas)
* [Instalación](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-2-1-instalaci%C3%B3n)
[2.2.1.1 Eliminar sudo (opcional)](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-2-1-1-eliminar-sudo-opcional)
* [Usuario normal con permisos de superusuario](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-2-2-usuario-normal-con-permisos-de-superusuario)
* [Activar persistencia en doas](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-2-3-activar-persistencia-en-doas)
* [No ingresar la contraseña](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-2-4-no-ingresar-la-contrase%C3%B1a)
* [Permisos específicos para usuarios](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-2-5-permisos-espec%C3%ADficos-para-usuarios)
* [Negar la ejecución de comandos](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#2-2-6-negar-la-ejecuci%C3%B3n-de-comandos)
* [Sevicios de runit](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#3-sevicios-de-runit)
* [Conexión a internet](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#4-conexi%C3%B3n-a-internet)
* [Ethernet](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#4-1-ethernet)
* [Conexión inalámbrica](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#4-2-conexi%C3%B3n-inal%C3%A1mbrica)
* [wpa_supplicant](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#4-2-1-wpa_supplicant)
* [NetworkManager](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#4-2-2-networkmanager)
* [Configuración de mirrors y repositorios](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#5-configuraci%C3%B3n-de-mirrors-y-repositorios)
* [Selección de mirror](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#5-1-selecci%C3%B3n-de-mirror)
* [Instalación de repositorios](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#5-2-instalaci%C3%B3n-de-repositorios)
* [Interfaz gráfica de usuario](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-interfaz-gr%C3%A1fica-de-usuario)
* [Instalar xorg (servidor gráfico)](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-1-instalar-xorg-servidor-gr%C3%A1fico)
* [Drivers de video](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-1-1-drivers-de-video)
* [Window manager](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-2-window-manager)
* [Entorno de escritorio](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-3-entorno-de-escritorio)
* [Cinnamon Desktop](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-3-1-cinnamon-desktop)
* [Enlightenment Desktop](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-3-2-enlightenment-desktop)
* [Desktop](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-3-3-lxde-desktop)
* [LXQT Desktop](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-3-4-lxqt-desktop)
* [MATE Desktop](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-3-5-mate-desktop)
* [XFCE Desktop](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-3-6-xfce-desktop)
* [Budgie Desktop](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-3-7-budgie-desktop)
* [GNOME Desktop](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-3-8-gnome-desktop)
* [PLASMA Desktop](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-3-9-plasma-desktop)
* [Lumina Desktop](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-3-10-lumina-desktop)
* [Instalar un gestor de inicio](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-4-instalar-un-gestor-de-inicio)
* [GDM](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-4-1-gdm)
* [LightDM](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-4-2-lightdm)
* [LXDM](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-4-3-lxdm)
* [SDDM](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-4-4-sddm)
* [SLIM](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-4-5-slim)
* [Inicio manual a través del comando startx](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-5-inicio-manual-a-trav%C3%A9s-del-comando-startx)
* [Autologin e inicio automático de X11](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-6-autologin-e-inicio-autom%C3%A1tico-de-x11)
* [Configuración de teclado](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-7-configuraci%C3%B3n-de-teclado)
* [Panel táctil (opcional)](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#6-8-panel-t%C3%A1ctil-opcional)
* [Ajustar brillo de pantalla](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#7-ajustar-brillo-de-pantalla)
* [Brillo de pantalla](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#7-1-brillo-de-pantalla)
* [Instalación](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#7-2-instalaci%C3%B3n)
* [Uso de light](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#7-3-uso-de-light)
* [Fuentes](https://git.disroot.org/tuxliban/tutoriales_void/src/branch/master/Postinstall.md#8-fuentes)
-----
## 1. Creación de usuario normal
Para añadir la cuenta de nuestro usuario se requiere del programa [useradd](https://man.voidlinux.org/useradd.8). Con ayuda de éste agregaremos nuestra cuenta a los grupos que sean necesarios, también debemos definir la contraseña de esta cuenta. Procedemos a crear la cuenta y añadirla a varios grupos del siguiente modo. Para un correcto funcionamiento del sistema, prestad atención a los grupos en los que debe estar presente el usuario:
# useradd -m -s /bin/bash -U -G wheel,disk,lp,audio,video,optical,storage,scanner,network,xbuilder USUARIO
**NOTA:** Al crear el nombre del usuario asegurarse de que sea con letras **minúsculas**.
Vamos a explicar, brevemente, el significado de cada comando y opción:
1. *useradd:* Comando para crear un nuevo usuario o actualizar información predeterminada del nuevo usuario
2. *-m:* crea el directorio *home* del usuario en caso de que no exista
3. *-s:* asignará la shell predeterminada a la cuenta que se está creando
4. */bin/bash:* Shell seleccionada para el usuario. Aquí puedes asignar otras como *zsh*, *fish*, *oksh*, *loksh* o *mksh* siempre y cuando se instale previamente el shell ya que de manera predeterminada el sistema solo tiene instalados a *dash* y *bash*.
5. *-U:* crea un nuevo grupo con el mismo nombre para del usuario, y agrega al usuario a este grupo
6. *-G:* grupos suplementarios a los que el usuario también formará parte. Cada uno de ellos debe estar separado por una coma y sin espacios entre ellos.
7. *wheel:* grupo utilizado para otorgar permisos administrativos temporales teniendo acceso de lectura y escritura a archivos del sistema
8. *disk:* acceso a dispositivos de alamacenamiento como disquetes, discos duros, ópticos, etc
9. *lp:* acceso a impresoras
10. *audio:* acceso directo al hardware de sonido para todas las sesiones
11. *video:* acceso a dispositivos de captura de video, aceleración de hardware, framebuffer, etc
12. *optical:* acceso a dispositivos óticos como unidades de CD o DVD
13. *storage:* acceso a unidades extraibles como pendrives USB o reproductores MP3; así mismo, permite al usuario montar los dispositivos de almacenamiento
14. *scanner:* acceso a hardware de scáner
15. *network:* grupo necesario para, generalmente, otorgar acceso a NetworkManager o wpa_supplicant para la gestión de las redes
16. *xbuilder:* grupo para poder utilizar el binario `xbps-uchroot` en la construcción de paquetes con `xbps-src`
17. *USUARIO:* reemplazar con el nombre que deseen para la cuenta o cuentas que vayan a a hacer
**NOTA:** Si pretende utilizar *QEMU* para virtualizar otros sistemas, entonces no olvide añadir a su usuario al grupo **`kvm`**
### 1.1 Establecer contraseña de usuario
# passwd USUARIO
-----
## 2. Permisos administrativos para la cuenta de usuario
En los sistemas *unix like*, de manera predeterminada, la cuenta que puede ejercer permisos administrativos siempre es *root*. Para que la cuenta de usuario común pueda ejecutar tareas administrativas como *root*, es necesario otorgarle los permisos necesarios y utilizar una herramienta que permita la escalada de privilegios desde un usuario común a *root*.
Void permite hacer este tipo de tareas a través de dos herramientas: [sudo](https://man.voidlinux.org/sudo.8) y [opendoas](https://github.com/Duncaen/OpenDoas)
### 2.1 sudo
`sudo` es el administrador de sistema predeterminado para delegar permisos de administración en casi todos los sistemas *unix like*.
Para configurar los permisos hay que editar el fichero `/etc/sudoers` y es altamente recomendable utilizar [visudo](https://jlk.fjfi.cvut.cz/arch/manpages/man/visudo.8) y no directamente a otros editores como *nano, vim, mousepad, kate, etc* porque en caso de algún error de sintaxis hará que `sudo` quede inutilizable. Al editarlo con `visudo` éste bloqueará el archivo y guardará los cambios en un archivo temporal para verificar que la sintaxis sea la correcta y después pueda copiarlo al archivo `/etc/sudoers`
De manera predederminada *visudo* tiene asignado a *VI*, sin embargo, es posible cambiarlo por un editor más amigable exportando la variable del editor antes de llamar a visudo. Por ejemplo:
# EDITOR=nano visudo
#### 2.1.1 Usuario normal con permisos de superusuario
Para permitir que la cuenta de usuario normal pueda realizar la escalada de permisos de administrador, es necesario añadir la siguiente línea a la configuración de *sudoers*
# visudo
USUARIO ALL=(ALL) ALL
#### 2.1.2 Añadir usuario al grupo wheel
Para permitir que todos los usuarios miembros del grupo *wheel* puedan ejecutar tareas administrativas descomentarla quitando **#**, al inicio de la línea
# visudo
%wheel ALL=(ALL) ALL
### 2.2 doas
El comando `doas` es simple en su diseño, constrastando con la complejidad del diseño de `sudo`. Para la mayoría de las personas (como @tenshalito y @lumaro), es más que suficiente para las tareas administrativas del sistema.
#### 2.2.1 Instalación
# xbps-install opendoas
##### 2.2.1.1 Eliminar sudo (opcional)
Una vez instalado `doas` se puede eliminar a *sudo* para dejar que el primero se encargue de la escalada de privelagios a *root* para la administración del sistema.
Como *sudo* forma parte del metapaquete `base-system` no es posible eliminarlo de la forma habitual, ya que el sistema mostrará un aviso de conflicto impidiendo su eliminación. Para eliminar *sudo* (o cualquier otro programa que forme parte de `base-system`) hay que añadir la excepción a una lista de paquetes ignorados por **xbps** del siguiente modo.
# echo "ignorepkg=sudo" > /etc/xbps.d/10-ignore.conf
# xbps-remove sudo
**NOTA:** En caso de que el paquete que se desee eliminar tenga dependencias, añadir el *flag* `-R` para eliminar de manera recursiva las dependencias no necesitadas por otros paquetes. Ejemplo:
# xbps-remove -R foo
#### 2.2.2 Usuario normal con permisos de superusuario
Para configurarlo basta con crear y editar el fichero `/etc/doas.conf` del siguiente modo:
# touch /etc/doas.conf
# echo "permit :wheel" > /etc/doas.conf
Lo anterior permitirá que todos los usuarios que se encuentren en el grupo *wheel* puedan ejecutar comandos con permisos de administración.
#### 2.2.3 Activar persistencia en doas
Algo que diferencia a `doas` respecto a `sudo` es que éste último se caracteriza de la persistencia que permite a sus usuarios ingresar la contraseña una vez y no ingresarla de nuevo por un periodo de tiempo corto. Si desea hacer esto con `doas`, entonces añada esto a su configuración:
# echo "permit persist :wheel" >> /etc/doas.conf
#### 2.2.4 No ingresar la contraseña
Si desea nunca tener que ingresar su contraseña añada lo siguiente a la configuración:
# echo "permit nopass :wheel" >> /etc/doas.conf
#### 2.2.5 Permisos específicos para usuarios
Si desea agregar a un usuario en específico para ejecutar tareas administrativas, entonces la configuración debe quedar así:
```
permit nopass USUARIO # No solicitar ingresar contraseña al usuario especificado
permit USUARIO # Solicitar contraseña para tareas que requieran escalar permisos
```
#### 2.2.6 Negar la ejecución de comandos
Si fuera necesario **negar la ejecución de comandos** que requieran permisos de administrador (en caso de que compartan su equipo), pueden hacer una regla sencilla como esta:
```
permit :wheel # Usuarios del grupo wheel pueden escalar permisos
deny USUARIO # Usuario tiene restringida la escalada de permisos incluso si estuviera en el grupo wheel
```
Si sólo se desea restringir la ejecución de por ejemplo reiniciar el sistema entonces se haría así:
```
permit :wheel
deny USUARIO cmd /bin/reboot
```
Para mayor información sobre cómo funciona `doas` consulte los manuales de [doas](https://man.openbsd.org/doas) y [doas.conf](https://man.openbsd.org/doas.conf.5)
-----
## 3. Sevicios de runit
Ahora que ya tiene el sistema funcionando, es un buen momento para revisar qué servicios están ejecutándose actualmente y ver cuáles no necesita. Si no está seguro acerca de un servicio en partícular mejor déjelo activo, sin embargo, las siguientes son relativemente seguras eliminar:
1. Probablemente no necesite tener seis *tty*, por lo que podría eliminarlas y dejar por lo menos una activa para poder iniciar sesión. Como recomendación podría dejar activadas sólo dos *tty's* y eliminar las demás:
```
# rm /var/service/{agetty-tty3,agetty-tty4,agetty-tty5,agetty-tty6}
```
2. Si no planea conectarse a través de *ssh* desde otra computadora, entonces puede elimiar el servicio
```
# rm /var/service/sshd
```
3. Si está utilizando una configuración de red estática, puede eliminar el servicio de *dhcpcd*
```
# rm /var/service/dhcpcd
```
-----
## 4. Conexión a internet
### 4.1 Ethernet
Para una conexión rápida es necesario activar el servicio `dhcpcd`
# ln -s /etc/sv/dhcpcd /var/service
### 4.2 Conexión inalámbrica
Antes de establecer la conexión es necesario revisar que las interfaces no se encuentren bloqueadas, por lo que en caso de estar bloquedas se habilitan con ayuda de [rfkill](https://man.voidlinux.org/rfkill.8):
# rfkill unblock all
#### 4.2.1 wpa_supplicant
**NOTA:** Si instaló el sistema a través de una instalación mínima mediante *base-minimal* o con *base-voidstrap*, entonces instale `wpa_supplicant`.
# xbps-install wpa_supplicant
Si instaló el sistema desde una ISO live o desde una instalación normal desde el paquete *base-system*, entonces no es necesario instalar `wpa_supplicant` ya que viene incluído en las opciones antes mencionadas.
Identificar interfaz:
$ ip link
A continuación, encontrar el ssid (nombre) de las redes inalámbricas disponibles:
# iw dev INTERFAZ scan | grep -i ssid
Configuración wpa_supplicant:
```
# cp /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant-INTERFAZ.conf
$ wpa_passphrase {ssid} {password} | sudo tee -a /etc/wpa_supplicant/wpa_supplicant-INTERFAZ.conf
```
Activar el servicio de wpa_supplicant y de dhcpcd (de ser necesario, instálelo):
# ln -s /etc/sv/{dhcpcd,wpa_supplicant} /var/service/
Establecer conexión:
# wpa_supplicant -B -D wext -i wlp2s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
**NOTA:** *wlp2s0* es el nombre de la interfaz wifi, en su sistema posiblemente sea distinto.
#### 4.2.2 NetworkManager
Instalar el programa:
# xbps-install NetworkManager
Crear una regla *polkit* en el siguiente directorio `/etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules` que contenga lo siguiente:
```
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("network")) {
return polkit.Result.YES;
}
});
```
Por ejemplo usando *vim*
# vim /etc/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules
En caso de que su usuario aún no se encuentre en el grupo *network*, añádalo del siguiente modo:
# gpasswd -a USUARIO network
Desactive los servicios de *dhcpcd* y *wpa_supplicant* en caso de que esté activos ya que ellos y *NetworkManager* son mutuamente excluyentes:
# rm -fr /var/service/{dhcpcd,wpa_supplicant}
Active los siguientes servicios:
# ln -s /etc/sv/{NetworkManager,dbus} /var/service/
Conectarse a la red de su preferencia usando *nmtui*. Le ofrecerá una cómoda interfaz gráfica en modo ncurses
$ nmtui
-----
## 5. Configuración de mirrors y repositorios
### 5.1 Selección de mirror
Dependiendo de la ubicación del usuario, cambiar los mirrors ayudarán seriamente con las velocidades de descarga de los paquetes. Los siguientes son mirrors que se sincronizan directamente desde el *build-master* y, por lo tanto, siempre tendrá los últimos paquetes disponibles.
| **Repositorio** | **Ubicación** |
| :--- | :--- |
| https://alpha.de.repo.voidlinux.org/ | UE: Finlandia |
| https://mirrors.servercentral.com/voidlinux/ | USA: Chicago |
| https://alpha.us.repo.voidlinux.org/ | USA: Kansas, City |
Una vez detectado el mirror más cercano a su localización, proceda a reemplazar el mirror predeterminado en caso de ser necesario.
Primero hay que crear el siguiente directorio que servirá para guardar los mirrors:
# mkdir -p /etc/xbps.d
Después copiar las configuraciones predeterminadas al directorio previamente creado:
# cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
Ahora reemplazar el contenido del mirror predeterminado por el que hayan elegido:
# sed -i 's|https://alpha.de.repo.voidlinux.org|<repositorio>|g' /etc/xbps.d/*-repository-*.conf
Por último, sincronizar el índice del repositorio remoto
# xbps-install -Sf
### 5.2 Instalación de repositorios
Independientemente del repositorio principal que viene activado en una instalación vanilla, Void también proporciona otros dos repositorios para poder ampliar los paquetes disponibles para instalar software, **nonfree** para paquetes cuyas licencias son *no libres*; **multilib** el cual contiene librerías de 32 bits para sistemas de 64 bits.
Para instalar los repositorios proseguir del siguiente modo:
1. Repositorio *nonfree*
```
# xbps-install void-repo-nonfree
# xbps-install void-repo-multilib-nonfree
```
**Nota:** El repositorio *multilib-nonfree* no está disponible para la versión de Void + Musl
2. Repositorio *multilib*
```
# xbps-install void-repo-multilib
```
**Nota:** El repositorio *multilib-nonfree* no está disponible para la versión de Void + Musl
-----
## 6. Interfaz gráfica de usuario
Los siguientes pasos le ayudarán a ejecutar una configuración básica para un WM o para un entorno de escritorio. Los pasos son esencialmente los mismos
### 6.1 Instalar xorg (servidor gráfico)
El paquete *xorg* es un metapaquete que instala todo lo relacionado con Xorg. Dicho paquete le dará un inicio "rápido", pero también llenará su sistema de paquetes innecesarios. Una buena práctica sería instalar el paquete *xorg-minimal* para tener menos dependencias, pero será necesario especificar el controlador de video; o si lo prefiere, instalar todo manualmente para que sepa lo que se instala en el sistema:
# xbps-install xorg-server xauth xinit xf86-input-libinput xf86-video-XXX
#### 6.1.1 Drivers de video
Para identificar qué tipo de tarjeta tenemos instalada en nuestro equipo escribir lo siguiente en la consola:
$ lspci | grep VGA
1. AMD Raedon: `xf86-video-amdgpu`
2. ATI Raedon: `xf86-video-ati`
3. Open source NVIDIA: `xf86-video-noveau`
4. Intel: `xf86-video-intel`
5. Driver genérico: `xf86-video-vesa`
**NOTA:** Tenga en cuenta que el driver `xf86-video-intel` no se requiere en procesadores basados en *Sandy Brige* o en más nuevos
También puede optar por utilizar el driver [modesetting](https://wiki.archlinux.org/index.php/Kernel_mode_setting) que viene incluído en el kernel. Si se decide por esta opción, asegúrese de tener instalado también el paquete `mesa-dri`
### 6.2 Window manager
Existen diferentes tipos de WM que manejan las ventanas de manera diferente. Los más comunes que se suelen usar en Void son los siguientes:
1. Flotante: openbox
2. Tiling: bspwm, i3wm, sway (Wayland)
3. Dynamic: awesome, dwm
### 6.3 Entorno de escritorio
Void Linux cuenta en sus repositorios oficiales con soporte para varios entornos de escritorio. De manera oficial soporta a los siguientes:
1. Cinnamon
2. Enlightenment
3. lxde
4. lxqt
5. Mate
6. xfce
De manera no oficial dispone de:
1. Budgie
2. Gnome
3. Plasma
4. Lumina
#### 6.3.1 Cinnamon Desktop
El escritorio Cinnamon es una bifurcación de GNOME Shell, desarrollado por el proyecto [Linux Mint](https://github.com/linuxmint/cinnamon). Se caracteriza por ser un escritorio que apuesta por mantener la ligereza de su predecesor GNOME 2. Para instalar este entorno de escritorio proceder del siguiente modo:
```
# xbps-install cinnamon gnome-terminal lightdm lightdm-gtk-greeter dbus
# ln -s /etc/sv/{lightdm, dbus} /var/service/
```
**NOTA:** Se sabe que Cinnamon [actúa de manera extraña](https://www.reddit.com/r/voidlinux/comments/i21a7e/void_linux_musl_cinnamon_doesnt_work_properly) al ejecutarlo desde Musl. Esto también afecta a la imagen en vivo, void-live-x86_64-musl- <date> -cinnamon.iso
#### 6.3.2 Enlightenment Desktop
Para instalar el escritorio proceder del siguiente modo:
```
# xbps-install enlightenment lxdm lxterminal dbus
# ln -s /etc/sv/{lxdm, dbus} /var/service/
```
#### 6.3 3 LXDE Desktop
El escritorio lxde es uno de los más ligeros y una buena opción para aquellos equipos que se ven limitados en hardware. Para instalarlo proceder de la siguiente manera:
```
# xbps-install lxde dbus
# ln -s /etc/sv/{lxdm, dbus} /var/service/
```
#### 6.3.4 LXQT Desktop
El escritorio [lxqt es otro de los proyectos que apuesta por la ligereza](https://lxqt.github.io/), pero sin sacrificar lo estético. Es el resultado de la fusión de Razor-Qt y LXDE. Para instalarlo proceder del siguiente modo:
```
# xbps-install lxqt lxqt-l10n dbus lxdm
# ln -s /etc/sv/{lxdm, dbus} /var/service/
```
#### 6.3.5 MATE Desktop
El [escritorio Mate](https://git.mate-desktop.org/) está basado en Gnome 2 y se encuentra en constante desarrollo para ofrecer a sus usuarios un entorno atractivo e intuitivo. Para instalar el escritorio proceder del siguiente modo:
```
# xbps-install mate dbus ligtdm lightdm-gtk-greeter
# ln -s /etc/sv/{lightdm, dbus} /var/service/
```
Opcionalmente también podría optar por instalar el paquete `mate-extra` el cual le brindará al usuario una mejor experiencia al proporcionarle por ejemplo salvapantallas, visor de documentos, visor de imágenes, calculadora, terminal, etc
#### 6.3.6 XFCE Desktop
El [escritorio xfce](https://www.xfce.org/) se caracteriza por ser también uno de que consumen poco recursos del sistema sin dejar de ser visualmente atractivo y, por supuesto, sencillo de usar. Para instalarlo proceder del siguiente modo:
```
# xbps-install xfce4 dbus lxdm
# ln -s /etc/sv/{lxdm, dbus} /var/service/
```
Opcionalmente también podría instalar el paquete `xfce4-plugins` el cual le brindará al usuario una amplia gama de plugins para el panel, notificaciones o herramientas del sistema.
#### 6.3.7 Budgie Desktop
El escritorio budgie está basado en Gnome 3 y es desarrollado por el [projecto Solus](http://solus-project.com). Para instalar el escritorio proceder del siguiente modo:
```
# xbps-install budgie-desktop gnome-terminal dbus gdm
# ln -s /etc/sv/{gdm, dbus} /var/service/
```
#### 6.3.8 GNOME Desktop
Para instalar el [escritorio](https://www.gnome.org) proceder del siguiente modo:
```
# xbps-install gnome dbus gdm
# ln -s /etc/sv/{gdm, dbus} /var/service/
```
#### 6.3.9 PLASMA Desktop
Para instalar el [escritorio](https://kde.org/) proceder del siguiente modo:
```
# xbps-install kde5 dbus
# ln -s /etc/sv/{sddm, dbus} /var/service/
```
Opcionalmente también puede instalar el paquete `kde-5-baseapp` el cual le proveerá de un editor de texto plano, un gestor de archivos y un emulador de consola
#### 6.3.10 Lumina Desktop
El [escritorio Lumina](https://lumina-desktop.org/faq/) tiene la particularidad de caracterizarse por no requerir ninguno de los marcos de implementación de escritorio de uso común (dbus, policykit, consolekit, systemd, hald, etc.) Para instalar el escritorio proceder del siguiente modo:
```
# xbps-install lumina slim
# ln -s /etc/sv/slim /var/service/
```
### 6.4 Instalar un gestor de inicio
Void provee distintos *Display Managers* o Gestor de Inicio para poder iniciar sesión en el escritorio que hayamos instalado de manera gráfica.
Algunos escritorios tienen sus DM el cual lo instala de manera automática, sin embargo, es posible reemplazarlo por otro que sea del agrado del usuario. A continución se mencionarán los más comunes
#### 6.4.1 GDM
Para instalarlo y activarlo proceder del siguiente modo:
```
# xbps-install gdm
# ln -s /etc/sv/gdm /var/service/
```
#### 6.4.2 LightDM
Para instalarlo y activarlo proceder del siguiente modo:
```
# xbps-install lightdm lightdm-gtk-greeter
# ln -s /etc/sv/lightdm /var/service/
```
#### 6.4.3 LXDM
Para instalarlo y activarlo proceder del siguiente modo:
```
# xbps-install lxdm
# ln -s /etc/sv/lxdm /var/service/
```
#### 6.4.4 SDDM
Para instalarlo y activarlo proceder del siguiente modo:
```
# xbps-install sddm
# ln -s /etc/sv/sddm /var/service/
```
#### 6.4.5 SLIM
Para instalarlo y activarlo proceder del siguiente modo:
```
# xbps-install slim
# ln -s /etc/sv/slim /var/service/
```
### 6.5 Inicio manual a través del comando **startx**
Para iniciar sesión a través del comando *startx* es necesario tener instalado el paquete `xinit` y tenerlo configurado correctamente. Para ello, primeramente será necesario crear un fichero llamado xinitrc y guardarlo en nuestro directorio *home* con la característica de oculto.
$ touch ~/.xinitrc
Ahora, dependiendo del escritorio se haya instalado, habrá que añadir la linea correspondiente para poder iniciar X11
```
exec mate-session # Para iniciar Mate-Desktop
exec startxfce4 # Para iniciar XFCE
exec startlxde # Para iniciar LXDE
exec startkde # Para iniciar KDE-Plasma
exec gnome-session # Para iniciar Gnome
exec cinnamon-session # Para iniciar Cinnamon
exec startlxqt # Para iniciar LXQT
```
### 6.6 Autologin e inicio automático de X11
Crear un servicio de autologin para runit
# cp -R /etc/sv/agetty-tty1 /etc/sv/agetty-autologin-tty1
El nombre del servicio que se vaya a crear es necesario que termine con el nombre válido de alguna de las consolas virtuales activadas. De lo contrario el servicio no funcionará.
Ahora hay que editar el siguiente fichero `/etc/sv/agetty-autologin-tty1/conf` para añadir lo siguiente:
```
GETTY_ARGS="--autologin USUARIO --noclear"
BAUD_RATE=38400
TERM_NAME=linux
```
Si se inició sesión en la consola virtual uno (tty1), ahora es un buen momento para cambiar a otra para continuar con la configuración.
Desactivar el servicio de la tty1 y activar el servicio para el autologin:
```
# rm /var/service/agetty-tty1
# ln -s /etc/sv/agetty-autologin-tty1 /var/service
```
Ahora, cada vez que el sistema inicie, el autologin a la consola virtual uno será de forma automática pero no en X11, por lo tanto, para conseguirlo añadir en el archivo de perfil de su shell en uso (bash de manera predeterminada) lo siguiente:
```
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
exec startx
fi
```
### 6.7 Configuración de teclado
Para establecer de forma permanente la distribución de nuestro teclado en X11, es necesario agregar un archivo de configuración en el que se defina la clase de entrada preferida estableciendo la opción *XkbLayout*. Para ello, será necesario crear el siguiente directorio: `/etc/X11/xorg.conf.d/10-keyboard-user.conf`
```
Section "InputClass"
Identifier "system-keyboard"
MatchDriver "libinput"
MatchIsKeyboard "on"
Option "XkbLayout" "latam" # Para la distribución de español latinoamericano. Si se desea la distribución para español España, reemplazar *latam* por *es*
Option "XkbOption" "grp:alt_shift_toggle" # Alternar distribución de teclado en caso de tener definido dos opciones
```
**NOTA:** Si no sabe qué tipo de distribución de teclado tiene, revisar los siguientes ejemplos:
1. [Distribución de teclado en español latinoamericano](https://tecnovortex.com/wp-content/uploads/2010/05/kb-latinoamericano.png)
2. [Distribución de teclado en español España](https://tecnovortex.com/wp-content/uploads/2010/05/kb-spanish-1024x341.png)
### 6.8 Panel táctil (opcional)
Para habilitar el pánel táctil (touchpad) de las computadoras portátiles basta con añadir la configuración al mismo directorio en el que se definió la configuración del teclado, con la diferencia de que el fichero tendrá un nombre similar a `15-touchpad.conf` al que se le añadirá lo siguiente:
```
Section "InputClass"
Driver "libinput"
MatchIsTouchpad "on"
Option "Tapping" "on" # Activar comportamientos al hacer clic
Option "NaturalScrolling" "true" # Desplazamiento natural (inverso)
Option "ScrollMethod" "foo" # Método utilizado para el scroll: edge para desplazamiento de borde (vertical) y twofinger para hacerlo con dos dedos
Option "DisableWhileTyping" "true" # Desactivat touchpad mientras se escribe
```
-----
## 7. Ajustar brillo de pantalla
Después de haber instalado Void, lo más probable es que el brillo de la pantalla sea demasiado alto. Para arreglarlo, a continuación se indicará cómo solucionar ese tipo de problemas.
### 7.1 Brillo de pantalla
Para cambiar el brillo de la pantalla existen varias utilidades, entre las más comunes se encuentran *xbacklight, brighnessctl, brillo, light*, sin embargo, el programa que se recomendará en esta sección será [light](https://github.com/haikarainen/light) debido a que entre sus diversas funciones, también nos permitirá realizar los ajustes de intensidad de brillo de pantalla tanto en X11, como en modo totalmente CLI y además, también es posible utilizar este program sin ninguna restricción en la versión de Void Musl.
### 7.2 Instalación
Para instalar el programa basta con lo siguiente:
```
# xbps-install light
```
### 7.3 Uso de *light*
Para efectos de uso concretos sólo se usarán tres comandos de ajuste del brillo: disminuir, aumentar y definir. Ejemplos:
```
light -A 5 # Incrementa la intensidad de brillo de la pantalla en intervalos de 5%
light -U 5 # Reduce la intensidad de brillo de la pantalla en intervalos de 5%
light -S 80 # Ajusta la intensidad del brillo de la pantalla al 80%
```
Para ver las otras opciones que soporta *light* consulta su [manual](https://github.com/haikarainen/light)
Una vez se conoce los comandos básicos, lo que que falta es definir los atajos de teclado que se utilizarán para realizar los cambios del brillo.
-----
## 8 Fuentes
* Haikarainen. (2020). Light. Sitio web de Github: https://github.com/haikarainen/light
* Void Linux. (2021). DOAS(1). Sitio web de Manual Page Search Parameters: https://man.voidlinux.org/doas
* Void Linux. (2020). DOAS.CONF(5). Sitio web de Manual Page Search Parameters: https://man.voidlinux.org/doas.conf.5
* Void Linux. (2020). SUDO(8). Sitio web de Manual Page Search Parameters: https://man.voidlinux.org/sudo
* Void Linux. (2020). SUDOERS(5). Sitio web de Manual Page Search Parameters: https://man.voidlinux.org/sudoers.5
* Void Linux. (2020). USERADD(8). Sitio web de Manual Page Search Parameters: https://man.voidlinux.org/useradd

42
Plantillas/README.md Normal file
View File

@ -0,0 +1,42 @@
# Plantillas que no están disponibles en el repositorio oficial de Void Linux.
Para instalar estos paquetes proceder del siguiente modo:
1. Clonar el repositorio oficial de paquetes de Void:
```
$ git clone git://github.com/void-linux/void-packages.git
$ cd void-packages
$ ./xbps-src binary-bootstrap
```
2. Crear un directorio con el nombre del correspondiente paquete a instalar:
```
$ mkdir srcpkgs/foo
```
3. Copiar la plantilla al directorio que ha creado
```
$ cp /path/<template> ~/path/void-packages/srcpkgs/foo/
```
4. Construir el binario usando **xbps-src**
```
$ ./xbps-src pkg foo
```
5. Para instalar el paquete una vez ha sido empaquetado, proceder del siguiente modo:
```
# xbps-install --repository hostdir/binpkgs foo
```
6. Alternativamente podrá instalar el paquete usando el comando **xi** que viene incluído en el paquete **xtools**. Si no lo tiene, instálelo
```
# xbps-install xtools
# xi foo
```

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec busybox klogd -n

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec logger -t busybox-ntpd

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec busybox ntpd -nN -p pool.ntp.org

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec busybox syslogd -n

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
@@ -838,18 +838,18 @@
# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
CONFIG_HOSTNAME=y
CONFIG_DNSDOMAINNAME=y
-# CONFIG_HTTPD is not set
-# CONFIG_FEATURE_HTTPD_RANGES is not set
-# CONFIG_FEATURE_HTTPD_SETUID is not set
-# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
-# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
-# CONFIG_FEATURE_HTTPD_CGI is not set
-# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
-# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
-# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
-# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
-# CONFIG_FEATURE_HTTPD_PROXY is not set
-# CONFIG_FEATURE_HTTPD_GZIP is not set
+CONFIG_HTTPD=y
+CONFIG_FEATURE_HTTPD_RANGES=y
+CONFIG_FEATURE_HTTPD_SETUID=y
+CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
+CONFIG_FEATURE_HTTPD_AUTH_MD5=y
+CONFIG_FEATURE_HTTPD_CGI=y
+CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
+CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
+CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
+CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
+CONFIG_FEATURE_HTTPD_PROXY=y
+CONFIG_FEATURE_HTTPD_GZIP=y
CONFIG_IFCONFIG=y
CONFIG_FEATURE_IFCONFIG_STATUS=y
CONFIG_FEATURE_IFCONFIG_SLIP=y

View File

@ -0,0 +1,413 @@
@@ -94,7 +94,7 @@
CONFIG_PASSWORD_MINLEN=6
CONFIG_MD5_SMALL=1
CONFIG_SHA3_SMALL=1
-# CONFIG_FEATURE_FAST_TOP is not set
+CONFIG_FEATURE_FAST_TOP=y
# CONFIG_FEATURE_ETC_NETWORKS is not set
# CONFIG_FEATURE_ETC_SERVICES is not set
CONFIG_FEATURE_EDITING=y
@@ -125,7 +125,7 @@
CONFIG_FEATURE_USE_SENDFILE=y
CONFIG_FEATURE_COPYBUF_KB=4
CONFIG_FEATURE_SKIP_ROOTFS=y
-# CONFIG_MONOTONIC_SYSCALL is not set
+CONFIG_MONOTONIC_SYSCALL=y
# CONFIG_IOCTL_HEX2STR_ERROR is not set
# CONFIG_FEATURE_HWIB is not set
@@ -159,9 +159,9 @@
CONFIG_BZIP2=y
CONFIG_BZIP2_SMALL=8
CONFIG_FEATURE_BZIP2_DECOMPRESS=y
-# CONFIG_CPIO is not set
-# CONFIG_FEATURE_CPIO_O is not set
-# CONFIG_FEATURE_CPIO_P is not set
+CONFIG_CPIO=y
+CONFIG_FEATURE_CPIO_O=y
+CONFIG_FEATURE_CPIO_P=y
# CONFIG_DPKG is not set
# CONFIG_DPKG_DEB is not set
CONFIG_GZIP=y
@@ -192,7 +192,7 @@
CONFIG_FEATURE_UNZIP_BZIP2=y
CONFIG_FEATURE_UNZIP_LZMA=y
CONFIG_FEATURE_UNZIP_XZ=y
-# CONFIG_FEATURE_LZMA_FAST is not set
+CONFIG_FEATURE_LZMA_FAST=y
#
# Coreutils
@@ -206,7 +206,7 @@
CONFIG_CHOWN=y
CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y
CONFIG_CHROOT=y
-# CONFIG_CKSUM is not set
+CONFIG_CKSUM=y
CONFIG_COMM=y
CONFIG_CP=y
CONFIG_FEATURE_CP_LONG_OPTIONS=y
@@ -214,11 +214,11 @@
CONFIG_CUT=y
CONFIG_DATE=y
CONFIG_FEATURE_DATE_ISOFMT=y
-# CONFIG_FEATURE_DATE_NANO is not set
+CONFIG_FEATURE_DATE_NANO=y
CONFIG_FEATURE_DATE_COMPAT=y
CONFIG_DD=y
CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
-# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
+CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y
CONFIG_FEATURE_DD_IBS_OBS=y
CONFIG_FEATURE_DD_STATUS=y
CONFIG_DF=y
@@ -267,7 +267,7 @@
#
# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
#
-# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
CONFIG_MKDIR=y
CONFIG_MKFIFO=y
CONFIG_MKNOD=y
@@ -314,7 +314,7 @@
CONFIG_TEST1=y
CONFIG_TEST2=y
CONFIG_FEATURE_TEST_64=y
-# CONFIG_TIMEOUT is not set
+CONFIG_TIMEOUT=y
CONFIG_TOUCH=y
CONFIG_FEATURE_TOUCH_NODEREF=y
CONFIG_FEATURE_TOUCH_SUSV3=y
@@ -329,7 +329,7 @@
CONFIG_BB_ARCH=y
CONFIG_UNIQ=y
CONFIG_UNLINK=y
-# CONFIG_USLEEP is not set
+CONFIG_USLEEP=y
CONFIG_UUDECODE=y
CONFIG_BASE64=y
CONFIG_UUENCODE=y
@@ -372,7 +372,7 @@
# CONFIG_FEATURE_LOADFONT_PSF2 is not set
# CONFIG_FEATURE_LOADFONT_RAW is not set
CONFIG_LOADKMAP=y
-# CONFIG_OPENVT is not set
+CONFIG_OPENVT=y
CONFIG_RESET=y
# CONFIG_RESIZE is not set
# CONFIG_FEATURE_RESIZE_PRINT is not set
@@ -545,7 +545,7 @@
#
CONFIG_CHATTR=y
# CONFIG_FSCK is not set
-# CONFIG_LSATTR is not set
+CONFIG_LSATTR=y
# CONFIG_TUNE2FS is not set
#
@@ -588,7 +588,7 @@
CONFIG_BLKID=y
CONFIG_FEATURE_BLKID_TYPE=y
# CONFIG_BLOCKDEV is not set
-# CONFIG_CAL is not set
+CONFIG_CAL=y
# CONFIG_CHRT is not set
CONFIG_DMESG=y
CONFIG_FEATURE_DMESG_PRETTY=y
@@ -641,13 +641,13 @@
CONFIG_FEATURE_MDEV_DAEMON=y
# CONFIG_MESG is not set
# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
-# CONFIG_MKE2FS is not set
-# CONFIG_MKFS_EXT2 is not set
+CONFIG_MKE2FS=y
+CONFIG_MKFS_EXT2=y
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
# CONFIG_MKFS_REISER is not set
-# CONFIG_MKDOSFS is not set
-# CONFIG_MKFS_VFAT is not set
+CONFIG_MKDOSFS=y
+CONFIG_MKFS_VFAT=y
CONFIG_MKSWAP=y
CONFIG_FEATURE_MKSWAP_UUID=y
CONFIG_MORE=y
@@ -661,19 +661,19 @@
CONFIG_FEATURE_MOUNT_FLAGS=y
CONFIG_FEATURE_MOUNT_FSTAB=y
CONFIG_FEATURE_MOUNT_OTHERTAB=y
-# CONFIG_MOUNTPOINT is not set
+CONFIG_MOUNTPOINT=y
# CONFIG_NOLOGIN is not set
# CONFIG_NOLOGIN_DEPENDENCIES is not set
CONFIG_NSENTER=y
CONFIG_PIVOT_ROOT=y
-# CONFIG_RDATE is not set
+CONFIG_RDATE=y
# CONFIG_RDEV is not set
# CONFIG_READPROFILE is not set
CONFIG_RENICE=y
-# CONFIG_REV is not set
-# CONFIG_RTCWAKE is not set
-# CONFIG_SCRIPT is not set
-# CONFIG_SCRIPTREPLAY is not set
+CONFIG_REV=y
+CONFIG_RTCWAKE=y
+CONFIG_SCRIPT=y
+CONFIG_SCRIPTREPLAY=y
CONFIG_SETARCH=y
CONFIG_LINUX32=y
CONFIG_LINUX64=y
@@ -688,9 +688,9 @@
CONFIG_SWAPOFF=y
CONFIG_FEATURE_SWAPONOFF_LABEL=y
CONFIG_SWITCH_ROOT=y
-# CONFIG_TASKSET is not set
-# CONFIG_FEATURE_TASKSET_FANCY is not set
-# CONFIG_FEATURE_TASKSET_CPULIST is not set
+CONFIG_TASKSET=y
+CONFIG_FEATURE_TASKSET_FANCY=y
+CONFIG_FEATURE_TASKSET_CPULIST=y
CONFIG_UEVENT=y
CONFIG_UMOUNT=y
CONFIG_FEATURE_UMOUNT_ALL=y
@@ -740,12 +740,12 @@
# CONFIG_ADJTIMEX is not set
# CONFIG_BBCONFIG is not set
# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
-# CONFIG_BC is not set
+CONFIG_BC=y
CONFIG_DC=y
-# CONFIG_FEATURE_DC_BIG is not set
-CONFIG_FEATURE_DC_LIBM=y
-# CONFIG_FEATURE_BC_INTERACTIVE is not set
-# CONFIG_FEATURE_BC_LONG_OPTIONS is not set
+CONFIG_FEATURE_DC_BIG=y
+# CONFIG_FEATURE_DC_LIBM is not set
+CONFIG_FEATURE_BC_INTERACTIVE=y
+CONFIG_FEATURE_BC_LONG_OPTIONS=y
# CONFIG_BEEP is not set
CONFIG_FEATURE_BEEP_FREQ=0
CONFIG_FEATURE_BEEP_LENGTH_MS=0
@@ -807,7 +807,7 @@
# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
# CONFIG_FEATURE_MAKEDEVS_TABLE is not set
# CONFIG_MAN is not set
-# CONFIG_MICROCOM is not set
+CONFIG_MICROCOM=y
# CONFIG_MIM is not set
# CONFIG_MT is not set
# CONFIG_NANDWRITE is not set
@@ -819,7 +819,7 @@
# CONFIG_RUNLEVEL is not set
# CONFIG_RX is not set
CONFIG_SETFATTR=y
-# CONFIG_SETSERIAL is not set
+CONFIG_SETSERIAL=y
CONFIG_STRINGS=y
CONFIG_TIME=y
CONFIG_TS=y
@@ -842,20 +842,20 @@
CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
# CONFIG_FEATURE_TLS_SHA1 is not set
-# CONFIG_ARP is not set
-# CONFIG_ARPING is not set
+CONFIG_ARP=y
+CONFIG_ARPING=y
CONFIG_BRCTL=y
CONFIG_FEATURE_BRCTL_FANCY=y
CONFIG_FEATURE_BRCTL_SHOW=y
# CONFIG_DNSD is not set
-# CONFIG_ETHER_WAKE is not set
-# CONFIG_FTPD is not set
-# CONFIG_FEATURE_FTPD_WRITE is not set
-# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set
-# CONFIG_FEATURE_FTPD_AUTHENTICATION is not set
-# CONFIG_FTPGET is not set
-# CONFIG_FTPPUT is not set
-# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+CONFIG_ETHER_WAKE=y
+CONFIG_FTPD=y
+CONFIG_FEATURE_FTPD_WRITE=y
+CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y
+CONFIG_FEATURE_FTPD_AUTHENTICATION=y
+CONFIG_FTPGET=y
+CONFIG_FTPPUT=y
+CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y
CONFIG_HOSTNAME=y
CONFIG_DNSDOMAINNAME=y
CONFIG_HTTPD=y
@@ -886,12 +886,12 @@
# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set
# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set
# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
-# CONFIG_INETD is not set
-# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
-# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
-# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set
-# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
-# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
+CONFIG_INETD=y
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y
+CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y
# CONFIG_FEATURE_INETD_RPC is not set
CONFIG_IP=y
CONFIG_IPADDR=y
@@ -912,11 +912,11 @@
# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
# CONFIG_FEATURE_IPCALC_FANCY is not set
# CONFIG_FAKEIDENTD is not set
-# CONFIG_NAMEIF is not set
-# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
-# CONFIG_NBDCLIENT is not set
+CONFIG_NAMEIF=y
+CONFIG_FEATURE_NAMEIF_EXTENDED=y
+CONFIG_NBDCLIENT=y
CONFIG_NC=y
-# CONFIG_NETCAT is not set
+CONFIG_NETCAT=y
CONFIG_NC_SERVER=y
CONFIG_NC_EXTRA=y
# CONFIG_NC_110_COMPAT is not set
@@ -934,13 +934,13 @@
CONFIG_PING6=y
CONFIG_FEATURE_FANCY_PING=y
# CONFIG_PSCAN is not set
-# CONFIG_ROUTE is not set
+CONFIG_ROUTE=y
# CONFIG_SLATTACH is not set
CONFIG_SSL_CLIENT=y
CONFIG_TC=y
CONFIG_FEATURE_TC_INGRESS=y
-# CONFIG_TCPSVD is not set
-# CONFIG_UDPSVD is not set
+CONFIG_TCPSVD=y
+CONFIG_UDPSVD=y
CONFIG_TELNET=y
CONFIG_FEATURE_TELNET_TTYPE=y
CONFIG_FEATURE_TELNET_AUTOLOGIN=y
@@ -948,21 +948,21 @@
# CONFIG_TELNETD is not set
# CONFIG_FEATURE_TELNETD_STANDALONE is not set
# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
-# CONFIG_TFTP is not set
-# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
-# CONFIG_FEATURE_TFTP_HPA_COMPAT is not set
-# CONFIG_TFTPD is not set
-# CONFIG_FEATURE_TFTP_GET is not set
-# CONFIG_FEATURE_TFTP_PUT is not set
-# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
+CONFIG_TFTP=y
+CONFIG_FEATURE_TFTP_PROGRESS_BAR=y
+CONFIG_FEATURE_TFTP_HPA_COMPAT=y
+CONFIG_TFTPD=y
+CONFIG_FEATURE_TFTP_GET=y
+CONFIG_FEATURE_TFTP_PUT=y
+CONFIG_FEATURE_TFTP_BLOCKSIZE=y
# CONFIG_TFTP_DEBUG is not set
CONFIG_TLS=y
-# CONFIG_TRACEROUTE is not set
-# CONFIG_TRACEROUTE6 is not set
-# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
-# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
-# CONFIG_TUNCTL is not set
-# CONFIG_FEATURE_TUNCTL_UG is not set
+CONFIG_TRACEROUTE=y
+CONFIG_TRACEROUTE6=y
+CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
+CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y
+CONFIG_TUNCTL=y
+CONFIG_FEATURE_TUNCTL_UG=y
# CONFIG_VCONFIG is not set
CONFIG_WGET=y
CONFIG_FEATURE_WGET_LONG_OPTIONS=y
@@ -973,21 +973,21 @@
CONFIG_FEATURE_WGET_OPENSSL=y
CONFIG_WHOIS=y
# CONFIG_ZCIP is not set
-# CONFIG_UDHCPD is not set
+CONFIG_UDHCPD=y
# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
-# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
-CONFIG_DHCPD_LEASES_FILE=""
+CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y
+CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
# CONFIG_DUMPLEASES is not set
# CONFIG_DHCPRELAY is not set
CONFIG_UDHCPC=y
CONFIG_FEATURE_UDHCPC_ARPING=y
CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
-# CONFIG_UDHCPC6 is not set
-# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set
-# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set
-# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set
-# CONFIG_FEATURE_UDHCPC6_RFC5970 is not set
+CONFIG_UDHCPC6=y
+CONFIG_FEATURE_UDHCPC6_RFC3646=y
+CONFIG_FEATURE_UDHCPC6_RFC4704=y
+CONFIG_FEATURE_UDHCPC6_RFC4833=y
+CONFIG_FEATURE_UDHCPC6_RFC5970=y
#
# Common options for DHCP applets
@@ -1009,13 +1009,13 @@
#
# Mail Utilities
#
-# CONFIG_MAKEMIME is not set
+CONFIG_MAKEMIME=y
# CONFIG_POPMAILDIR is not set
# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set
-# CONFIG_REFORMIME is not set
-# CONFIG_FEATURE_REFORMIME_COMPAT is not set
-# CONFIG_SENDMAIL is not set
-CONFIG_FEATURE_MIME_CHARSET=""
+CONFIG_REFORMIME=y
+CONFIG_FEATURE_REFORMIME_COMPAT=y
+CONFIG_SENDMAIL=y
+CONFIG_FEATURE_MIME_CHARSET="us-ascii"
#
# Process Utilities
@@ -1028,7 +1028,7 @@
CONFIG_KILLALL5=y
CONFIG_LSOF=y
CONFIG_MPSTAT=y
-# CONFIG_NMETER is not set
+CONFIG_NMETER=y
CONFIG_PGREP=y
CONFIG_PKILL=y
CONFIG_PIDOF=y
@@ -1044,7 +1044,7 @@
CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS=y
CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y
CONFIG_PSTREE=y
-# CONFIG_PWDX is not set
+CONFIG_PWDX=y
# CONFIG_SMEMCAP is not set
CONFIG_BB_SYSCTL=y
CONFIG_TOP=y
@@ -1057,7 +1057,7 @@
CONFIG_FEATURE_TOPMEM=y
CONFIG_UPTIME=y
# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
-# CONFIG_WATCH is not set
+CONFIG_WATCH=y
CONFIG_FEATURE_SHOW_THREADS=y
#
@@ -1075,7 +1075,7 @@
CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service"
# CONFIG_SVC is not set
CONFIG_SVOK=y
-# CONFIG_SVLOGD is not set
+CONFIG_SVLOGD=y
# CONFIG_CHCON is not set
# CONFIG_GETENFORCE is not set
# CONFIG_GETSEBOOL is not set

View File

@ -0,0 +1,21 @@
@@ -624,12 +624,12 @@
CONFIG_LOSETUP=y
CONFIG_LSPCI=y
CONFIG_LSUSB=y
-# CONFIG_MDEV is not set
-# CONFIG_FEATURE_MDEV_CONF is not set
-# CONFIG_FEATURE_MDEV_RENAME is not set
-# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
-# CONFIG_FEATURE_MDEV_EXEC is not set
-# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
-# CONFIG_FEATURE_MDEV_DAEMON is not set
+CONFIG_MDEV=y
+CONFIG_FEATURE_MDEV_CONF=y
+CONFIG_FEATURE_MDEV_RENAME=y
+CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
+CONFIG_FEATURE_MDEV_EXEC=y
+CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
+CONFIG_FEATURE_MDEV_DAEMON=y
# CONFIG_MESG is not set
# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set
# CONFIG_MKE2FS is not set

View File

@ -0,0 +1,15 @@
@@ -917,10 +917,10 @@
CONFIG_NSLOOKUP=y
CONFIG_FEATURE_NSLOOKUP_BIG=y
CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS=y
-# CONFIG_NTPD is not set
-# CONFIG_FEATURE_NTPD_SERVER is not set
-# CONFIG_FEATURE_NTPD_CONF is not set
-# CONFIG_FEATURE_NTP_AUTH is not set
+CONFIG_NTPD=y
+CONFIG_FEATURE_NTPD_SERVER=y
+CONFIG_FEATURE_NTPD_CONF=y
+CONFIG_FEATURE_NTP_AUTH=y
CONFIG_PING=y
CONFIG_PING6=y
CONFIG_FEATURE_FANCY_PING=y

View File

@ -0,0 +1,9 @@
@@ -39,7 +39,7 @@
#
# Build Options
#
-# CONFIG_STATIC is not set
+CONFIG_STATIC=y
# CONFIG_PIE is not set
# CONFIG_NOMMU is not set
# CONFIG_BUILD_LIBBUSYBOX is not set

View File

@ -0,0 +1,31 @@
@@ -1173,18 +1173,18 @@
#
# System Logging Utilities
#
-# CONFIG_KLOGD is not set
-# CONFIG_FEATURE_KLOGD_KLOGCTL is not set
+CONFIG_KLOGD=y
+CONFIG_FEATURE_KLOGD_KLOGCTL=y
CONFIG_LOGGER=y
-# CONFIG_LOGREAD is not set
-# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
-# CONFIG_SYSLOGD is not set
-# CONFIG_FEATURE_ROTATE_LOGFILE is not set
-# CONFIG_FEATURE_REMOTE_LOG is not set
-# CONFIG_FEATURE_SYSLOGD_DUP is not set
-# CONFIG_FEATURE_SYSLOGD_CFG is not set
+CONFIG_LOGREAD=y
+CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
+CONFIG_SYSLOGD=y
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+CONFIG_FEATURE_REMOTE_LOG=y
+CONFIG_FEATURE_SYSLOGD_DUP=y
+CONFIG_FEATURE_SYSLOGD_CFG=y
# CONFIG_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS is not set
-CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
-# CONFIG_FEATURE_IPC_SYSLOG is not set
-CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
+CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
+CONFIG_FEATURE_IPC_SYSLOG=y
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=512
# CONFIG_FEATURE_KMSG_SYSLOG is not set

View File

@ -0,0 +1,34 @@
@@ -979,20 +979,24 @@
CONFIG_DHCPD_LEASES_FILE=""
# CONFIG_DUMPLEASES is not set
# CONFIG_DHCPRELAY is not set
-# CONFIG_UDHCPC is not set
-# CONFIG_FEATURE_UDHCPC_ARPING is not set
-# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set
-CONFIG_UDHCPC_DEFAULT_SCRIPT=""
+CONFIG_UDHCPC=y
+CONFIG_FEATURE_UDHCPC_ARPING=y
+CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
+CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
# CONFIG_UDHCPC6 is not set
# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set
# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set
# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set
# CONFIG_FEATURE_UDHCPC6_RFC5970 is not set
-# CONFIG_FEATURE_UDHCP_PORT is not set
-CONFIG_UDHCP_DEBUG=0
-CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0
-# CONFIG_FEATURE_UDHCP_RFC3397 is not set
-# CONFIG_FEATURE_UDHCP_8021Q is not set
+
+#
+# Common options for DHCP applets
+#
+CONFIG_FEATURE_UDHCP_PORT=y
+CONFIG_UDHCP_DEBUG=2
+CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
+CONFIG_FEATURE_UDHCP_RFC3397=y
+CONFIG_FEATURE_UDHCP_8021Q=y
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=""
#

View File

@ -0,0 +1,57 @@
From dbd3b883a891f076911d752f56f7a906d5650a17 Mon Sep 17 00:00:00 2001
From: Samuel Sapalski <samuel.sapalski@nokia.com>
Date: Wed, 3 Mar 2021 16:31:22 +0100
Subject: [PATCH] decompress_gunzip: Fix DoS if gzip is corrupt
On certain corrupt gzip files, huft_build will set the error bit on
the result pointer. If afterwards abort_unzip is called huft_free
might run into a segmentation fault or an invalid pointer to
free(p).
In order to mitigate this, we check in huft_free if the error bit
is set and clear it before the linked list is freed.
Signed-off-by: Samuel Sapalski <samuel.sapalski@nokia.com>
Signed-off-by: Peter Kaestle <peter.kaestle@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
archival/libarchive/decompress_gunzip.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git archival/libarchive/decompress_gunzip.c archival/libarchive/decompress_gunzip.c
index 03049cc9b..e0520190a 100644
--- a/archival/libarchive/decompress_gunzip.c
+++ b/archival/libarchive/decompress_gunzip.c
@@ -220,10 +220,20 @@ static const uint8_t border[] ALIGN1 = {
* each table.
* t: table to free
*/
+#define BAD_HUFT(p) ((uintptr_t)(p) & 1)
+#define ERR_RET ((huft_t*)(uintptr_t)1)
static void huft_free(huft_t *p)
{
huft_t *q;
+ /*
+ * If 'p' has the error bit set we have to clear it, otherwise we might run
+ * into a segmentation fault or an invalid pointer to free(p)
+ */
+ if (BAD_HUFT(p)) {
+ p = (huft_t*)((uintptr_t)(p) ^ (uintptr_t)(ERR_RET));
+ }
+
/* Go through linked list, freeing from the malloced (t[-1]) address. */
while (p) {
q = (--p)->v.t;
@@ -289,8 +299,6 @@ static unsigned fill_bitbuffer(STATE_PARAM unsigned bitbuffer, unsigned *current
* or a valid pointer to a Huffman table, ORed with 0x1 if incompete table
* is given: "fixed inflate" decoder feeds us such data.
*/
-#define BAD_HUFT(p) ((uintptr_t)(p) & 1)
-#define ERR_RET ((huft_t*)(uintptr_t)1)
static huft_t* huft_build(const unsigned *b, const unsigned n,
const unsigned s, const struct cp_ext *cp_ext,
unsigned *m)
--
2.31.1

View File

@ -0,0 +1,12 @@
The format for the `date` command has changed and this test wasn't updated with it.
--- a/testsuite/date/date-works
+++ b/testsuite/date/date-works
@@ -1,6 +1,6 @@
dt=`busybox date`
# Expected format: Fri Apr 25 03:47:55 CEST 2008
-dt=`echo "$dt" | sed 's/^[^ ][^ ][^ ] [^ ][^ ][^ ] [ 0123][0-9] [012][0-9]:[0-5][0-9]:[0-6][0-9] [A-Z][A-Z]* [012][0-9][0-9][0-9]$/OK/'`
+dt=`echo "$dt" | sed 's/^[^ ][^ ][^ ] [^ ][^ ][^ ] [ 0123][0-9] [012][0-9]:[0-5][0-9]:[0-6][0-9] -[0-9][0-9]* [012][0-9][0-9][0-9]$/OK/'`
test x"$dt" = x"OK"
dt=`busybox date -d 1:2`

View File

@ -0,0 +1,89 @@
# Template file for 'busybox'
pkgname=busybox
version=1.32.1
revision=3
hostmakedepends="perl"
checkdepends="tar which zip"
short_desc="Swiss Army Knife of Embedded Linux"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="GPL-2.0-only"
homepage="https://www.busybox.net"
distfiles="${homepage}/downloads/busybox-${version}.tar.bz2"
checksum=9d57c4bd33974140fd4111260468af22856f12f5b5ef7c70c8d9b75c712a0dee
_patch_config() {
local t="$1"
shift
while [ "$1" ]; do
local p="$1"
shift
echo "Applying $p..."
patch "${t}/.config" <"${FILESDIR}/dotconfig.d/${p}.patch"
done
}
do_configure() {
mkdir -p src
mv * src || true
local t
for t in busybox busybox-static; do
mkdir -p $t
cp -f ${FILESDIR}/dotconfig ${t}/.config
sed -i '18i CONFIG_FEATURE_VERBOSE_USAGE=y' ${t}/.config
case "$XBPS_TARGET_MACHINE" in
*-musl) vsed -i -e /CONFIG_FEATURE_VI_REGEX_SEARCH/s/y/n/ \
${t}/.config;;
esac
if [ "$CROSS_BUILD" ]; then
vsed -i -e \
"s,\(CONFIG_CROSS_COMPILER_PREFIX\).*,\1=\"${XBPS_CROSS_TRIPLET}-\",g" \
${t}/.config
fi
done
_patch_config busybox udhcpc ntpd
_patch_config busybox-static udhcpc ntpd static
for t in busybox busybox-static; do
make -C "${t}" KBUILD_SRC="${wrksrc}/src" -f "${wrksrc}/src/Makefile" oldconfig
make -C "${t}" KBUILD_SRC="${wrksrc}/src" -f "${wrksrc}/src/Makefile" prepare "${makejobs}"
done
if [ "$SOURCE_DATE_EPOCH" ]; then
# rewrite date with the one from the date wrapper.
d=$(date +"%F %T %Z")
sed -i "s/\(#define AUTOCONF_TIMESTAMP\).*/\1 \"$d\"/" */include/autoconf.h
fi
}
do_build() {
for t in busybox-static busybox; do
make -C "${t}" SKIP_STRIP=y "${makejobs}"
done
}
do_check() {
for t in busybox busybox-static; do
make -C "${t}" "${makejobs}" \
SKIP_KNOWN_BUGS=yes SKIP_INTERNET_TESTS=yes \
check
done
}
do_install() {
vbin busybox/busybox_unstripped busybox
vman busybox/docs/busybox.1
vsv busybox-ntpd
}
busybox-static_package() {
short_desc+=" (statically linked)"
pkg_install() {
vbin busybox-static/busybox busybox.static
vsv busybox-ntpd
}
}

View File

@ -0,0 +1 @@
ignore="*.0"

View File

@ -0,0 +1,29 @@
From dd3282f27eadb2f3de1c6910895c3834163a958c Mon Sep 17 00:00:00 2001
From: Jonathan Nieder <jrnieder@gmail.com>
Date: Mon, 26 Sep 2011 16:30:15 -0500
Subject: [SHELL] Disable sh -c "command" -> sh -c "exec command" optimization
It is causing ocamlbuild and the darcs testsuite to fail. Back it
out until we understand the problem better.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
src/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/main.c b/src/main.c
index 65e236be..1614ffbb 100644
--- src/main.c
+++ src/main.c
@@ -171,7 +171,7 @@ state2:
state3:
state = 4;
if (minusc)
- evalstring(minusc, sflag ? 0 : EV_EXIT);
+ evalstring(minusc, 0);
if (sflag || minusc == NULL) {
state4: /* XXX ??? - why isn't this before the "if" statement */
--
1.7.7.rc1

View File

@ -0,0 +1,26 @@
# Template file for 'dash'
pkgname=dash
version=0.5.11.4
revision=1
build_style=gnu-configure
hostmakedepends="bison"
short_desc="POSIX-compliant Unix shell, much smaller than GNU bash"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="BSD-3-Clause"
homepage="http://gondor.apana.org.au/~herbert/dash/"
distfiles="http://gondor.apana.org.au/~herbert/dash/files/$pkgname-$version.tar.gz"
checksum=00fb7d68b7599cc41ab151051c06c01e9500540183d8aa72116cb9c742bd6d5f
register_shell="/usr/bin/sh /usr/bin/dash /bin/sh /bin/dash"
alternatives="
sh:sh:/usr/bin/dash
sh:sh.1:/usr/share/man/man1/dash.1"
# Construir vinculado estáticamente
do_configure() {
./configure --prefix=/usr --enable-FEATURE=yes --enable-static
}
post_install() {
vlicense COPYING
}

View File

@ -0,0 +1 @@
ignore="*md5sum*"

View File

@ -0,0 +1,202 @@
/* See LICENSE file for copyright and license details. */
#include <X11/XF86keysym.h>
#include <X11/keysymdef.h>
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 8; /* snap pixel */
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
static const unsigned int systrayspacing = 1; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "Ubuntu Mono:size=8" };
static const char dmenufont[] = "Ubuntu Condensed:size=13";
static const char col_01[] = "#1c1f22"; /* Color de la barra de estado en reposo*/
static const char col_02[] = "#1c1f22"; /* Color del borde de pantalla desenfocada */
static const char col_03[] = "#ffffff"; /* Color de las letras de la barra de estado */
static const char col_04[] = "#02ff00"; /* Color del nombre y etiqueta que está en uso */
static const char col_05[] = "#ffffff"; /* Color del borde de la ventana enfocada */
static const char col_06[] = "#1c1f22"; /* Color barra de estado cuando está en uso */
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_03, col_01, col_02 },
[SchemeSel] = { col_04, col_06, col_05 },
};
/* tagging */
//static const char *tags[] = { "", "", "", "", "", "", "" };
static const char *tags[] = { "", "", "", "", "", "" };
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "Nnn", NULL, NULL, 1 << 0, 0, -1 },
{ "Gimp", NULL, NULL, 1 << 3, 0, -1 },
{ "IceCat", NULL, NULL, 1 << 1, 0, -1 },
{ "Brave", NULL, NULL, 1 << 1, 0, -1 },
{ "Google Chrome", NULL, NULL, 1 << 6, 0, -1 },
{ "Galculator", NULL, NULL, 0, 1, -1 },
{ "Openshot-qt", NULL, NULL, 1 << 3, 0, -1 }, // Editor de videos
{ "Telegram", NULL, NULL, 1 << 2, 0, -1 },
{ "Lxappearance", NULL, NULL, 0, 1, -1 },
{ "Thunderbird", NULL, NULL, 1 << 2, 0, -1 },
{ "Thunderbird", NULL, "Filtros de mensajes", 1 << 2, 1, -1 },
{ "Libreoffice", NULL, "Abrir", 0, 1, -1 },
};
/* layout(s) */
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
static const Layout layouts[] = {
/* symbol arrange function */
{ "T", tile }, /* first entry is default */
{ "F", NULL }, /* no layout function means floating behavior */
{ "M", monocle },
};
/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_01, "-nf", col_03, "-sb", col_06, "-sf", col_04, NULL };
static const char *termcmd[] = { "st", "-t", "Enter the Void", NULL }; /* Emulador de consola */
/* Comandos personalizados */
static const char *menucmd[] = { "menu-apagar.sh", NULL };
static const char *screencastcmd[] = { "gvideo.sh", NULL };
static const char *nnncmd[] = { "st", "-T", "Administrador de archivos", "-e", "nnn", NULL };
static const char *icecatcmd[] = { "icecat", NULL };
static const char *bravecmd[] = { "glibc", "brave", NULL };
static const char *chrome[] = { "glibc", "google-chrome", NULL };
static const char *telegramcmd[] = { "glibc","telegram", NULL };
static const char *gimpcmd[] = { "gimp", NULL };
static const char *openshotcmd[] = { "glibc", "openshot-qt", NULL };
static const char *mocpcmd[] = { "st", "-e", "mocp", "-T", "yellow_red_theme", NULL };
static const char *mocp_play[] = { "mocp", "-p", "-t", "shuffle", NULL };
static const char scratchpadname[] = "scratchpad";
static const char *scratchpadcmd[] = { "st", "-t", "scratchpad", "-g", "140x40+400+220", NULL };
static const char *dropboxcmd[] = { "glibc", "dropbox", "start", NULL };
static const char *thunderbirdcmd[] = { "thunderbird", NULL };
static const char *toggle_wificmd[] = { "wifi.sh", "-toggle", NULL };
/* Control de volumen ALSA */
static const char *volupcmd[] = { "amixer", "-q", "sset", "Master", "5%+", NULL };
static const char *voldowncmd[] = { "amixer", "-q", "sset", "Master", "5%-", NULL };
static const char *mutecmd[] = { "amixer", "-q", "-D", "default", "sset", "Master", "toggle", NULL }; /* Alternar silencio/sonido */
/* Control del brillo de pantalla */
static const char *brightnessup[] = { "light", "-A", "2.5"};
static const char *brightnessdown[] = { "light", "-U", "2.5"};
static Key keys[] = {
/* modifier key function argument */
{ 0, XK_F12, togglescratch, {.v = scratchpadcmd} },
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_u, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
/* Atajos personalizados */
// { MODKEY, XK_F1, spawn, {.v = nnncmd } },
{ MODKEY, XK_F1, spawn, {.v = nnncmd } },
{ ControlMask, XK_F1, spawn, {.v = chrome } },
{ MODKEY, XK_F2, spawn, {.v = icecatcmd } },
{ ControlMask, XK_F2, spawn, {.v = bravecmd } },
{ MODKEY, XK_F3, spawn, {.v = telegramcmd } },
{ ControlMask, XK_F3, spawn, {.v = thunderbirdcmd } },
{ MODKEY, XK_F4, spawn, {.v = gimpcmd } },
{ ControlMask, XK_F4, spawn, {.v = openshotcmd } },
{ MODKEY, XK_x, spawn, {.v = menucmd } }, // Atajo menú Apagar
{ MODKEY, XK_v, spawn, {.v = screencastcmd } }, // Grabar pantalla
{ ControlMask, XK_m, spawn, SHCMD("usb.sh -m") }, // Montar usb
{ ControlMask, XK_u, spawn, SHCMD("usb.sh -u") }, // Desmontar usb
{ MODKEY|ShiftMask, XK_u, spawn, SHCMD("usb.sh -U") }, // Desmontar último usb
{ MODKEY, XK_F10, spawn, {.v = mocpcmd } },
{ ControlMask, XK_F10, spawn, {.v = mocp_play } },
{ MODKEY, XK_F11, spawn, {.v = dropboxcmd } },
{ ControlMask, XK_F12, spawn, {.v = toggle_wificmd } },
/* Modos de captura de pantalla */
{ 0, XK_Print, spawn, SHCMD("ss_void.sh -P") }, // Captura de pantalla en el portapapeles
{ ShiftMask, XK_Print, spawn, SHCMD("ss_void.sh -S") }, // Captura de área seleccionada en el portapapeles
{ ControlMask, XK_Print, spawn, SHCMD("ss_void.sh -g") }, // Guardar captura de pantalla
{ MODKEY|ShiftMask, XK_Print, spawn, SHCMD("ss_void.sh -s")}, // Guardar área seleccionada
/* Atajos multimedia */
{ 0, XF86XK_AudioPlay, spawn, SHCMD("mocp -G") },
{ 0, XF86XK_AudioPrev, spawn, SHCMD("mocp -r") },
{ 0, XF86XK_AudioNext, spawn, SHCMD("mocp -f") },
{ 0, XF86XK_AudioMute, spawn, {.v = mutecmd } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd } },
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd } },
/* Ajustar brillo de la pantalla */
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = brightnessup} },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = brightnessdown} },
/* ---------------------------------------------------------------------------------------------- */
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};

View File

@ -0,0 +1,90 @@
diff -up a/config.def.h b/config.def.h
--- a/config.def.h 2019-06-06 21:23:27.006661784 +0200
+++ b/config.def.h 2019-06-20 15:05:59.083102462 +0200
@@ -58,11 +58,14 @@ static const Layout layouts[] = {
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
+static const char scratchpadname[] = "scratchpad";
+static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
+ { MODKEY, XK_grave, togglescratch, {.v = scratchpadcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
diff -up a/dwm.c b/dwm.c
--- a/dwm.c 2019-06-06 21:23:27.023328450 +0200
+++ b/dwm.c 2019-06-20 15:07:01.089767947 +0200
@@ -213,6 +213,7 @@ static void tagmon(const Arg *arg);
static void tile(Monitor *);
static void togglebar(const Arg *arg);
static void togglefloating(const Arg *arg);
+static void togglescratch(const Arg *arg);
static void toggletag(const Arg *arg);
static void toggleview(const Arg *arg);
static void unfocus(Client *c, int setfocus);
@@ -273,6 +274,8 @@ static Window root, wmcheckwin;
/* configuration, allows nested code to access above variables */
#include "config.h"
+static unsigned int scratchtag = 1 << LENGTH(tags);
+
/* compile-time check if all tags fit into an unsigned int bit array. */
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
@@ -1052,6 +1055,14 @@ manage(Window w, XWindowAttributes *wa)
&& (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh : c->mon->my);
c->bw = borderpx;
+ selmon->tagset[selmon->seltags] &= ~scratchtag;
+ if (!strcmp(c->name, scratchpadname)) {
+ c->mon->tagset[c->mon->seltags] |= c->tags = scratchtag;
+ c->isfloating = True;
+ c->x = c->mon->wx + (c->mon->ww / 2 - WIDTH(c) / 2);
+ c->y = c->mon->wy + (c->mon->wh / 2 - HEIGHT(c) / 2);
+ }
+
wc.border_width = c->bw;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
@@ -1661,6 +1672,7 @@ spawn(const Arg *arg)
{
if (arg->v == dmenucmd)
dmenumon[0] = '0' + selmon->num;
+ selmon->tagset[selmon->seltags] &= ~scratchtag;
if (fork() == 0) {
if (dpy)
close(ConnectionNumber(dpy));
@@ -1748,6 +1760,28 @@ togglefloating(const Arg *arg)
}
void
+togglescratch(const Arg *arg)
+{
+ Client *c;
+ unsigned int found = 0;
+
+ for (c = selmon->clients; c && !(found = c->tags & scratchtag); c = c->next);
+ if (found) {
+ unsigned int newtagset = selmon->tagset[selmon->seltags] ^ scratchtag;
+ if (newtagset) {
+ selmon->tagset[selmon->seltags] = newtagset;
+ focus(NULL);
+ arrange(selmon);
+ }
+ if (ISVISIBLE(c)) {
+ focus(c);
+ restack(selmon);
+ }
+ } else
+ spawn(arg);
+}
+
+void
toggletag(const Arg *arg)
{
unsigned int newtags;

View File

@ -0,0 +1,30 @@
From 9102fdb9c670218373bbe83c891c8e8138d6a6f4 Mon Sep 17 00:00:00 2001
From: redacted <redacted@example.com>
Date: Tue, 23 Apr 2019 00:39:27 +0100
Subject: [PATCH] added noborder patch
---
dwm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dwm.c b/dwm.c
index 4465af1..685eca1 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1282,6 +1282,13 @@ resizeclient(Client *c, int x, int y, int w, int h)
c->oldw = c->w; c->w = wc.width = w;
c->oldh = c->h; c->h = wc.height = h;
wc.border_width = c->bw;
+ if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
+ || &monocle == c->mon->lt[c->mon->sellt]->arrange)
+ && !c->isfullscreen && !c->isfloating) {
+ c->w = wc.width += c->bw * 2;
+ c->h = wc.height += c->bw * 2;
+ wc.border_width = 0;
+ }
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
configure(c);
XSync(dpy, False);
--
2.21.0

View File

@ -0,0 +1,746 @@
From 4001ccae7b1a41bdcb247b0cf095a51af7b68c28 Mon Sep 17 00:00:00 2001
From: Igor Gevka <igor.gevka@gmail.com>
Date: Sun, 16 Feb 2020 15:03:10 -0800
Subject: [PATCH] [PATCH] Implements a system tray for dwm.
Original author: Jan Christoph Ebersbach <jceb@e-jc.de>, inspired by http://code.google.com/p/dwm-plus
URL: http://dwm.suckless.org/patches/systray
dwm 6.2 port by Igor Gevka <igor.gevka@gmail.com>
---
config.def.h | 4 +
dwm.c | 404 +++++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 382 insertions(+), 26 deletions(-)
diff --git a/config.def.h b/config.def.h
index 1c0b587..2d824d1 100644
--- a/config.def.h
+++ b/config.def.h
@@ -3,6 +3,10 @@
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
+static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
+static const unsigned int systrayspacing = 2; /* systray spacing */
+static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
+static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "monospace:size=10" };
diff --git a/dwm.c b/dwm.c
index 4465af1..3e361fa 100644
--- a/dwm.c
+++ b/dwm.c
@@ -57,12 +57,30 @@
#define TAGMASK ((1 << LENGTH(tags)) - 1)
#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
+#define SYSTEM_TRAY_REQUEST_DOCK 0
+
+/* XEMBED messages */
+#define XEMBED_EMBEDDED_NOTIFY 0
+#define XEMBED_WINDOW_ACTIVATE 1
+#define XEMBED_FOCUS_IN 4
+#define XEMBED_MODALITY_ON 10
+
+#define XEMBED_MAPPED (1 << 0)
+#define XEMBED_WINDOW_ACTIVATE 1
+#define XEMBED_WINDOW_DEACTIVATE 2
+
+#define VERSION_MAJOR 0
+#define VERSION_MINOR 0
+#define XEMBED_EMBEDDED_VERSION (VERSION_MAJOR << 16) | VERSION_MINOR
+
/* enums */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
enum { SchemeNorm, SchemeSel }; /* color schemes */
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
+ NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz,
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
+enum { Manager, Xembed, XembedInfo, XLast }; /* Xembed atoms */
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
@@ -141,6 +159,12 @@ typedef struct {
int monitor;
} Rule;
+typedef struct Systray Systray;
+struct Systray {
+ Window win;
+ Client *icons;
+};
+
/* function declarations */
static void applyrules(Client *c);
static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact);
@@ -169,8 +193,10 @@ static void focus(Client *c);
static void focusin(XEvent *e);
static void focusmon(const Arg *arg);
static void focusstack(const Arg *arg);
+static Atom getatomprop(Client *c, Atom prop);
static int getrootptr(int *x, int *y);
static long getstate(Window w);
+static unsigned int getsystraywidth();
static int gettextprop(Window w, Atom atom, char *text, unsigned int size);
static void grabbuttons(Client *c, int focused);
static void grabkeys(void);
@@ -188,13 +214,16 @@ static void pop(Client *);
static void propertynotify(XEvent *e);
static void quit(const Arg *arg);
static Monitor *recttomon(int x, int y, int w, int h);
+static void removesystrayicon(Client *i);
static void resize(Client *c, int x, int y, int w, int h, int interact);
+static void resizebarwin(Monitor *m);
static void resizeclient(Client *c, int x, int y, int w, int h);
static void resizemouse(const Arg *arg);
+static void resizerequest(XEvent *e);
static void restack(Monitor *m);
static void run(void);
static void scan(void);
-static int sendevent(Client *c, Atom proto);
+static int sendevent(Window w, Atom proto, int m, long d0, long d1, long d2, long d3, long d4);
static void sendmon(Client *c, Monitor *m);
static void setclientstate(Client *c, long state);
static void setfocus(Client *c);
@@ -206,6 +235,7 @@ static void seturgent(Client *c, int urg);
static void showhide(Client *c);
static void sigchld(int unused);
static void spawn(const Arg *arg);
+static Monitor *systraytomon(Monitor *m);
static void tag(const Arg *arg);
static void tagmon(const Arg *arg);
static void tile(Monitor *);
@@ -223,18 +253,23 @@ static int updategeom(void);
static void updatenumlockmask(void);
static void updatesizehints(Client *c);
static void updatestatus(void);
+static void updatesystray(void);
+static void updatesystrayicongeom(Client *i, int w, int h);
+static void updatesystrayiconstate(Client *i, XPropertyEvent *ev);
static void updatetitle(Client *c);
static void updatewindowtype(Client *c);
static void updatewmhints(Client *c);
static void view(const Arg *arg);
static Client *wintoclient(Window w);
static Monitor *wintomon(Window w);
+static Client *wintosystrayicon(Window w);
static int xerror(Display *dpy, XErrorEvent *ee);
static int xerrordummy(Display *dpy, XErrorEvent *ee);
static int xerrorstart(Display *dpy, XErrorEvent *ee);
static void zoom(const Arg *arg);
/* variables */
+static Systray *systray = NULL;
static const char broken[] = "broken";
static char stext[256];
static int screen;
@@ -257,9 +292,10 @@ static void (*handler[LASTEvent]) (XEvent *) = {
[MapRequest] = maprequest,
[MotionNotify] = motionnotify,
[PropertyNotify] = propertynotify,
+ [ResizeRequest] = resizerequest,
[UnmapNotify] = unmapnotify
};
-static Atom wmatom[WMLast], netatom[NetLast];
+static Atom wmatom[WMLast], netatom[NetLast], xatom[XLast];
static int running = 1;
static Cur *cursor[CurLast];
static Clr **scheme;
@@ -439,7 +475,7 @@ buttonpress(XEvent *e)
arg.ui = 1 << i;
} else if (ev->x < x + blw)
click = ClkLtSymbol;
- else if (ev->x > selmon->ww - TEXTW(stext))
+ else if (ev->x > selmon->ww - TEXTW(stext) - getsystraywidth())
click = ClkStatusText;
else
click = ClkWinTitle;
@@ -482,6 +518,11 @@ cleanup(void)
XUngrabKey(dpy, AnyKey, AnyModifier, root);
while (mons)
cleanupmon(mons);
+ if (showsystray) {
+ XUnmapWindow(dpy, systray->win);
+ XDestroyWindow(dpy, systray->win);
+ free(systray);
+ }
for (i = 0; i < CurLast; i++)
drw_cur_free(drw, cursor[i]);
for (i = 0; i < LENGTH(colors); i++)
@@ -512,9 +553,57 @@ cleanupmon(Monitor *mon)
void
clientmessage(XEvent *e)
{
+ XWindowAttributes wa;
+ XSetWindowAttributes swa;
XClientMessageEvent *cme = &e->xclient;
Client *c = wintoclient(cme->window);
+ if (showsystray && cme->window == systray->win && cme->message_type == netatom[NetSystemTrayOP]) {
+ /* add systray icons */
+ if (cme->data.l[1] == SYSTEM_TRAY_REQUEST_DOCK) {
+ if (!(c = (Client *)calloc(1, sizeof(Client))))
+ die("fatal: could not malloc() %u bytes\n", sizeof(Client));
+ if (!(c->win = cme->data.l[2])) {
+ free(c);
+ return;
+ }
+ c->mon = selmon;
+ c->next = systray->icons;
+ systray->icons = c;
+ if (!XGetWindowAttributes(dpy, c->win, &wa)) {
+ /* use sane defaults */
+ wa.width = bh;
+ wa.height = bh;
+ wa.border_width = 0;
+ }
+ c->x = c->oldx = c->y = c->oldy = 0;
+ c->w = c->oldw = wa.width;
+ c->h = c->oldh = wa.height;
+ c->oldbw = wa.border_width;
+ c->bw = 0;
+ c->isfloating = True;
+ /* reuse tags field as mapped status */
+ c->tags = 1;
+ updatesizehints(c);
+ updatesystrayicongeom(c, wa.width, wa.height);
+ XAddToSaveSet(dpy, c->win);
+ XSelectInput(dpy, c->win, StructureNotifyMask | PropertyChangeMask | ResizeRedirectMask);
+ XReparentWindow(dpy, c->win, systray->win, 0, 0);
+ /* use parents background color */
+ swa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
+ XChangeWindowAttributes(dpy, c->win, CWBackPixel, &swa);
+ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_EMBEDDED_NOTIFY, 0 , systray->win, XEMBED_EMBEDDED_VERSION);
+ /* FIXME not sure if I have to send these events, too */
+ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_FOCUS_IN, 0 , systray->win, XEMBED_EMBEDDED_VERSION);
+ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_WINDOW_ACTIVATE, 0 , systray->win, XEMBED_EMBEDDED_VERSION);
+ sendevent(c->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_MODALITY_ON, 0 , systray->win, XEMBED_EMBEDDED_VERSION);
+ XSync(dpy, False);
+ resizebarwin(selmon);
+ updatesystray();
+ setclientstate(c, NormalState);
+ }
+ return;
+ }
if (!c)
return;
if (cme->message_type == netatom[NetWMState]) {
@@ -567,7 +656,7 @@ configurenotify(XEvent *e)
for (c = m->clients; c; c = c->next)
if (c->isfullscreen)
resizeclient(c, m->mx, m->my, m->mw, m->mh);
- XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh);
+ resizebarwin(m);
}
focus(NULL);
arrange(NULL);
@@ -652,6 +741,11 @@ destroynotify(XEvent *e)
if ((c = wintoclient(ev->window)))
unmanage(c, 1);
+ else if ((c = wintosystrayicon(ev->window))) {
+ removesystrayicon(c);
+ resizebarwin(selmon);
+ updatesystray();
+ }
}
void
@@ -695,19 +789,23 @@ dirtomon(int dir)
void
drawbar(Monitor *m)
{
- int x, w, sw = 0;
+ int x, w, sw = 0, stw = 0;
int boxs = drw->fonts->h / 9;
int boxw = drw->fonts->h / 6 + 2;
unsigned int i, occ = 0, urg = 0;
Client *c;
+ if(showsystray && m == systraytomon(m))
+ stw = getsystraywidth();
+
/* draw status first so it can be overdrawn by tags later */
if (m == selmon) { /* status is only drawn on selected monitor */
drw_setscheme(drw, scheme[SchemeNorm]);
- sw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
- drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0);
+ sw = TEXTW(stext) - lrpad / 2 + 2; /* 2px right padding */
+ drw_text(drw, m->ww - sw - stw, 0, sw, bh, lrpad / 2 - 2, stext, 0);
}
+ resizebarwin(m);
for (c = m->clients; c; c = c->next) {
occ |= c->tags;
if (c->isurgent)
@@ -728,7 +826,7 @@ drawbar(Monitor *m)
drw_setscheme(drw, scheme[SchemeNorm]);
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
- if ((w = m->ww - sw - x) > bh) {
+ if ((w = m->ww - sw - stw - x) > bh) {
if (m->sel) {
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
@@ -739,7 +837,7 @@ drawbar(Monitor *m)
drw_rect(drw, x, 0, w, bh, 1, 1);
}
}
- drw_map(drw, m->barwin, 0, 0, m->ww, bh);
+ drw_map(drw, m->barwin, 0, 0, m->ww - stw, bh);
}
void
@@ -776,8 +874,11 @@ expose(XEvent *e)
Monitor *m;
XExposeEvent *ev = &e->xexpose;
- if (ev->count == 0 && (m = wintomon(ev->window)))
+ if (ev->count == 0 && (m = wintomon(ev->window))) {
drawbar(m);
+ if (m == selmon)
+ updatesystray();
+ }
}
void
@@ -862,10 +963,17 @@ getatomprop(Client *c, Atom prop)
unsigned long dl;
unsigned char *p = NULL;
Atom da, atom = None;
+ /* FIXME getatomprop should return the number of items and a pointer to
+ * the stored data instead of this workaround */
+ Atom req = XA_ATOM;
+ if (prop == xatom[XembedInfo])
+ req = xatom[XembedInfo];
- if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM,
+ if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, req,
&da, &di, &dl, &dl, &p) == Success && p) {
atom = *(Atom *)p;
+ if (da == xatom[XembedInfo] && dl == 2)
+ atom = ((Atom *)p)[1];
XFree(p);
}
return atom;
@@ -899,6 +1007,16 @@ getstate(Window w)
return result;
}
+unsigned int
+getsystraywidth()
+{
+ unsigned int w = 0;
+ Client *i;
+ if(showsystray)
+ for(i = systray->icons; i; w += i->w + systrayspacing, i = i->next) ;
+ return w ? w + systrayspacing : 1;
+}
+
int
gettextprop(Window w, Atom atom, char *text, unsigned int size)
{
@@ -1003,7 +1121,7 @@ killclient(const Arg *arg)
{
if (!selmon->sel)
return;
- if (!sendevent(selmon->sel, wmatom[WMDelete])) {
+ if (!sendevent(selmon->sel->win, wmatom[WMDelete], NoEventMask, wmatom[WMDelete], CurrentTime, 0 , 0, 0)) {
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
XSetCloseDownMode(dpy, DestroyAll);
@@ -1091,6 +1209,12 @@ maprequest(XEvent *e)
{
static XWindowAttributes wa;
XMapRequestEvent *ev = &e->xmaprequest;
+ Client *i;
+ if ((i = wintosystrayicon(ev->window))) {
+ sendevent(i->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_WINDOW_ACTIVATE, 0, systray->win, XEMBED_EMBEDDED_VERSION);
+ resizebarwin(selmon);
+ updatesystray();
+ }
if (!XGetWindowAttributes(dpy, ev->window, &wa))
return;
@@ -1215,6 +1339,16 @@ propertynotify(XEvent *e)
Window trans;
XPropertyEvent *ev = &e->xproperty;
+ if ((c = wintosystrayicon(ev->window))) {
+ if (ev->atom == XA_WM_NORMAL_HINTS) {
+ updatesizehints(c);
+ updatesystrayicongeom(c, c->w, c->h);
+ }
+ else
+ updatesystrayiconstate(c, ev);
+ resizebarwin(selmon);
+ updatesystray();
+ }
if ((ev->window == root) && (ev->atom == XA_WM_NAME))
updatestatus();
else if (ev->state == PropertyDelete)
@@ -1265,6 +1399,20 @@ recttomon(int x, int y, int w, int h)
return r;
}
+void
+removesystrayicon(Client *i)
+{
+ Client **ii;
+
+ if (!showsystray || !i)
+ return;
+ for (ii = &systray->icons; *ii && *ii != i; ii = &(*ii)->next);
+ if (ii)
+ *ii = i->next;
+ free(i);
+}
+
+
void
resize(Client *c, int x, int y, int w, int h, int interact)
{
@@ -1272,6 +1420,14 @@ resize(Client *c, int x, int y, int w, int h, int interact)
resizeclient(c, x, y, w, h);
}
+void
+resizebarwin(Monitor *m) {
+ unsigned int w = m->ww;
+ if (showsystray && m == systraytomon(m))
+ w -= getsystraywidth();
+ XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, w, bh);
+}
+
void
resizeclient(Client *c, int x, int y, int w, int h)
{
@@ -1344,6 +1500,19 @@ resizemouse(const Arg *arg)
}
}
+void
+resizerequest(XEvent *e)
+{
+ XResizeRequestEvent *ev = &e->xresizerequest;
+ Client *i;
+
+ if ((i = wintosystrayicon(ev->window))) {
+ updatesystrayicongeom(i, ev->width, ev->height);
+ resizebarwin(selmon);
+ updatesystray();
+ }
+}
+
void
restack(Monitor *m)
{
@@ -1433,26 +1602,36 @@ setclientstate(Client *c, long state)
}
int
-sendevent(Client *c, Atom proto)
+sendevent(Window w, Atom proto, int mask, long d0, long d1, long d2, long d3, long d4)
{
int n;
- Atom *protocols;
+ Atom *protocols, mt;
int exists = 0;
XEvent ev;
- if (XGetWMProtocols(dpy, c->win, &protocols, &n)) {
- while (!exists && n--)
- exists = protocols[n] == proto;
- XFree(protocols);
+ if (proto == wmatom[WMTakeFocus] || proto == wmatom[WMDelete]) {
+ mt = wmatom[WMProtocols];
+ if (XGetWMProtocols(dpy, w, &protocols, &n)) {
+ while (!exists && n--)
+ exists = protocols[n] == proto;
+ XFree(protocols);
+ }
+ }
+ else {
+ exists = True;
+ mt = proto;
}
if (exists) {
ev.type = ClientMessage;
- ev.xclient.window = c->win;
- ev.xclient.message_type = wmatom[WMProtocols];
+ ev.xclient.window = w;
+ ev.xclient.message_type = mt;
ev.xclient.format = 32;
- ev.xclient.data.l[0] = proto;
- ev.xclient.data.l[1] = CurrentTime;
- XSendEvent(dpy, c->win, False, NoEventMask, &ev);
+ ev.xclient.data.l[0] = d0;
+ ev.xclient.data.l[1] = d1;
+ ev.xclient.data.l[2] = d2;
+ ev.xclient.data.l[3] = d3;
+ ev.xclient.data.l[4] = d4;
+ XSendEvent(dpy, w, False, mask, &ev);
}
return exists;
}
@@ -1466,7 +1645,7 @@ setfocus(Client *c)
XA_WINDOW, 32, PropModeReplace,
(unsigned char *) &(c->win), 1);
}
- sendevent(c, wmatom[WMTakeFocus]);
+ sendevent(c->win, wmatom[WMTakeFocus], NoEventMask, wmatom[WMTakeFocus], CurrentTime, 0, 0, 0);
}
void
@@ -1555,6 +1734,10 @@ setup(void)
wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False);
netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
+ netatom[NetSystemTray] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_S0", False);
+ netatom[NetSystemTrayOP] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_OPCODE", False);
+ netatom[NetSystemTrayOrientation] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_ORIENTATION", False);
+ netatom[NetSystemTrayOrientationHorz] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_ORIENTATION_HORZ", False);
netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False);
netatom[NetWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
@@ -1562,6 +1745,9 @@ setup(void)
netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
+ xatom[Manager] = XInternAtom(dpy, "MANAGER", False);
+ xatom[Xembed] = XInternAtom(dpy, "_XEMBED", False);
+ xatom[XembedInfo] = XInternAtom(dpy, "_XEMBED_INFO", False);
/* init cursors */
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
@@ -1570,6 +1756,8 @@ setup(void)
scheme = ecalloc(LENGTH(colors), sizeof(Clr *));
for (i = 0; i < LENGTH(colors); i++)
scheme[i] = drw_scm_create(drw, colors[i], 3);
+ /* init system tray */
+ updatesystray();
/* init bars */
updatebars();
updatestatus();
@@ -1701,7 +1889,18 @@ togglebar(const Arg *arg)
{
selmon->showbar = !selmon->showbar;
updatebarpos(selmon);
- XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
+ resizebarwin(selmon);
+ if (showsystray) {
+ XWindowChanges wc;
+ if (!selmon->showbar)
+ wc.y = -bh;
+ else if (selmon->showbar) {
+ wc.y = 0;
+ if (!selmon->topbar)
+ wc.y = selmon->mh - bh;
+ }
+ XConfigureWindow(dpy, systray->win, CWY, &wc);
+ }
arrange(selmon);
}
@@ -1796,11 +1995,18 @@ unmapnotify(XEvent *e)
else
unmanage(c, 0);
}
+ else if ((c = wintosystrayicon(ev->window))) {
+ /* KLUDGE! sometimes icons occasionally unmap their windows, but do
+ * _not_ destroy them. We map those windows back */
+ XMapRaised(dpy, c->win);
+ updatesystray();
+ }
}
void
updatebars(void)
{
+ unsigned int w;
Monitor *m;
XSetWindowAttributes wa = {
.override_redirect = True,
@@ -1811,10 +2017,15 @@ updatebars(void)
for (m = mons; m; m = m->next) {
if (m->barwin)
continue;
- m->barwin = XCreateWindow(dpy, root, m->wx, m->by, m->ww, bh, 0, DefaultDepth(dpy, screen),
+ w = m->ww;
+ if (showsystray && m == systraytomon(m))
+ w -= getsystraywidth();
+ m->barwin = XCreateWindow(dpy, root, m->wx, m->by, w, bh, 0, DefaultDepth(dpy, screen),
CopyFromParent, DefaultVisual(dpy, screen),
CWOverrideRedirect|CWBackPixmap|CWEventMask, &wa);
XDefineCursor(dpy, m->barwin, cursor[CurNormal]->cursor);
+ if (showsystray && m == systraytomon(m))
+ XMapRaised(dpy, systray->win);
XMapRaised(dpy, m->barwin);
XSetClassHint(dpy, m->barwin, &ch);
}
@@ -1990,6 +2201,121 @@ updatestatus(void)
if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
strcpy(stext, "dwm-"VERSION);
drawbar(selmon);
+ updatesystray();
+}
+
+void
+updatesystrayicongeom(Client *i, int w, int h)
+{
+ if (i) {
+ i->h = bh;
+ if (w == h)
+ i->w = bh;
+ else if (h == bh)
+ i->w = w;
+ else
+ i->w = (int) ((float)bh * ((float)w / (float)h));
+ applysizehints(i, &(i->x), &(i->y), &(i->w), &(i->h), False);
+ /* force icons into the systray dimensions if they don't want to */
+ if (i->h > bh) {
+ if (i->w == i->h)
+ i->w = bh;
+ else
+ i->w = (int) ((float)bh * ((float)i->w / (float)i->h));
+ i->h = bh;
+ }
+ }
+}
+
+void
+updatesystrayiconstate(Client *i, XPropertyEvent *ev)
+{
+ long flags;
+ int code = 0;
+
+ if (!showsystray || !i || ev->atom != xatom[XembedInfo] ||
+ !(flags = getatomprop(i, xatom[XembedInfo])))
+ return;
+
+ if (flags & XEMBED_MAPPED && !i->tags) {
+ i->tags = 1;
+ code = XEMBED_WINDOW_ACTIVATE;
+ XMapRaised(dpy, i->win);
+ setclientstate(i, NormalState);
+ }
+ else if (!(flags & XEMBED_MAPPED) && i->tags) {
+ i->tags = 0;
+ code = XEMBED_WINDOW_DEACTIVATE;
+ XUnmapWindow(dpy, i->win);
+ setclientstate(i, WithdrawnState);
+ }
+ else
+ return;
+ sendevent(i->win, xatom[Xembed], StructureNotifyMask, CurrentTime, code, 0,
+ systray->win, XEMBED_EMBEDDED_VERSION);
+}
+
+void
+updatesystray(void)
+{
+ XSetWindowAttributes wa;
+ XWindowChanges wc;
+ Client *i;
+ Monitor *m = systraytomon(NULL);
+ unsigned int x = m->mx + m->mw;
+ unsigned int w = 1;
+
+ if (!showsystray)
+ return;
+ if (!systray) {
+ /* init systray */
+ if (!(systray = (Systray *)calloc(1, sizeof(Systray))))
+ die("fatal: could not malloc() %u bytes\n", sizeof(Systray));
+ systray->win = XCreateSimpleWindow(dpy, root, x, m->by, w, bh, 0, 0, scheme[SchemeSel][ColBg].pixel);
+ wa.event_mask = ButtonPressMask | ExposureMask;
+ wa.override_redirect = True;
+ wa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
+ XSelectInput(dpy, systray->win, SubstructureNotifyMask);
+ XChangeProperty(dpy, systray->win, netatom[NetSystemTrayOrientation], XA_CARDINAL, 32,
+ PropModeReplace, (unsigned char *)&netatom[NetSystemTrayOrientationHorz], 1);
+ XChangeWindowAttributes(dpy, systray->win, CWEventMask|CWOverrideRedirect|CWBackPixel, &wa);
+ XMapRaised(dpy, systray->win);
+ XSetSelectionOwner(dpy, netatom[NetSystemTray], systray->win, CurrentTime);
+ if (XGetSelectionOwner(dpy, netatom[NetSystemTray]) == systray->win) {
+ sendevent(root, xatom[Manager], StructureNotifyMask, CurrentTime, netatom[NetSystemTray], systray->win, 0, 0);
+ XSync(dpy, False);
+ }
+ else {
+ fprintf(stderr, "dwm: unable to obtain system tray.\n");
+ free(systray);
+ systray = NULL;
+ return;
+ }
+ }
+ for (w = 0, i = systray->icons; i; i = i->next) {
+ /* make sure the background color stays the same */
+ wa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
+ XChangeWindowAttributes(dpy, i->win, CWBackPixel, &wa);
+ XMapRaised(dpy, i->win);
+ w += systrayspacing;
+ i->x = w;
+ XMoveResizeWindow(dpy, i->win, i->x, 0, i->w, i->h);
+ w += i->w;
+ if (i->mon != m)
+ i->mon = m;
+ }
+ w = w ? w + systrayspacing : 1;
+ x -= w;
+ XMoveResizeWindow(dpy, systray->win, x, m->by, w, bh);
+ wc.x = x; wc.y = m->by; wc.width = w; wc.height = bh;
+ wc.stack_mode = Above; wc.sibling = m->barwin;
+ XConfigureWindow(dpy, systray->win, CWX|CWY|CWWidth|CWHeight|CWSibling|CWStackMode, &wc);
+ XMapWindow(dpy, systray->win);
+ XMapSubwindows(dpy, systray->win);
+ /* redraw background */
+ XSetForeground(dpy, drw->gc, scheme[SchemeNorm][ColBg].pixel);
+ XFillRectangle(dpy, systray->win, drw->gc, 0, 0, w, bh);
+ XSync(dpy, False);
}
void
@@ -2057,6 +2383,16 @@ wintoclient(Window w)
return NULL;
}
+Client *
+wintosystrayicon(Window w) {
+ Client *i = NULL;
+
+ if (!showsystray || !w)
+ return i;
+ for (i = systray->icons; i && i->win != w; i = i->next) ;
+ return i;
+}
+
Monitor *
wintomon(Window w)
{
@@ -2110,6 +2446,22 @@ xerrorstart(Display *dpy, XErrorEvent *ee)
return -1;
}
+Monitor *
+systraytomon(Monitor *m) {
+ Monitor *t;
+ int i, n;
+ if(!systraypinning) {
+ if(!m)
+ return selmon;
+ return m == selmon ? m : NULL;
+ }
+ for(n = 1, t = mons; t && t->next; n++, t = t->next) ;
+ for(i = 1, t = mons; t && t->next && i < systraypinning; i++, t = t->next) ;
+ if(systraypinningfailfirst && n < systraypinning)
+ return mons;
+ return t;
+}
+
void
zoom(const Arg *arg)
{
--
2.17.1

View File

@ -0,0 +1,26 @@
# Template file for 'dwm'
pkgname=dwm
version=6.2
revision=5
makedepends="libXinerama-devel libXft-devel freetype-devel"
short_desc="Dynamic window manager for X"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="MIT"
homepage="http://dwm.suckless.org"
distfiles="https://dl.suckless.org/dwm/dwm-${version}.tar.gz"
checksum=97902e2e007aaeaa3c6e3bed1f81785b817b7413947f1db1d3b62b8da4cd110e
patch_args="-Np1"
do_build() {
[ -e ${FILESDIR}/config.h ] && cp ${FILESDIR}/config.h config.h
sed -i "/CFLAGS/s|\${CPPFLAGS}|& $CFLAGS|g" config.mk
sed -i "/LDFLAGS/s|\-s|$LDFLAGS|g" config.mk
make CC=$CC INCS="-I. -I${XBPS_CROSS_BASE}/usr/include/freetype2" LIBS="-lX11 -lXinerama -lXft -lfontconfig"
}
do_install() {
make PREFIX=/usr DESTDIR=$DESTDIR install
vinstall README 644 usr/share/doc/$pkgname
vinstall ${FILESDIR}/dwm.desktop 644 usr/share/xsessions
vlicense LICENSE
}

View File

@ -0,0 +1,95 @@
diff --git a/config.def.h b/config.def.h
index 86b7e76..d545925 100644
--- a/config.def.h
+++ b/config.def.h
@@ -2,18 +2,18 @@ static const char *background_color = "#3e3e3e";
static const char *border_color = "#ececec";
static const char *font_color = "#ececec";
static const char *font_pattern = "monospace:size=10";
-static const unsigned line_spacing = 5;
-static const unsigned int padding = 15;
+static unsigned line_spacing = 5;
+static unsigned int padding = 15;
-static const unsigned int width = 450;
-static const unsigned int border_size = 2;
-static const unsigned int pos_x = 30;
-static const unsigned int pos_y = 60;
+static unsigned int width = 450;
+static unsigned int border_size = 2;
+static unsigned int pos_x = 30;
+static unsigned int pos_y = 60;
enum corners { TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT };
enum corners corner = TOP_RIGHT;
-static const unsigned int duration = 5; /* in seconds */
+static unsigned int duration = 5; /* in seconds */
#define DISMISS_BUTTON Button1
#define ACTION_BUTTON Button3
diff --git a/herbe.c b/herbe.c
index 51d3990..574e967 100644
--- a/herbe.c
+++ b/herbe.c
@@ -1,5 +1,6 @@
#include <X11/Xlib.h>
#include <X11/Xft/Xft.h>
+#include <X11/Xresource.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
@@ -15,6 +16,13 @@
#define EXIT_FAIL 1
#define EXIT_DISMISS 2
+#define XRES_STR(name) \
+ if (XrmGetResource(db, "herbe." #name, "*", &type, &val)) \
+ name = val.addr
+#define XRES_INT(name) \
+ if (XrmGetResource(db, "herbe." #name, "*", &type, &val)) \
+ name = strtoul(val.addr, 0, 10)
+
Display *display;
Window window;
int exit_code = EXIT_DISMISS;
@@ -107,6 +115,28 @@ int main(int argc, char *argv[])
if (!(display = XOpenDisplay(0)))
die("Cannot open display");
+ XrmInitialize();
+
+ char *res_man = XResourceManagerString(display);
+ XrmDatabase db = XrmGetStringDatabase(res_man);
+
+ char *type;
+ XrmValue val;
+
+ XRES_STR(background_color);
+ XRES_STR(border_color);
+ XRES_STR(font_color);
+ XRES_STR(font_pattern);
+
+ XRES_INT(line_spacing);
+ XRES_INT(padding);
+ XRES_INT(width);
+ XRES_INT(border_size);
+ XRES_INT(pos_x);
+ XRES_INT(pos_y);
+ XRES_INT(corner);
+ XRES_INT(duration);
+
int screen = DefaultScreen(display);
Visual *visual = DefaultVisual(display, screen);
Colormap colormap = DefaultColormap(display, screen);
@@ -214,7 +244,8 @@ int main(int argc, char *argv[])
XftDrawDestroy(draw);
XftColorFree(display, visual, colormap, &color);
XftFontClose(display, font);
+ XrmDestroyDatabase(db);
XCloseDisplay(display);
return exit_code;
-}
\ No newline at end of file
+}

22
Plantillas/herbe/template Normal file
View File

@ -0,0 +1,22 @@
# Template file for 'herbe'
pkgname=herbe
version=1.0.0
revision=1
build_style=gnu-makefile
makedepends="libXft-devel freetype-devel"
short_desc="Daemon-less notifications without D-Bus. Minimal and lightweight"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="MIT"
homepage="https://github.com/dudik/herbe"
distfiles="${homepage}/archive/${version}.tar.gz"
checksum=78e454159050c86e030fb5a6cf997ac914345210cdf5a4ca4d7600c5296b7f76
patch_args="-Np1"
do_build() {
CFLAGS="-I ${XBPS_CROSS_BASE}/usr/include/freetype2"
}
do_install() {
make PREFIX=/usr DESTDIR=$DESTDIR install
vlicense LICENSE
}

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec env MOZ_ENABLE_WAYLAND= /usr/lib/icecat/icecat "$@"

View File

@ -0,0 +1,116 @@
[Desktop Entry]
Name=GNU-IceCat
GenericName=GNU Web Browser
GenericName[af]=GNU Web Blaaier
GenericName[ar]=GNU متصفح ويب
GenericName[az]=GNU Veb Səyyahı
GenericName[bg]=GNU Браузър
GenericName[bn]=GNU ওয়েব ব্রাউজার
GenericName[br]=GNU Furcher ar Gwiad
GenericName[bs]=GNU WWW Preglednik
GenericName[ca]=GNU Fullejador web
GenericName[cs]=GNU WWW prohlížeč
GenericName[cy]=GNU Porydd Gwe
GenericName[da]=GNU Browser
GenericName[de]=GNU Web-Browser
GenericName[el]=GNU Περιηγητής Ιστού
GenericName[eo]=GNU TTT-legilo
GenericName[es]=GNU Navegador web
GenericName[et]=GNU Veebilehitseja
GenericName[eu]=GNU Web arakatzailea
GenericName[fa]=GNU مرورگر وب
GenericName[fi]=GNU WWW-selain
GenericName[fo]=GNU Alnótsfar
GenericName[fr]=GNU Navigateur web
GenericName[gl]=GNU Navegador Web
GenericName[he]=GNU דפדפן אינטרנט
GenericName[hi]=GNU वेब ब्राउज़र
GenericName[hr]=GNU Web preglednik
GenericName[hu]=GNU Webböngésző
GenericName[is]=GNU Vafri
GenericName[it]=GNU Browser Web
GenericName[ja]=GNU ウェブブラウザ
GenericName[ko]=GNU 웹 브라우저
GenericName[lo]=GNU ເວັບບຣາວເຊີ
GenericName[lt]=GNU Žiniatinklio naršyklė
GenericName[lv]=GNU Web Pārlūks
GenericName[mk]=GNU Прелистувач на Интернет
GenericName[mn]=GNU Веб-Хөтөч
GenericName[nb]=GNU Nettleser
GenericName[nds]=GNU Nettkieker
GenericName[nl]=GNU Webbrowser
GenericName[nn]=GNU Nettlesar
GenericName[nso]=GNU Seinyakisi sa Web
GenericName[pa]=GNU ਵੈਬ ਝਲਕਾਰਾ
GenericName[pl]=GNU Przeglądarka WWW
GenericName[pt]=GNU Navegador Web
GenericName[pt_BR]=GNU Navegador Web
GenericName[ro]=GNU Navigator de web
GenericName[ru]=GNU Веб-браузер
GenericName[se]=GNU Fierpmádatlogan
GenericName[sk]=GNU Webový prehliadač
GenericName[sl]=GNU Spletni brskalnik
GenericName[sr]=GNU Веб претраживач
GenericName[sr@Latn]=GNU Veb pretraživač
GenericName[ss]=GNU Ibrawuza yeWeb
GenericName[sv]=GNU Webbläsare
GenericName[ta]=GNU வலை உலாவி
GenericName[tg]=GNU Тафсиргари вэб
GenericName[th]=GNU เว็บบราวเซอร์
GenericName[tr]=GNU Web Tarayıcı
GenericName[uk]=GNU Навігатор Тенет
GenericName[uz]=GNU Веб-браузер
GenericName[ven]=GNU Buronza ya Webu
GenericName[vi]=GNU Trình duyệt Web
GenericName[wa]=GNU Betchteu waibe
GenericName[xh]=GNU Umkhangeli zincwadi we Web
GenericName[zh_CN]=GNU 网页浏览器
GenericName[zh_TW]=GNU 網頁瀏覽器
GenericName[zu]=GNU Umcingi we-Web
Comment=Browse the World Wide Web
Comment[ar]=تصفح الشبكة العنكبوتية العالمية
Comment[ast]=Restola pela Rede
Comment[bn]=ইন্টারনেট ব্রাউজ করুন
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížení stránek World Wide Webu
Comment[da]=Surf på internettet
Comment[de]=Im Internet surfen
Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web)
Comment[es]=Navegue por la web
Comment[et]=Lehitse veebi
Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید
Comment[fi]=Selaa Internetin WWW-sivuja
Comment[fr]=Naviguer sur le Web
Comment[gl]=Navegar pola rede
Comment[he]=גלישה ברחבי האינטרנט
Comment[hr]=Pretražite web
Comment[hu]=A világháló böngészése
Comment[it]=Esplora il web
Comment[ja]=ウェブを閲覧します
Comment[ko]=웹을 돌아 다닙니다
Comment[ku]=Li torê bigere
Comment[lt]=Naršykite internete
Comment[nb]=Surf på nettet
Comment[nl]=Verken het internet
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegue na Internet
Comment[pt_BR]=Navegue na Internet
Comment[ro]=Navigați pe Internet
Comment[ru]=Доступ в Интернет
Comment[sk]=Prehliadanie internetu
Comment[sl]=Brskajte po spletu
Comment[sv]=Surfa på webben
Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ
Comment[uk]=Перегляд сторінок Інтернету
Comment[vi]=Để duyệt các trang web
Comment[zh_CN]=浏览互联网
Comment[zh_TW]=瀏覽網際網路
Exec=icecat %u
Icon=icecat
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
Categories=Network;WebBrowser;

View File

@ -0,0 +1,35 @@
ac_add_options --prefix=/usr
ac_add_options --libdir=/usr/lib
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --with-system-icu
# XXX: the system's libpng doesn't have APNG support
ac_add_options --without-system-png
ac_add_options --enable-system-pixman
ac_add_options --enable-system-ffi
nspr_config_args="
--libdir=${XBPS_CROSS_BASE}/usr/lib
--includedir=${XBPS_CROSS_BASE}/usr/include/nspr"
nss_config_args="
--libdir=${XBPS_CROSS_BASE}/usr/lib
--includedir=${XBPS_CROSS_BASE}/usr/include/nss"
ac_add_options --disable-tests
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --disable-install-strip
ac_add_options --disable-strip
ac_add_options --disable-profiling
ac_add_options --enable-release
ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --enable-official-branding
ac_add_options --enable-application=browser
ac_add_options --allow-addon-sideload

View File

@ -0,0 +1,71 @@
/* $OpenBSD: stab.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */
/* $NetBSD: stab.h,v 1.4 1994/10/26 00:56:25 cgd Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)stab.h 5.2 (Berkeley) 4/4/91
*/
#ifndef _STAB_H_
#define _STAB_H_
/*
* The following are symbols used by various debuggers and by the Pascal
* compiler. Each of them must have one (or more) of the bits defined by
* the N_STAB mask set.
*/
#define N_GSYM 0x20 /* global symbol */
#define N_FNAME 0x22 /* F77 function name */
#define N_FUN 0x24 /* procedure name */
#define N_STSYM 0x26 /* data segment variable */
#define N_LCSYM 0x28 /* bss segment variable */
#define N_MAIN 0x2a /* main function name */
#define N_PC 0x30 /* global Pascal symbol */
#define N_RSYM 0x40 /* register variable */
#define N_SLINE 0x44 /* text segment line number */
#define N_DSLINE 0x46 /* data segment line number */
#define N_BSLINE 0x48 /* bss segment line number */
#define N_SSYM 0x60 /* structure/union element */
#define N_SO 0x64 /* main source file name */
#define N_LSYM 0x80 /* stack variable */
#define N_BINCL 0x82 /* include file beginning */
#define N_SOL 0x84 /* included source file name */
#define N_PSYM 0xa0 /* parameter variable */
#define N_EINCL 0xa2 /* include file end */
#define N_ENTRY 0xa4 /* alternate entry point */
#define N_LBRAC 0xc0 /* left bracket */
#define N_EXCL 0xc2 /* deleted include file */
#define N_RBRAC 0xe0 /* right bracket */
#define N_BCOMM 0xe2 /* begin common */
#define N_ECOMM 0xe4 /* end common */
#define N_ECOML 0xe8 /* end common (local name) */
#define N_LENG 0xfe /* length of preceding entry */
#endif /* !_STAB_H_ */

View File

@ -0,0 +1,9 @@
// Use LANG environment variable to choose locale
pref("intl.locale.matchOS", true);
// Disable default browser checking.
pref("browser.shell.checkDefaultBrowser", false);
// Don't disable our bundled extensions in the application directory
pref("extensions.autoDisableScopes", 11);
pref("extensions.shownSelectionUI", true);

View File

@ -0,0 +1,88 @@
https://bugzilla.mozilla.org/show_bug.cgi?id=1626236
https://bug1626236.bmoattachments.org/attachment.cgi?id=9137096
# HG changeset patch
# User msirringhaus@suse.de
# Date 1582805876 -3600
# Thu Feb 27 13:17:56 2020 +0100
# Node ID cc3d09abea31068e57f1ab918782f9f86fc6a158
# Parent 9cd90914846f667f18babc491a74c164ae5d6e9f
imported patch decoder_workaround.patch
diff -r 9cd90914846f image/decoders/nsGIFDecoder2.cpp
--- image/decoders/nsGIFDecoder2.cpp Thu Feb 27 12:57:14 2020 +0100
+++ image/decoders/nsGIFDecoder2.cpp Fri Mar 27 13:06:18 2020 +0100
@@ -422,6 +422,9 @@
MOZ_ASSERT(mSwizzleFn);
uint8_t* data = reinterpret_cast<uint8_t*>(aColormap);
mSwizzleFn(data, data, aColors);
+#if MOZ_BIG_ENDIAN()
+ SwizzleRow(SurfaceFormat::A8R8G8B8, SurfaceFormat::B8G8R8A8)(data, data, aColors);
+#endif
}
LexerResult nsGIFDecoder2::DoDecode(SourceBufferIterator& aIterator,
diff -r 9cd90914846f image/decoders/nsJPEGDecoder.cpp
--- image/decoders/nsJPEGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
+++ image/decoders/nsJPEGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
@@ -263,6 +263,9 @@
case JCS_YCbCr:
// By default, we will output directly to BGRA. If we need to apply
// special color transforms, this may change.
+#if MOZ_BIG_ENDIAN()
+ mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB;
+#else
switch (SurfaceFormat::OS_RGBX) {
case SurfaceFormat::B8G8R8X8:
mInfo.out_color_space = JCS_EXT_BGRX;
@@ -277,6 +280,7 @@
mState = JPEG_ERROR;
return Transition::TerminateFailure();
}
+#endif
break;
case JCS_CMYK:
case JCS_YCCK:
diff -r 9cd90914846f image/decoders/nsPNGDecoder.cpp
--- image/decoders/nsPNGDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
+++ image/decoders/nsPNGDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
@@ -361,7 +361,7 @@
IResumable* aOnResume) {
MOZ_ASSERT(!HasError(), "Shouldn't call DoDecode after error!");
- return mLexer.Lex(aIterator, aOnResume,
+ LexerResult res = mLexer.Lex(aIterator, aOnResume,
[=](State aState, const char* aData, size_t aLength) {
switch (aState) {
case State::PNG_DATA:
@@ -371,6 +371,14 @@
}
MOZ_CRASH("Unknown State");
});
+
+#if MOZ_BIG_ENDIAN()
+ if(res.is<TerminalState>() && res.as<TerminalState>() == TerminalState::SUCCESS) {
+ NativeEndian::swapToLittleEndianInPlace<uint32_t>((uint32_t*)(mImageData), mImageDataLength / 4);
+ }
+#endif
+
+ return res;
}
LexerTransition<nsPNGDecoder::State> nsPNGDecoder::ReadPNGData(
diff -r 9cd90914846f image/decoders/nsWebPDecoder.cpp
--- image/decoders/nsWebPDecoder.cpp Thu Feb 27 12:57:14 2020 +0100
+++ image/decoders/nsWebPDecoder.cpp Fri Mar 27 13:06:18 2020 +0100
@@ -237,7 +237,12 @@
// WebP doesn't guarantee that the alpha generated matches the hint in the
// header, so we always need to claim the input is BGRA. If the output is
// BGRX, swizzling will mask off the alpha channel.
+#if MOZ_BIG_ENDIAN()
+ mBuffer.colorspace = MODE_ARGB;
+ SurfaceFormat inFormat = mFormat;
+#else
SurfaceFormat inFormat = SurfaceFormat::OS_RGBA;
+#endif
SurfacePipeFlags pipeFlags = SurfacePipeFlags();
if (mFormat == SurfaceFormat::OS_RGBA &&

View File

@ -0,0 +1,11 @@
--- media/libopus/silk/arm/arm_silk_map.c.orig 2019-03-19 20:55:01.249609964 +0100
+++ media/libopus/silk/arm/arm_silk_map.c 2019-03-19 20:55:25.769400255 +0100
@@ -28,7 +28,7 @@
# include "config.h"
#endif
-#include "main_FIX.h"
+#include "../fixed/main_FIX.h"
#include "NSQ.h"
#include "SigProc_FIX.h"

View File

@ -0,0 +1,16 @@
terrible hack to fix cross builds
overwrite HOST_* flags to get rid of -MF
note: this patch was used from firefox-77 until 80, dropped with the update to 81
--- third_party/rust/glslopt/build.rs
+++ third_party/rust/glslopt/build.rs
@@ -28,6 +28,8 @@
env::remove_var(format!("CXXFLAGS_{}", &target));
env::remove_var(format!("CFLAGS_{}", target.replace("-", "_")));
env::remove_var(format!("CXXFLAGS_{}", target.replace("-", "_")));
+ env::set_var("HOST_CFLAGS", "-O2");
+ env::set_var("HOST_CXXFLAGS", "-O2");
configure(&mut cc::Build::new())
.warnings(false)

View File

@ -0,0 +1,11 @@
--- taskcluster/docker/icecat-snap/icecat.desktop.orig 2019-01-18 19:31:39.428839442 +0100
+++ taskcluster/docker/icecat-snap/icecat.desktop 2019-01-18 19:32:20.689063456 +0100
@@ -154,7 +154,7 @@
Terminal=false
X-MultipleArgs=false
Type=Application
-Icon=/browser/chrome/icons/default/default128.png
+Icon=icecat
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true

View File

@ -0,0 +1,11 @@
--- media/webrtc/signaling/src/sdp/sipcc/sdp_os_defs.h
+++ media/webrtc/signaling/src/sdp/sipcc/sdp_os_defs.h
@@ -27,8 +27,5 @@
typedef int16_t int16;
typedef unsigned short ushort;
typedef unsigned long ulong;
-#ifndef __GNUC_STDC_INLINE__
-#define inline
-#endif
#endif /* _SDP_OS_DEFS_H_ */

View File

@ -0,0 +1,11 @@
--- mozglue/misc/StackWalk.cpp 2017-04-11 04:13:21.000000000 +0200
+++ mozglue/misc/StackWalk.cpp 2017-11-29 15:23:07.218649970 +0100
@@ -41,7 +41,7 @@
#define MOZ_STACKWALK_SUPPORTS_MACOSX 0
#endif
-#if (defined(linux) && \
+#if defined(__GLIBC__) && (defined(linux) && \
((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
defined(HAVE__UNWIND_BACKTRACE)))
#define MOZ_STACKWALK_SUPPORTS_LINUX 1

View File

@ -0,0 +1,39 @@
# HG changeset patch
# User Lee Salzman <lsalzman@mozilla.com>
# Date 1462463631 14400
# Thu May 05 11:53:51 2016 -0400
# Node ID 8da374804a09977c8f89af5e6e0cb37cb074595d
# Parent 29662e28a9c93ac67ee0b8ddfb65a9f29bbf73f5
handle big-endian formats in Cairo format conversions
--- gfx/2d/HelpersCairo.h
+++ gfx/2d/HelpersCairo.h
@@ -147,7 +147,14 @@ static inline cairo_format_t GfxFormatToCairoFormat(Su
case SurfaceFormat::R5G6B5_UINT16:
return CAIRO_FORMAT_RGB16_565;
default:
- gfxCriticalError() << "Unknown image format " << (int)format;
+ // _UINT32 formats don't match B8G8R8[AX]8 on big-endian platforms,
+ // and Moz2d uses B8G8R8[AX]8 as if it was _UINT32.
+ // See bug 1269654
+ if (format == SurfaceFormat::B8G8R8X8) {
+ return CAIRO_FORMAT_RGB24;
+ } else if (format != SurfaceFormat::B8G8R8A8) {
+ gfxCriticalError() << "Unknown image format " << (int)format;
+ }
return CAIRO_FORMAT_ARGB32;
}
}
@@ -177,7 +184,11 @@ static inline cairo_content_t GfxFormatToCairoContent(
case SurfaceFormat::A8:
return CAIRO_CONTENT_ALPHA;
default:
- gfxCriticalError() << "Unknown image content format " << (int)format;
+ if (format == SurfaceFormat::B8G8R8X8) {
+ return CAIRO_CONTENT_COLOR;
+ } else if (format != SurfaceFormat::B8G8R8A8) {
+ gfxCriticalError() << "Unknown image content format " << (int)format;
+ }
return CAIRO_CONTENT_COLOR_ALPHA;
}
}

View File

@ -0,0 +1,13 @@
--- tools/profiler/core/platform-linux-android.cpp.orig 2019-01-29 12:09:40.980448579 +0100
+++ tools/profiler/core/platform-linux-android.cpp 2019-01-29 12:11:09.689590967 +0100
@@ -497,8 +501,10 @@
ucontext_t sSyncUContext;
void Registers::SyncPopulate() {
+#if defined(__GLIBC__)
if (!getcontext(&sSyncUContext)) {
PopulateRegsFromContext(*this, &sSyncUContext);
}
+#endif
}
#endif

View File

@ -0,0 +1,15 @@
--- js/src/wasm/WasmSignalHandlers.cpp
+++ js/src/wasm/WasmSignalHandlers.cpp
@@ -243,9 +243,9 @@
// If you run into compile problems on a tier-3 platform, you can disable the
// emulation here.
-#if defined(__linux__) && defined(__arm__)
-# define WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS
-#endif
+// #if defined(__linux__) && defined(__arm__)
+// # define WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS
+// #endif
#ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS
# include <sys/user.h>

View File

@ -0,0 +1,20 @@
--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c.orig 2019-01-29 11:20:52.298793223 +0100
+++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features_linux.c 2019-01-29 11:21:48.250250850 +0100
@@ -14,7 +14,7 @@
#ifndef __GLIBC_PREREQ
#define __GLIBC_PREREQ(a, b) 0
#endif
-#if __GLIBC_PREREQ(2, 16)
+#if !__GLIBC__ || __GLIBC_PREREQ(2, 16)
#include <sys/auxv.h>
#else
#include <fcntl.h>
@@ -32,7 +32,7 @@
int architecture = 0;
unsigned long hwcap = 0;
const char* platform = NULL;
-#if __GLIBC_PREREQ(2, 16)
+#if !__GLIBC__ || __GLIBC_PREREQ(2, 16)
hwcap = getauxval(AT_HWCAP);
platform = (const char*)getauxval(AT_PLATFORM);
#else

View File

@ -0,0 +1,26 @@
Enable FLAC on platforms without ffvpx like powerpc*
diff --git dom/media/flac/FlacDecoder.cpp dom/media/flac/FlacDecoder.cpp
index 53fc3c9937f7..b23771ab80fa 100644
--- dom/media/flac/FlacDecoder.cpp
+++ dom/media/flac/FlacDecoder.cpp
@@ -7,6 +7,7 @@
#include "FlacDecoder.h"
#include "MediaContainerType.h"
#include "mozilla/StaticPrefs_media.h"
+#include "PDMFactory.h"
namespace mozilla {
@@ -14,6 +15,11 @@ namespace mozilla {
bool FlacDecoder::IsEnabled() {
#ifdef MOZ_FFVPX
return StaticPrefs::media_flac_enabled();
+#elif defined(MOZ_FFMPEG)
+ RefPtr<PDMFactory> platform = new PDMFactory();
+ return StaticPrefs::media_flac_enabled() &&
+ platform->SupportsMimeType("audio/flac"_ns,
+ /* DecoderDoctorDiagnostics* */ nullptr);
#else
// Until bug 1295886 is fixed.
return false;

View File

@ -0,0 +1,34 @@
--- xpcom/base/nsMemoryReporterManager.cpp.orig 2019-03-19 17:12:20.844810044 +0100
+++ xpcom/base/nsMemoryReporterManager.cpp 2019-03-19 17:13:32.505133615 +0100
@@ -123,6 +123,7 @@
return GetProcSelfSmapsPrivate(aN);
}
+#ifdef __GLIBC__
# ifdef HAVE_MALLINFO
# define HAVE_SYSTEM_HEAP_REPORTER 1
static MOZ_MUST_USE nsresult SystemHeapSize(int64_t* aSizeOut) {
@@ -142,6 +143,7 @@
return NS_OK;
}
# endif
+#endif // __GLIBC__
#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
@@ -642,6 +644,7 @@
return NS_OK;
}
+#ifdef __GLIBC__
# define HAVE_SYSTEM_HEAP_REPORTER 1
// Windows can have multiple separate heaps. During testing there were multiple
// heaps present but the non-default ones had sizes no more than a few 10s of
@@ -698,6 +701,7 @@
*aSizeOut = heapsSize;
return NS_OK;
}
+#endif // __GLIBC__
struct SegmentKind {
DWORD mState;

View File

@ -0,0 +1,26 @@
--- build/moz.configure/rust.configure 2019-10-28 12:05:04.930404603 +0700
+++ build/moz.configure/rust.configure 2019-10-28 12:09:42.742338957 +0700
@@ -297,11 +297,20 @@
suffix = 'hf'
else:
suffix = ''
+
+ narrowed = []
for p in prefixes:
for c in candidates:
- if c.rust_target.startswith('{}-'.format(p)) and \
- c.rust_target.endswith(suffix):
- return c.rust_target
+ if c.rust_target.startswith('{}-'.format(p)):
+ narrowed.append(c.rust_target)
+
+ for target in narrowed:
+ if target.endswith(host_or_target.raw_os):
+ return target
+
+ for target in narrowed:
+ if target.endswith(suffix):
+ return target
# See if we can narrow down on the exact alias
narrowed = [c for c in candidates if c.target.alias == host_or_target.alias]

View File

@ -0,0 +1,36 @@
This is not a complete/correct patch, but it makes firefox build. For now
mostly for tracking, so a real fix can be made, but right now it still
segfaults on start.
Ref: https://hg.mozilla.org/mozilla-central/rev/08339a56f3ae
Ref: https://hg.mozilla.org/mozilla-central/rev/d16fcad6aa60
Ref: https://hg.mozilla.org/mozilla-central/rev/ab87611d012e
Ref: https://hg.mozilla.org/mozilla-central/file/tip/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_linux.cpp
--- xpcom/reflect/xptcall/xptcall.h
+++ xpcom/reflect/xptcall/xptcall.h
@@ -71,6 +71,11 @@ struct nsXPTCVariant {
ExtendedVal ext;
};
+#if defined(__powerpc__) && !defined(__powerpc64__)
+ // this field is still necessary on ppc32, as an address
+ // to it is taken certain places in xptcall
+ void *ptr;
+#endif
nsXPTType type;
uint8_t flags;
@@ -91,7 +96,12 @@ struct nsXPTCVariant {
};
void ClearFlags() { flags = 0; }
+#if defined(__powerpc__) && !defined(__powerpc64__)
+ void SetIndirect() { ptr = &val; flags |= IS_INDIRECT; }
+ bool IsPtrData() const { return IsIndirect(); }
+#else
void SetIndirect() { flags |= IS_INDIRECT; }
+#endif
bool IsIndirect() const { return 0 != (flags & IS_INDIRECT); }

View File

@ -0,0 +1,42 @@
Mozilla rustc check does not support crossbuild: let's remove it
Remove calls to unwrap_rustup, they fail if rustup isn't present
--- build/moz.configure/rust.configure.orig 2019-10-17 04:19:59.000000000 +0700
+++ build/moz.configure/rust.configure 2019-10-22 11:48:55.616022140 +0700
@@ -78,9 +78,6 @@
return unwrap
-rustc = unwrap_rustup(rustc, 'rustc')
-cargo = unwrap_rustup(cargo, 'cargo')
-
set_config('CARGO', cargo)
set_config('RUSTC', rustc)
@@ -348,26 +345,6 @@
os.write(in_fd, source)
os.close(in_fd)
-
- cmd = [
- rustc,
- '--crate-type', 'staticlib',
- target_arg,
- '-o', out_path,
- in_path,
- ]
-
- def failed():
- die(dedent('''\
- Cannot compile for {} with {}
- The target may be unsupported, or you may not have
- a rust std library for that target installed. Try:
-
- rustup target add {}
- '''.format(host_or_target.alias, rustc, rustc_target)))
- check_cmd_output(*cmd, onerror=failed)
- if not os.path.exists(out_path) or os.path.getsize(out_path) == 0:
- failed()
finally:
os.remove(in_path)
os.remove(out_path)

View File

@ -0,0 +1,21 @@
The configure check fails for cross builds.
i128 is supported since rust-1.26, so it is safe for us to assume it is always present
--- third_party/rust/num-traits/build.rs.orig 2020-02-14 23:57:25.985355610 +0100
+++ third_party/rust/num-traits/build.rs 2020-02-14 23:58:36.255710188 +0100
@@ -1,14 +1,5 @@
-extern crate autocfg;
-
-use std::env;
-
fn main() {
- let ac = autocfg::new();
- if ac.probe_type("i128") {
- println!("cargo:rustc-cfg=has_i128");
- } else if env::var_os("CARGO_FEATURE_I128").is_some() {
- panic!("i128 support was not detected!");
- }
+ println!("cargo:rustc-cfg=has_i128");
autocfg::rerun_path("build.rs");
}

View File

@ -0,0 +1,13 @@
make SYS_fork non-fatal, musl uses it for fork(2)
--- security/sandbox/linux/SandboxFilter.cpp
+++ security/sandbox/linux/SandboxFilter.cpp
@@ -1253,6 +1253,8 @@
// usually do something reasonable on error.
case __NR_clone:
return ClonePolicy(Error(EPERM));
+ case __NR_fork:
+ return Error(ENOSYS);
# ifdef __NR_fadvise64
case __NR_fadvise64:

View File

@ -0,0 +1,17 @@
--- security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:41:14.556378950 +0100
+++ security/sandbox/linux/SandboxFilter.cpp 2020-11-23 22:40:23.595806444 +0100
@@ -68,7 +68,13 @@
// The headers define O_LARGEFILE as 0 on x86_64, but we need the
// actual value because it shows up in file flags.
-#define O_LARGEFILE_REAL 00100000
+#if defined(__x86_64__) || defined(__i386__) || defined(__mips__)
+#define O_LARGEFILE_REAL 0100000
+#elif defined(__powerpc__)
+#define O_LARGEFILE_REAL 0200000
+#else
+#define O_LARGEFILE_REAL O_LARGEFILE
+#endif
// Not part of UAPI, but userspace sees it in F_GETFL; see bug 1650751.
#define FMODE_NONOTIFY 0x4000000

View File

@ -0,0 +1,77 @@
https://bugzilla.mozilla.org/show_bug.cgi?id=1504834#c5
https://bugzilla.mozilla.org/attachment.cgi?id=9028600
--- gfx/skia/skia/third_party/skcms/skcms.cc
+++ gfx/skia/skia/third_party/skcms/skcms.cc
@@ -30,6 +30,8 @@
#include <avx512fintrin.h>
#include <avx512dqintrin.h>
#endif
+#elif defined(__BIG_ENDIAN__)
+ #define SKCMS_PORTABLE
#endif
// sizeof(x) will return size_t, which is 32-bit on some machines and 64-bit on others.
@@ -280,20 +282,28 @@ enum {
static uint16_t read_big_u16(const uint8_t* ptr) {
uint16_t be;
memcpy(&be, ptr, sizeof(be));
-#if defined(_MSC_VER)
- return _byteswap_ushort(be);
+#if defined(__BIG_ENDIAN__)
+ return be;
#else
+ #if defined(_MSC_VER)
+ return _byteswap_ushort(be);
+ #else
return __builtin_bswap16(be);
+ #endif
#endif
}
static uint32_t read_big_u32(const uint8_t* ptr) {
uint32_t be;
memcpy(&be, ptr, sizeof(be));
-#if defined(_MSC_VER)
- return _byteswap_ulong(be);
+#if defined(__BIG_ENDIAN__)
+ return be;
#else
+ #if defined(_MSC_VER)
+ return _byteswap_ulong(be);
+ #else
return __builtin_bswap32(be);
+ #endif
#endif
}
--- gfx/2d/DrawTargetSkia.cpp
+++ gfx/2d/DrawTargetSkia.cpp
@@ -138,8 +138,7 @@ static IntRect CalculateSurfaceBounds(const IntSize& a
return surfaceBounds.Intersect(bounds);
}
-static const int kARGBAlphaOffset =
- SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0;
+static const int kARGBAlphaOffset = 0;
static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize,
const int32_t aStride, SurfaceFormat aFormat) {
--- gfx/2d/Types.h
+++ gfx/2d/Types.h
@@ -87,15 +87,8 @@ enum class SurfaceFormat : int8_t {
// The following values are endian-independent synonyms. The _UINT32 suffix
// indicates that the name reflects the layout when viewed as a uint32_t
// value.
-#if MOZ_LITTLE_ENDIAN()
A8R8G8B8_UINT32 = B8G8R8A8, // 0xAARRGGBB
X8R8G8B8_UINT32 = B8G8R8X8, // 0x00RRGGBB
-#elif MOZ_BIG_ENDIAN()
- A8R8G8B8_UINT32 = A8R8G8B8, // 0xAARRGGBB
- X8R8G8B8_UINT32 = X8R8G8B8, // 0x00RRGGBB
-#else
-# error "bad endianness"
-#endif
// The following values are OS and endian-independent synonyms.
//

View File

@ -0,0 +1,44 @@
# HG changeset patch
# Parent aecb4600e5da17443b224c79eee178c1d8e155e3
For FF68, AntiAliasing of XULTexts seem to be broken on big endian (s390x). Text and icons of the sandwich-menu to the
right of the address bar, as well as plugin-windows appears transparant, which usually means unreadable (white on white).
diff -r aecb4600e5da gfx/skia/skia/include/private/SkNx.h
--- gfx/skia/skia/include/private/SkNx.h Tue Aug 20 09:46:55 2019 +0200
+++ gfx/skia/skia/include/private/SkNx.h Mon Sep 09 10:04:06 2019 +0200
@@ -238,7 +238,18 @@
AI SkNx operator*(const SkNx& y) const { return fVal * y.fVal; }
AI SkNx operator/(const SkNx& y) const { return fVal / y.fVal; }
+ // On Big endian the commented out variant doesn't work,
+ // and honestly, I have no idea why it exists in the first place.
+ // The reason its broken is, I think, that it defaults to the double-variant of ToBits()
+ // which gets a 64-bit integer, and FromBits returns 32-bit,
+ // cutting off the wrong half again.
+ // Overall, I see no reason to have ToBits and FromBits at all (even for floats/doubles).
+ // Still we are only "fixing" this for big endian and leave little endian alone (never touch a running system)
+#ifdef SK_CPU_BENDIAN
+ AI SkNx operator&(const SkNx& y) const { return fVal & y.fVal; }
+#else
AI SkNx operator&(const SkNx& y) const { return FromBits(ToBits(fVal) & ToBits(y.fVal)); }
+#endif
AI SkNx operator|(const SkNx& y) const { return FromBits(ToBits(fVal) | ToBits(y.fVal)); }
AI SkNx operator^(const SkNx& y) const { return FromBits(ToBits(fVal) ^ ToBits(y.fVal)); }
diff -r aecb4600e5da gfx/skia/skia/src/opts/SkBlitMask_opts.h
--- gfx/skia/skia/src/opts/SkBlitMask_opts.h Tue Aug 20 09:46:55 2019 +0200
+++ gfx/skia/skia/src/opts/SkBlitMask_opts.h Mon Sep 09 10:04:06 2019 +0200
@@ -203,7 +203,13 @@
// ~~~>
// a = 1*aa + d(1-1*aa) = aa + d(1-aa)
// c = 0*aa + d(1-1*aa) = d(1-aa)
+
+ // For big endian we have to swap the alpha-mask from 0,0,0,255 to 255,0,0,0
+#ifdef SK_CPU_BENDIAN
+ return Sk4px(Sk16b(aa) & Sk16b(255,0,0,0, 255,0,0,0, 255,0,0,0, 255,0,0,0))
+#else
return Sk4px(Sk16b(aa) & Sk16b(0,0,0,255, 0,0,0,255, 0,0,0,255, 0,0,0,255))
+#endif
+ d.approxMulDiv255(aa.inv());
};
while (h --> 0) {

View File

@ -0,0 +1,56 @@
CompositableHost.cpp patch added by @q66, based on patch in issue 1602730.
# HG changeset patch
# Parent 46ea866ca3acb8bb5e1709ceb799b9c94f591dec
Problem description: Tab-titles that are too long to fit into a tab get faded out.
On big endian this is broken and instead of fading out, the
tab gets white and the font transparent, leading to an unreadable
tab-title
Solution: This is not a real solution, but a hack. The real solution would have been
to byte-swap the correct buffer, but I could not find it.
So the next best thing is to deactivate the fading-effect. Now all tab-titles
are readable, albeit not as pretty to look at as they could be.
Side-effects: I have not yet found an unwanted side-effect.
diff -r 46ea866ca3ac -r 6ef20eee3f8f gfx/2d/DrawTargetSkia.cpp
--- gfx/2d/DrawTargetSkia.cpp Tue Oct 22 12:27:22 2019 +0200
+++ gfx/2d/DrawTargetSkia.cpp Thu Oct 31 09:11:56 2019 +0100
@@ -1861,6 +1861,14 @@
SkCanvas::kPreserveLCDText_SaveLayerFlag |
(aCopyBackground ? SkCanvas::kInitWithPrevious_SaveLayerFlag : 0));
+#if MOZ_BIG_ENDIAN()
+ // Pushing a layer where an aMask is defined produces wrong output.
+ // We _should_ endian swap the data, but I couldn't find a workable way to do so
+ // Therefore I deactivate those layers in the meantime.
+ // The result is: Tab-titles that are longer than the available space should be faded out.
+ // The fading doesn't work, so we deactivate the fading-effect here.
+ if (!aMask)
+#endif
mCanvas->saveLayer(saveRec);
SetPermitSubpixelAA(aOpaque);
--- gfx/layers/composite/CompositableHost.cpp
+++ gfx/layers/composite/CompositableHost.cpp
@@ -13,6 +13,7 @@
#include "ImageHost.h" // for ImageHostBuffered, etc
#include "Layers.h"
#include "TiledContentHost.h" // for TiledContentHost
+#include "mozilla/EndianUtils.h"
#include "mozilla/gfx/gfxVars.h"
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor
#include "mozilla/layers/TextureHost.h" // for TextureHost, etc
@@ -92,9 +93,13 @@ bool CompositableHost::AddMaskEffect(EffectChain& aEffects,
}
MOZ_ASSERT(source);
+ // Setting an alpha-mask here breaks the URL-bar on big endian (s390x)
+ // if the typed URL is too long for the textbox (automatic scrolling needed)
+#if MOZ_LITTLE_ENDIAN()
RefPtr<EffectMask> effect =
new EffectMask(source, source->GetSize(), aTransform);
aEffects.mSecondaryEffects[EffectTypes::MASK] = effect;
+#endif
return true;
}

View File

@ -0,0 +1,52 @@
--- old-configure.in.orig
+++ old-configure.in
@@ -2818,6 +2818,22 @@
_NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_COOKIES"
fi
+dnl ==================================
+dnl = Check sndio availability
+dnl ==================================
+
+MOZ_ARG_ENABLE_BOOL(sndio,
+[ --enable-sndio Enable sndio support],
+ MOZ_SNDIO=1,
+ MOZ_SNDIO=)
+
+if test -n "$MOZ_SNDIO"; then
+ MOZ_SNDIO_LIBS="-lsndio"
+ AC_SUBST_LIST(MOZ_SNDIO_LIBS)
+fi
+
+AC_SUBST(MOZ_SNDIO)
+
dnl ========================================================
dnl =
dnl = Maintainer debug option (no --enable equivalent)
--- media/libcubeb/src/moz.build.orig
+++ media/libcubeb/src/moz.build
@@ -44,11 +44,13 @@
]
DEFINES['USE_JACK'] = True
-if CONFIG['OS_ARCH'] == 'OpenBSD':
+if CONFIG['MOZ_SNDIO']:
SOURCES += [
'cubeb_sndio.c',
]
DEFINES['USE_SNDIO'] = True
+
+if CONFIG['OS_ARCH'] == 'OpenBSD':
DEFINES['DISABLE_LIBSNDIO_DLOPEN'] = True
if CONFIG['OS_TARGET'] == 'Darwin':
--- build/moz.configure/old.configure 2020-06-30 12:17:04.087609070 +0200
+++ - 2020-06-30 12:18:26.027756310 +0200
@@ -210,6 +210,7 @@
@old_configure_options(
'--cache-file',
'--datadir',
+ '--enable-sndio',
'--enable-crashreporter',
'--enable-dbus',
'--enable-debug-js-modules',

951
Plantillas/icecat/template Normal file
View File

@ -0,0 +1,951 @@
# Template file for 'icecat'
pkgname=icecat
version=78.6.1
revision=1
build_helper="rust qemu"
hostmakedepends="autoconf213 unzip zip pkg-config perl python3 yasm rust cargo
llvm clang nodejs-lts-10 cbindgen python nasm which tar"
makedepends="nss-devel libjpeg-turbo-devel gtk+-devel gtk+3-devel icu-devel
pixman-devel libevent-devel libnotify-devel libvpx-devel
libXrender-devel libXcomposite-devel libSM-devel libXt-devel rust-std
libXdamage-devel freetype-devel $(vopt_if alsa alsa-lib-devel)
$(vopt_if dbus dbus-glib-devel) $(vopt_if pulseaudio pulseaudio-devel)
$(vopt_if xscreensaver libXScrnSaver-devel)
$(vopt_if sndio sndio-devel) $(vopt_if jack jack-devel)"
depends="nss>=3.53 desktop-file-utils hicolor-icon-theme"
short_desc="GNU version of the Firefox browser"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="MPL-1.1, GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://www.gnu.org/software/${pkgname}/"
distfiles="https://distfiles.voidlinux.de/${pkgname}-${version}/${pkgname}-${version}-gnu1.tar.xz"
checksum=2e4857523a465b39206aa3438e8c799610852ca95c93ae4cb4eb128cd4a28235
lib32disabled=yes
build_options="alsa jack dbus pulseaudio xscreensaver sndio wayland"
build_options_default="alsa jack dbus pulseaudio xscreensaver sndio wayland"
case $XBPS_TARGET_MACHINE in
armv[56]*) broken="required NEON extensions are not supported on armv[56]" ;;
ppc64*) ;;
ppc*) broken="xptcall bitrot" ;;
esac
CXXFLAGS="-Wno-class-memaccess -Wno-unused-function"
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
if [ "$XBPS_WORDSIZE" -eq 32 ]; then
nodebug=yes
fi
# We need this because cargo verifies checksums of all files
# in vendor crates when it builds and gives us no way to
# override or update the file sanely... so just clear out the file list
_clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/$1/.cargo-checksum.json
}
# Function to install a language pack
# FIXME: The *.xpi files have to be signed to be accepted as plugins
# yet how do you sign a package if you don't have a signing key?
_install_langpack() {
local lang=$1
local tempdir="$(ls -d ${wrksrc}/obj-*/dist/linux-*/xpi|head -n1)"
vinstall "${tempdir}"/${sourcepkg}-${version}.${lang}.langpack.xpi \
644 usr/lib/icecat/browser/extensions
}
post_extract() {
if [ "$XBPS_TARGET_LIBC" = musl ]; then
cp "${FILESDIR}/stab.h" toolkit/crashreporter/google-breakpad/src/
fi
}
post_patch() {
_clear_vendor_checksums num-traits
_clear_vendor_checksums glslopt
}
do_build() {
local lang languages="en-US $(cat browser/locales/all-locales)"
local triplet
cp ${FILESDIR}/mozconfig .mozconfig
if [ "$XBPS_TARGET_LIBC" = musl ]; then
echo "ac_add_options --disable-jemalloc" >>.mozconfig
echo "ac_add_options --disable-gold" >>.mozconfig
echo "ac_add_options --enable-release" >>.mozconfig
fi
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*|arm*)
echo "ac_add_options --disable-elf-hack" >>.mozconfig
;;
esac
# webrtc currently fails to build on 32-bit ppc...
case "$XBPS_TARGET_MACHINE" in
ppc64*) ;;
ppc*) echo "ac_add_options --disable-webrtc" >>.mozconfig ;;
esac
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
export LDFLAGS+=" -latomic"
fi
if [ "$CROSS_BUILD" ]; then
BINDGEN_INCLUDE_FLAGS=$( $CPP -x c++ -v /dev/null -o /dev/null 2>&1 | \
sed -n '/#include <...> search starts here:/,/End of search list./p' | \
sed '1,1d;$d' | sed 's/^ /-I/' | paste -s )
export BINDGEN_CFLAGS="--target=$XBPS_CROSS_TRIPLET \
--sysroot=${XBPS_CROSS_BASE} ${BINDGEN_INCLUDE_FLAGS}"
export HOST_CC="${CC_host}"
export TARGET_CC="${CC}"
export HOST_CFLAGS="${XBPS_CFLAGS}"
export HOST_CXXFLAGS="${XBPS_CXXFLAGS}"
echo "ac_cv_sqlite_secure_delete=yes" >> .mozconfig
echo "ac_cv_sqlite_threadsafe=yes" >> .mozconfig
echo "ac_cv_sqlite_enable_fts3=yes" >> .mozconfig
echo "ac_cv_sqlite_dbstat_vtab=yes" >> .mozconfig
echo "ac_cv_sqlite_enable_unlock_notify=yes" >> .mozconfig
echo "ac_cv_prog_hostcxx_works=1" >> .mozconfig
echo "ac_add_options --target=$XBPS_CROSS_TRIPLET" >>.mozconfig
echo "ac_add_options --host=$XBPS_TRIPLET" >>.mozconfig
else
echo "ac_add_options --target=$XBPS_TRIPLET" >>.mozconfig
echo "ac_add_options --host=$XBPS_TRIPLET" >>.mozconfig
fi
mkdir -p third_party/rust/libloading/.deps
case "$XBPS_TARGET_MACHINE" in
armv7*)
export CFLAGS+=" -mfpu=neon -Wno-psabi"
export CXXFLAGS+=" -mfpu=neon -Wno-psabi"
;;
esac
# work around large debug symbols on 32-bit hosts
if [ "$XBPS_WORDSIZE" = "32" ]; then
export CFLAGS="${CFLAGS/-g/-g1}"
export CXXFLAGS="${CXXFLAGS/-g/-g1}"
export LDFLAGS+=" -Wl,--no-keep-memory"
# patch the rust debug level, this is hardcoded
sed -i "s/debug_info = '2'/debug_info = '1'/" \
build/moz.configure/toolchain.configure
fi
# FIXME: incompatible with rust 1.48 in this release
#case "$XBPS_TARGET_MACHINE" in
#aarch64*|i686*|x86_64*)
# echo "ac_add_options --enable-rust-simd" >>.mozconfig ;;
#esac
export LDFLAGS+=" -Wl,-rpath=/usr/lib/icecat"
if [ "$SOURCE_DATE_EPOCH" ]; then
export MOZ_BUILD_DATE=$(date --date "@$SOURCE_DATE_EPOCH" "+%Y%m%d%H%M%S")
fi
export MOZ_MAKE_FLAGS="${makejobs}"
export MOZ_NOSPAM=1
export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild"
export MACH_USE_SYSTEM_PYTHON=1
export AS=$CC
cat >>.mozconfig <<EOF
ac_add_options $(vopt_enable alsa)
ac_add_options $(vopt_enable jack)
ac_add_options $(vopt_enable sndio)
ac_add_options $(vopt_enable dbus)
ac_add_options $(vopt_enable dbus necko-wifi)
ac_add_options $(vopt_enable pulseaudio)
ac_add_options --with-l10n-base=${wrksrc}/l10n
ac_add_options --enable-default-toolkit=$(vopt_if wayland 'cairo-gtk3-wayland' 'cairo-gtk3')
EOF
rm -f old-configure
./mach build
# Make langpacks for all languages
dir=$(ls -d obj-*/browser/locales)
cd ${wrksrc}/${dir}
for lang in ${languages[*]}; do
msg_normal "Making langpack for ${lang} ...\n"
make ${makejobs} langpack-${lang} LOCALE_MERGEDIR=.
done
}
do_install() {
export MACH_USE_SYSTEM_PYTHON=1
DESTDIR="$DESTDIR" ./mach install
vbin ${FILESDIR}/icecat-wayland
vinstall ${FILESDIR}/vendor.js 644 usr/lib/icecat/browser/defaults/preferences
vinstall ${FILESDIR}/icecat.desktop 644 usr/share/applications
for i in 16x16 22x22 24x24 32x32 48x48 256x256; do
vinstall ${wrksrc}/browser/branding/official/default${i%x*}.png 644 \
usr/share/icons/hicolor/${i}/apps icecat.png
done
vinstall ${wrksrc}/browser/branding/official/default256.png 644 \
usr/share/pixmaps icecat.png
# Use system-provided dictionaries
rm -rf ${DESTDIR}/usr/lib/icecat/{dictionaries,hyphenation}
ln -s /usr/share/hunspell ${DESTDIR}/usr/lib/icecat/dictionaries
ln -s /usr/share/hyphen ${DESTDIR}/usr/lib/icecat/hyphenation
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
ln -sf icecat ${DESTDIR}/usr/lib/icecat/icecat-bin
# Remove the development files - noone uses them
rm -rf ${DESTDIR}/usr/{include,lib/icecat-devel,share/idl}
}
icecat-i18n-ach_package() {
short_desc+=" - Acholi language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-af_package() {
short_desc+=" - Afrikaans language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-an_package() {
short_desc+=" - Aragonese language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ar_package() {
short_desc+=" - Arabic language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ast_package() {
short_desc+=" - Asturian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-az_package() {
short_desc+=" - Azerbaijani language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-be_package() {
short_desc+=" - Belarusian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-bg_package() {
short_desc+=" - Bulgarian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-bn_package() {
short_desc+=" - Bengali language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-br_package() {
short_desc+=" - Breton language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-bs_package() {
short_desc+=" - Bosnian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ca_package() {
short_desc+=" - Catalan language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-cak_package() {
short_desc+=" - Kaqchikel language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-cs_package() {
short_desc+=" - Czech language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-cy_package() {
short_desc+=" - Welsh language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-da_package() {
short_desc+=" - Danish language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-de_package() {
short_desc+=" - German language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-dsb_package() {
short_desc+=" - Lower Sorbian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-el_package() {
short_desc+=" - Greek language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-en-CA_package() {
short_desc+=" - English (Canada) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-en-GB_package() {
short_desc+=" - English (British) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-en-US_package() {
short_desc+=" - English (US) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-eo_package() {
short_desc+=" - Esperanto language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-es-AR_package() {
short_desc+=" - Spanish (Argentina) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-es-CL_package() {
short_desc+=" - Spanish (Chile) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-es-ES_package() {
short_desc+=" - Spanish (Spain) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-es-MX_package() {
short_desc+=" - Spanish (Mexico) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-et_package() {
short_desc+=" - Estonian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-eu_package() {
short_desc+=" - Basque language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-fa_package() {
short_desc+=" - Persian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ff_package() {
short_desc+=" - Fulah language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-fi_package() {
short_desc+=" - Finnish language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-fr_package() {
short_desc+=" - French language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-fy-NL_package() {
short_desc+=" - Frisian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ga-IE_package() {
short_desc+=" - Irish language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-gd_package() {
short_desc+=" - Gaelic (Scotland) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-gl_package() {
short_desc+=" - Galician language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-gn_package() {
short_desc+=" - Guarani language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-gu-IN_package() {
short_desc+=" - Gujarati (India) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-he_package() {
short_desc+=" - Hebrew language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-hi-IN_package() {
short_desc+=" - Hindi (India) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-hr_package() {
short_desc+=" - Croatian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-hsb_package() {
short_desc+=" - Upper Sorbian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-hu_package() {
short_desc+=" - Hungarian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-hy-AM_package() {
short_desc+=" - Armenian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ia_package() {
short_desc+=" - Interlingua language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-id_package() {
short_desc+=" - Indonesian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-is_package() {
short_desc+=" - Icelandic language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-it_package() {
short_desc+=" - Italian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ja_package() {
short_desc+=" - Japanese language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ka_package() {
short_desc+=" - Georgian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-kab_package() {
short_desc+=" - Kabyle language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-kk_package() {
short_desc+=" - Kazakh language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-km_package() {
short_desc+=" - Khmer language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-kn_package() {
short_desc+=" - Kannada language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ko_package() {
short_desc+=" - Korean language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-lij_package() {
short_desc+=" - Ligurian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-lt_package() {
short_desc+=" - Lithuanian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-lv_package() {
short_desc+=" - Latvian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-mk_package() {
short_desc+=" - Macedonian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-mr_package() {
short_desc+=" - Marathi language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ms_package() {
short_desc+=" - Malay language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-my_package() {
short_desc+=" - Burmese language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-nb-NO_package() {
short_desc+=" - Norwegian (Bokmål) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ne-NP_package() {
short_desc+=" - Nepali language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-nl_package() {
short_desc+=" - Dutch language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-nn-NO_package() {
short_desc+=" - Norwegian (Nynorsk) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-oc_package() {
short_desc+=" - Occitan language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-pa-IN_package() {
short_desc+=" - Punjabi language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-pl_package() {
short_desc+=" - Polish language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-pt-BR_package() {
short_desc+=" - Portuguese (Brazilian) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-pt-PT_package() {
short_desc+=" - Portuguese (Portugal) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-rm_package() {
short_desc+=" - Romansh language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ro_package() {
short_desc+=" - Romanian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ru_package() {
short_desc+=" - Russian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-si_package() {
short_desc+=" - Sinhala language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-sk_package() {
short_desc+=" - Slovak language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-sl_package() {
short_desc+=" - Slovenian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-son_package() {
short_desc+=" - Songhai language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-sq_package() {
short_desc+=" - Albanian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-sr_package() {
short_desc+=" - Serbian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-sv-SE_package() {
short_desc+=" - Swedish language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ta_package() {
short_desc+=" - Tamil language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-te_package() {
short_desc+=" - Telugu language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-th_package() {
short_desc+=" - Thai language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-tr_package() {
short_desc+=" - Turkish language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-uk_package() {
short_desc+=" - Ukrainian language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-ur_package() {
short_desc+=" - Urdu language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-uz_package() {
short_desc+=" - Uzbek language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-vi_package() {
short_desc+=" - Vietnamese language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-xh_package() {
short_desc+=" - Xhosa language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-zh-CN_package() {
short_desc+=" - Chinese (simplified) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}
icecat-i18n-zh-TW_package() {
short_desc+=" - Chinese (traditional) language files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
_install_langpack ${pkgname#icecat-i18n-}
}
}

2
Plantillas/icecat/update Normal file
View File

@ -0,0 +1,2 @@
site=https://ftp.gnu.org/gnu/gnuzilla/
pattern="\K[\d]+\.[\d]+\.[\d]+"

View File

@ -0,0 +1,27 @@
Source: @pullmoll
Upstream: no
Reason: This test fails for Musl libc and we know we have a working libc
--- a/configure.ac 2020-01-23 00:14:16.000000000 +0100
+++ b/configure.ac 2020-01-30 00:23:00.859196125 +0100
@@ -10233,18 +10233,10 @@
AC_SUBST(LIBNUMBERTEXT_CFLAGS)
dnl ***************************************
-dnl testing libc version for Linux...
+dnl Always assume we have a working libc
dnl ***************************************
if test "$_os" = "Linux"; then
- AC_MSG_CHECKING([whether libc is >= 2.1.1])
- exec 6>/dev/null # no output
- AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC)
- exec 6>&1 # output on again
- if test "$HAVE_LIBC"; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_ERROR([no, upgrade libc])
- fi
+ HAVE_LIBC=yes; export HAVE_LIBC
fi
dnl =========================================

View File

@ -0,0 +1,20 @@
vcl: fix build with vlc backend enabled
avmedia/source/vlc/vlcplayer.cxx tries to access the aWindow member
directly, which leads to a compilation failure, since it's private.
diff --git include/vcl/sysdata.hxx include/vcl/sysdata.hxx
index 63b7c810de3d..0cd0e037c823 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -73,9 +73,8 @@ struct VCL_DLLPUBLIC SystemEnvData
// however, the GTK3 vclplug wants to store pointers in here!
sal_IntPtr aShellWindow; // the window of the frame's shell
Platform platform; // the windowing system in use
-private:
- sal_uIntPtr aWindow; // the window of the object
public:
+ sal_uIntPtr aWindow; // the window of the object
void SetWindowHandle(sal_uIntPtr nWindow)
{

View File

@ -0,0 +1,556 @@
# Template file for 'libreoffice'
pkgname=libreoffice
version=7.1.3.2
revision=1
build_style=meta
make_build_target="build-nocheck"
nocross="Several dependencies are nocross=yes"
hostmakedepends="automake flex git gperf hyphen icu libtool openldap which gettext xz
perl-Archive-Zip pkg-config qt5-qmake sane ucpp unzip wget zip python3-setuptools
fontforge python3-lxml"
makedepends="CoinMP-devel apr-devel avahi-libs-devel clucene-devel
frameworkintegration-devel glyphy-devel gpgmepp-devel gst-plugins-base1-devel
gtk+-devel gtk+3-devel hunspell-devel hyphen-devel libXt-devel libabw-devel
libatomic_ops-devel libbluetooth-devel libcdr-devel libcmis-devel libe-book-devel
libepubgen-devel libetonyek-devel libexttextcat-devel libfbclient3-devel libfreehand-devel
libgcrypt-devel libgltf-devel libldap-devel libmariadbclient-devel libmspub-devel
libmwaw-devel libnumbertext-devel libodfgen-devel liborcus-devel
libpagemaker-devel libqxp-devel librsvg-devel libvisio-devel libwpg-devel
libwps-devel lpsolve-devel mdds mythes-devel neon-devel nss-devel
postgresql-libs-devel python3-devel qt5-devel redland-devel sane-devel
telepathy-glib-devel unixodbc-devel vigra-devel vlc-devel libcppunit-devel
qrcodegen-devel xmlsec1-devel poppler-cpp-devel libxml2-devel"
depends="libreoffice-common>=${version}_${revision}"
depends+=" libreoffice-base>=${version}_${revision}"
depends+=" libreoffice-calc>=${version}_${revision}"
#depends+=" libreoffice-draw>=${version}_${revision}"
depends+=" libreoffice-fonts>=${version}_${revision}"
#depends+=" libreoffice-gnome>=${version}_${revision}"
depends+=" libreoffice-impress>=${version}_${revision}"
depends+=" libreoffice-math>=${version}_${revision}"
#depends+=" libreoffice-postgresql>=${version}_${revision}"
depends+=" libreoffice-writer>=${version}_${revision}"
depends+=" libreoffice-xtensions>=${version}_${revision}"
# Add the previously installed default languages as well
#depends+=" libreoffice-i18n-en-US>=${version}_${revision}"
#depends+=" libreoffice-i18n-de>=${version}_${revision}"
depends+=" libreoffice-i18n-es>=${version}_${revision}"
#depends+=" libreoffice-i18n-fr>=${version}_${revision}"
#depends+=" libreoffice-i18n-it>=${version}_${revision}"
#depends+=" libreoffice-i18n-pl>=${version}_${revision}"
#depends+=" libreoffice-i18n-pt>=${version}_${revision}"
short_desc="Productivity suite"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://www.libreoffice.org/"
# Source, dictionary, help and translations
_baseurl="https://download.documentfoundation.org/libreoffice/src/${version%.*}"
_addurl="https://dev-www.libreoffice.org/src"
_exturl="https://dev-www.libreoffice.org/extern"
# Additional distfiles and checksums can be found in
# the file 'download.lst' after configure was run.
distfiles="
${_baseurl}/${pkgname}-${version}.tar.xz
${_baseurl}/${pkgname}-dictionaries-${version}.tar.xz
${_baseurl}/${pkgname}-help-${version}.tar.xz
${_baseurl}/${pkgname}-translations-${version}.tar.xz
${_addurl}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
${_addurl}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
${_addurl}/language-subtag-registry-2019-04-03.tar.bz2
${_addurl}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
${_addurl}/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
${_addurl}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
${_addurl}/b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2
${_addurl}/box2d-2.3.1.tar.gz
${_addurl}/libstaroffice-0.0.7.tar.xz
${_addurl}/libzmf-0.0.2.tar.xz
${_addurl}/pdfium-4306.tar.bz2
${_addurl}/bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip
${_exturl}/8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar
${_exturl}/odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies-971c54fd38a968f5860014b44301872706f9e540.jar
${_exturl}/185d60944ea767075d27247c3162b3bc-unowinreg.dll
${_addurl}/commons-logging-1.2-src.tar.gz
${_addurl}/dtoa-20180411.tgz
${_addurl}/beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip
${_addurl}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
${_addurl}/1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
${_addurl}/b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_0.9.5.oxt
${_addurl}/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
${_addurl}/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
${_addurl}/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
${_addurl}/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
${_addurl}/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
${_addurl}/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
${_addurl}/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
${_addurl}/7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
${_addurl}/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
${_addurl}/skia-m88-59bafeeaa7de9eb753e3778c414e01dcf013dcd8.tar.xz
${_addurl}/368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz
${_addurl}/c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz
${_addurl}/33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip
${_addurl}/1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip
${_addurl}/liberation-narrow-fonts-ttf-1.07.6.tar.gz
${_addurl}/liberation-fonts-ttf-2.00.4.tar.gz
${_addurl}/e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip
${_addurl}/907d6e99f241876695c19ff3db0b8923-source-code-pro-2.030R-ro-1.050R-it.tar.gz
${_addurl}/edc4d741888bc0d38e32dbaa17149596-source-sans-pro-2.010R-ro-1.065R-it.tar.gz
${_addurl}/source-serif-pro-3.000R.tar.gz
${_addurl}/EmojiOneColor-SVGinOT-1.3.tar.gz
${_addurl}/noto-fonts-20171024.tar.gz
${_addurl}/culmus-0.131.tar.gz
${_addurl}/libre-hebrew-1.0.tar.gz
${_addurl}/alef-1.001.tar.gz
${_addurl}/ttf-kacst_2.01+mry.tar.gz
${_addurl}/Amiri-0.111.zip
${_addurl}/ReemKufi-0.7.zip
${_addurl}/Scheherazade-2.100.zip
"
checksum="35af7fd104b253704f770a205f835aee0e82ccc889ebf0949a89d9b3276229bf
66dc5fd4253f6b956b8fdde0d741ef7d85f12647db235642eb74f3d0a44d404e
e0f14b4db1585506761ad2ceeb43850cb594f2ec8a20fc9ca7bcb95e77408935
86138935d274d46d27e4ce92a72d759e7d4491d7b227be952e05735ba5c9b327
1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753
75823776fb51a9c526af904f1503a7afaaab900fba83eda64f8a41073724c870
a1d7fb901764bb8f251d4f686cdf565764f9987d0fb5d9315d54a7366a84822d
d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370
1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133
233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd
48c87e41636783bba438b65fd895821e369ed139e1465fac654323ad93c5a82d
58ffc8475a8650aadc351345aef696937747b40501ab78d72c197c5ff5b3035c
f94fb0ad8216f97127bedef163a45886b43c62deac5e5b0f5e628e234220c8db
27051a30cb057fdb5d5de65a1f165c7153dc76e27fe62251cbb86639eb2caf22
eca406d47ac7e2a84dcc86f93c08f96e591d409589e881477fa75e488e4851d8
d0312c360efe04dd048b3311fe375ff36f1993b4c2e3cb58c81062990532904a
f2443f27561af52324eee03a1892d9f569adc8db9e7bca55614898bc2a13a770
984f2a479df79e27e7b01a5815ac53ae64e07746b882262d8a64566494515504
eafde646a7dbe46d20c291685b0beac2382174d78d66ee990e229a1bf6e6cec6
49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81
0082d0684f7db6f62361b76c4b7faba19e0c7ce5cb8e36c4b65fea8281e711b4
9e93c73e23aff644b17dfff656444474c14150e7f3b38b19635e622235e01c96
64585ac36a81291a58269ec5347e7e3e2e8596dbacb9221015c208191333c6e1
71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3
1568ed1d2feb8210bb5de61d69574a165cded536cfa17c6953c9064076469de2
75c80359c9ce343c20aab8a36a45cb3b9ee7c61cf92c13ae45399d854423a9ba
e0531091787c0f16c83965fdcbc49162c059d7f0c64669e7f119699321549743
5826d1551bf599b85742545f6e01a0079b93c1b2c8434bf409eddb3a29e4726b
e1fb87f3f7b980d33414473279615c4644027e013012d156efa538bc2b031772
3d853b19b1d94a6efa69e7af90f7f2b09ecf302913bee3da796c15ecfebcfac8
abe2c57ac12ba45d83563b02e240fa95d973376de2f720aab8fe11f2e621c095
05640a1f6805b2b2d7e2cb9c50db9a5cb084e3c52ab1a71ce015239b4a1d4343
a25f14dad39e93a2f9cdf09166ee53981f7212dce829e4208e07a522963a8585
085f2112c51fa8c1783fac12fbd452650596415121348393bb51f0f7e85a9045
f293656a15342a53bb407b932fc907c6894178a162f09728bd383e24d84b1301
c48d1c2fd613c9c06c959c34da7b8388059e2408d2bb19845dc3ed35f76e4d09
4bd12b6cbc321c1cf16da76e2c585c925ce956a08067ae6f6c64eff6ccfdaf5a
7576310b219e04159d35ff61dd4a4ec4cdba4f35c00e002a136f00e96a908b0a
2f1a2c5491d7305dffd3520c6375d2f3e14931ee35c6d8ae1e8f098bf1a7b3cc
8879d89b5ff7b506c9fc28efc31a5c0b954bbe9333e66e5283d27d20a8519ea3
c40e95fc5e0ecb73d4be565ae2afc1114e2bc7dc5253e00ee92d8fd6cc4adf45
54adcb2bc8cac0927a647fbd9362f45eff48130ce6e2379dc3867643019e08c5
09466dce87653333f189acd8358c60c6736dcd95f042dee0b644bdcf65b6ae2f
e7bc9a1fec787a529e49f5a26b93dcdcf41506449dfc70f92cdef6d17eb6fb61
826a2b784d5cdb4c2bbc7830eb62871528360a61a52689c102a101623f1928e3
d1a08f7c10589f22740231017694af0a7a270760c8dec33d8d1c038e2be0a0c7
29acc15a4c4d6b51201ba5d60f303dfbc2e5acbfdb70413c9ae1ed34fa259994
dcf112cfcccb76328dcfc095f4d7c7f4d2f7e48d0eed5e78b100d1d77ce2ed1b
f596257c1db706ce35795b18d7f66a4db99d427725f20e9384914b534142579a
b98b67602a2c8880a1770f0b9e37c190f29a7e2ade5616784f0b89fbdb75bf52
dca00f5e655f2f217a766faa73a81f542c5c204aa3a47017c3c2be0b31d00a56
1fbfccced6348b5db2c1c21d5b319cd488e14d055702fa817a0f6cb83d882166
f60c6508d209ce4236d2d7324256c2ffddd480be7e3d6023770b93dc391a605f
251c8817ceb87d9b661ce1d5b49e732a0116add10abc046be4b8ba5196e149b5"
skip_extraction="
${pkgname}-dictionaries-${version}.tar.xz
${pkgname}-help-${version}.tar.xz
${pkgname}-translations-${version}.tar.xz
798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
language-subtag-registry-2019-04-03.tar.bz2
17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2
box2d-2.3.1.tar.gz
libstaroffice-0.0.7.tar.xz
libzmf-0.0.2.tar.xz
pdfium-4306.tar.bz2
bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip
8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar
odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies-971c54fd38a968f5860014b44301872706f9e540.jar
185d60944ea767075d27247c3162b3bc-unowinreg.dll
commons-logging-1.2-src.tar.gz
dtoa-20180411.tgz
beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip
35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_0.9.5.oxt
eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
skia-m88-59bafeeaa7de9eb753e3778c414e01dcf013dcd8.tar.xz
368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz
c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz
33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip
1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip
liberation-narrow-fonts-ttf-1.07.6.tar.gz
liberation-fonts-ttf-2.00.4.tar.gz
e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip
907d6e99f241876695c19ff3db0b8923-source-code-pro-2.030R-ro-1.050R-it.tar.gz
edc4d741888bc0d38e32dbaa17149596-source-sans-pro-2.010R-ro-1.065R-it.tar.gz
source-serif-pro-3.000R.tar.gz
EmojiOneColor-SVGinOT-1.3.tar.gz
noto-fonts-20171024.tar.gz
culmus-0.131.tar.gz
libre-hebrew-1.0.tar.gz
alef-1.001.tar.gz
ttf-kacst_2.01+mry.tar.gz
Amiri-0.111.zip
ReemKufi-0.7.zip
Scheherazade-2.100.zip
"
replaces="libreoffice-firebird<6.2.4.2_1"
build_options="java"
desc_option_java="Enable Java support"
if [ "$XBPS_CHECK_PKGS" ]; then
make_build_target="build"
fi
case "$XBPS_TARGET_MACHINE" in
i686*) # Broken unit tests
CXXFLAGS+=" -DDISABLE_CVE_TESTS=1"
;;
x86_64) build_options_default="java"
makedepends+=" apache-ant openjdk11 "
;;
esac
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" libexecinfo-devel"
fi
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
CXXFLAGS+=" -DGLM_ENABLE_EXPERIMENTAL -DU_USING_ICU_NAMESPACE=1"
# Move files listed in a <name>_list.txt into $PKGDESTDIR
_split() {
local list file dir destdir
destdir="${DESTDIR}/all"
for list in ${wrksrc}/file-lists/${1}_list.txt; do
# skip non-existing file lists
! [ -f ${list} ] && msg_error "There is no ${1}_list.txt file!\n"
for file in $(grep -v ^%dir ${list} | sort | uniq); do
dir="${file%/*}"
! [ -d "${PKGDESTDIR}/${dir}" ] && vmkdir "${dir}"
mv ${destdir}/${file} ${PKGDESTDIR}/${dir}/
done
done
# Move appdata file, if any
file=usr/share/appdata/libreoffice-${1}.appdata.xml
if [ -f ${destdir}/${file} ]; then
dir="${file%/*}"
! [ -d "${PKGDESTDIR}/${dir}" ] && vmkdir "${dir}"
mv ${destdir}/${file} ${PKGDESTDIR}/${dir}/
fi
}
unset _languages
_add_lang() {
local pkglang="${3:-$1}"
_languages="$_languages ${pkglang//_/-}"
eval "libreoffice-i18n-${1}_package() {
short_desc+=\"- ${2} language pack\"
pkg_install() {
_split lang_${pkglang}
}
}"
}
_add_lang es "Spanish"
post_fetch() {
local srcdistdir=${XBPS_SRCDISTDIR}/${pkgname}-${version} pkg
mkdir -p ${wrksrc}/external/tarballs
for pkg in ${skip_extraction}; do
if [ "${pkg%.dll}" != "${pkg}" ]; then
# The dll needs to be copied instead of symlinked
cp -v ${srcdistdir}/${pkg} ${wrksrc}/external/tarballs/
else
# ... the other files can be symlinked
ln -svf ${srcdistdir}/${pkg} ${wrksrc}/external/tarballs/
fi
done
}
post_patch() {
vsed -i bin/distro-install-desktop-integration \
-e "/gzip -f/d" \
-e "s|.1.gz|.1|g"
chmod +x bin/unpack-sources
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
vsed -i sal/Library_sal.mk -e "s;-ldl ;-lexecinfo &;"
fi
case "$XBPS_TARGET_MACHINE" in
i686*) # Don't run broken tests
vsed -i "/CppunitTest_sw_ooxmlexport9/d" sw/Module_sw.mk
vsed -i "/CPPUNIT_TEST(testTdf111798);/d" sd/qa/unit/export-tests-ooxml2.cxx
;;
esac
if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then
vsed -i "s/bootstrap: check-if-root compilerplugins/bootstrap: compilerplugins/" Makefile.in
fi
}
do_configure() {
local opts
# Separate autogen.sh and configure because we need
# to patch configure for musl support
NOCONFIGURE=1 ./autogen.sh
# Add linux-musl* as host OS to lines containing linux-gnu*
vsed -i configure -e 's;linux-gnu\*;linux-gnu*|linux-musl*;g'
# standard options
opts="--prefix=/usr"
opts+=" --sysconfdir=/etc"
opts+=" --sbindir=/usr/bin"
opts+=" --bindir=/usr/bin"
opts+=" --mandir=/usr/share/man"
opts+=" --infodir=/usr/share/info"
opts+=" --localstatedir=/var"
# libreoffice options
opts+=" --with-vendor='VoidLinux'"
opts+=" --with-help"
opts+=" --disable-odk"
opts+=" --disable-online-update"
opts+=" --enable-python=system"
opts+=" --enable-gtk3"
opts+=" --disable-qt5"
opts+=" --disable-cups"
opts+=" --disable-firebird-sdbc"
opts+=" --disable-postgresql-sdbc"
opts+=" --disable-kf5"
opts+=" --disable-vlc"
opts+=" --disable-dependency-tracking"
opts+=" --enable-release-build"
opts+=" --enable-split-app-modules"
opts+=" --disable-dconf"
opts+=" --disable-debug"
opts+=" --disable-symbols"
# New strategy: enable all libs and headers, then disable what's missing
opts+=" --with-system-libs"
opts+=" --with-system-headers"
case "$XBPS_TARGET_MACHINE" in
x86_64) # opts+=" --enable-ext-mariadb-connector"
opts+=" --enable-ext-ct2n"
opts+=" --enable-ext-numbertext"
opts+=" --enable-ext-nlpsolver"
# opts+=" --enable-ext-languagetool"
;;
esac
# Includes many fonts we don't package individually
opts+=" --with-fonts=yes"
# skia sucks
if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
opts+=" --disable-skia"
fi
if [ "$build_option_java" ]; then
opts+=" --with-java"
opts+=" --with-jdk-home=/usr/lib/jvm/openjdk11"
# also disables hamcrest
opts+=" --without-junit"
else
opts+=" --without-java"
fi
opts+=" --with-tls=nss"
opts+=" --without-system-box2d"
opts+=" --without-system-libzmf"
opts+=" --without-system-libstaroffice"
opts+=" --without-system-libtommath"
opts+=" --without-system-jfreereport"
opts+=" --without-system-apache-commons"
opts+=" --without-system-beanshell"
# opts+=" --without-system-glm"
opts+=" --with-myspell-dicts"
opts+=" --with-system-icu-for-build=yes"
# use system utilities
opts+=" --enable-build-opensymbol"
opts+=" --with-system-ucpp=yes"
# finish configuring build
opts+=" --with-external-dict-dir=${XBPS_CROSS_BASE}/usr/share/hunspell"
opts+=" --with-external-hyph-dir=${XBPS_CROSS_BASE}/usr/share/hyphen"
opts+=" --with-external-thes-dir=${XBPS_CROSS_BASE}/usr/share/mythes"
opts+=" --with-parallelism=${XBPS_MAKEJOBS}"
./configure ${opts} --with-lang="${_languages}"
# Disable slowcheck target
vsed -i Makefile -e "/gb_Top_MODULE_CHECK_TARGETS /s/ slowcheck//"
}
do_build() {
make ${makejobs} ${make_build_target}
make ${makejobs} -C libreofficekit
# on some platforms (32-bit ppc at least), this single file has
# incorrect (non-executable) permissions, so fix it here
# only this file is affected and i have no idea why...
chmod 755 ${wrksrc}/instdir/program/soffice
}
do_install() {
make DESTDIR="${DESTDIR}/all" PREFIXDIR=/usr distro-pack-install
# Remove useless directory usr/lib32
rm -rf ${DESTDIR}/usr/lib32
}
libreoffice-common_package() {
short_desc+=" - Common files"
depends="hunspell hyphen mythes openldap libreoffice-i18n-en-US>=${version}_${revision}"
skiprdeps=/usr/lib/libreoffice/program/libofficebean.so
pkg_install() {
_split common
}
}
#libreoffice-base_package() {
# short_desc+=" - Database frontend"
# depends="libreoffice-common>=${version}_${revision}"
# noverifyrdeps=yes
# pkg_install() {
# _split base
# }
#}
libreoffice-calc_package() {
short_desc+=" - Spreadsheet"
depends="libreoffice-common>=${version}_${revision}"
noverifyrdeps=yes
pkg_install() {
_split calc
}
}
#libreoffice-draw_package() {
# short_desc+=" - Drawing application"
# depends="sane libreoffice-common>=${version}_${revision}"
# noverifyrdeps=yes
# pkg_install() {
# _split draw
# }
#}
libreoffice-fonts_package() {
short_desc+=" - Fonts"
pkg_install() {
vmkdir usr/lib/libreoffice/share
mv ${DESTDIR}/all/usr/lib/libreoffice/share/fonts \
${PKGDESTDIR}/usr/lib/libreoffice/share/
}
}
#libreoffice-gnome_package() {
# short_desc+=" - GNOME integration"
# depends="libreoffice-common>=${version}_${revision}"
# noverifyrdeps=yes
# pkg_install() {
# _split gnome
# }
#}
libreoffice-impress_package() {
short_desc+=" - Presentation application"
depends="libreoffice-common>=${version}_${revision}"
noverifyrdeps=yes
pkg_install() {
_split impress
}
}
#libreoffice-kde_package() {
# short_desc+=" - KDE integration"
# depends="libreoffice-common>=${version}_${revision}"
# noverifyrdeps=yes
# pkg_install() {
# cat > ${wrksrc}/file-lists/kde5_list.txt <<-EOF
# /usr/lib/libreoffice/program/libkf5be1lo.so
# /usr/lib/libreoffice/program/libvclplug_kf5lo.so
# /usr/lib/libreoffice/program/libvclplug_qt5lo.so
# EOF
# _split kde5
# }
#}
libreoffice-kit_package() {
short_desc+=" - development files"
pkg_install() {
vmkdir usr/include
vcopy ${wrksrc}/include/LibreOfficeKit usr/include
}
}
libreoffice-math_package() {
short_desc+=" - Equation editor"
depends="libreoffice-common>=${version}_${revision}"
noverifyrdeps=yes
pkg_install() {
_split math
}
}
#libreoffice-postgresql_package() {
# short_desc+=" - Connector for PostgreSQL"
# depends="libreoffice-base>=${version}_${revision} libreoffice-common>=${version}_${revision}"
# noverifyrdeps=yes
# pkg_install() {
# _split postgresql
# }
#}
libreoffice-writer_package() {
short_desc+=" - Word processor"
depends="libreoffice-common>=${version}_${revision}"
noverifyrdeps=yes
pkg_install() {
_split writer
}
}
# Use a name which makes this catch-all subpackage the last one
libreoffice-xtensions_package() {
short_desc+=" - Extensions"
depends="libreoffice-common>=${version}_${revision}"
noverifyrdeps=yes
pkg_install() {
# Remove empty files
find ${DESTDIR}/all -size 0 -delete
# Remove useless files
for f in segments.gen segments_3 _0.cfs help.tree help.key_ help.db_; do
find ${DESTDIR}/all -name "${f}" -delete
done
# Move the remaining files to this subpackage
vmkdir usr
mv -v ${DESTDIR}/all/usr/* ${PKGDESTDIR}/usr/
rm -rvf ${DESTDIR}/all
}
}

View File

@ -0,0 +1,2 @@
site=http://www.libreoffice.org/download/libreoffice-fresh/
pattern='libreoffice-\K[\d.]+'

View File

@ -0,0 +1,282 @@
###
# This makefile is used to generate the kernel documentation,
# primarily based on in-line comments in various source files.
# See Documentation/kernel-doc-nano-HOWTO.txt for instruction in how
# to document the SRC - and how to read it.
# To add a new book the only step required is to add the book to the
# list of DOCBOOKS.
DOCBOOKS := z8530book.xml \
kernel-hacking.xml kernel-locking.xml \
networking.xml \
filesystems.xml lsm.xml kgdb.xml \
libata.xml mtdnand.xml librs.xml rapidio.xml \
s390-drivers.xml scsi.xml \
sh.xml w1.xml
ifeq ($(DOCBOOKS),)
# Skip DocBook build if the user explicitly requested no DOCBOOKS.
.DEFAULT:
@echo " SKIP DocBook $@ target (DOCBOOKS=\"\" specified)."
else
ifneq ($(SPHINXDIRS),)
# Skip DocBook build if the user explicitly requested a sphinx dir
.DEFAULT:
@echo " SKIP DocBook $@ target (SPHINXDIRS specified)."
else
###
# The build process is as follows (targets):
# (xmldocs) [by docproc]
# file.tmpl --> file.xml +--> file.ps (psdocs) [by db2ps or xmlto]
# +--> file.pdf (pdfdocs) [by db2pdf or xmlto]
# +--> DIR=file (htmldocs) [by xmlto]
# +--> man/ (mandocs) [by xmlto]
# for PDF and PS output you can choose between xmlto and docbook-utils tools
PDF_METHOD = $(prefer-db2x)
PS_METHOD = $(prefer-db2x)
targets += $(DOCBOOKS)
BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
xmldocs: $(BOOKS)
sgmldocs: xmldocs
PS := $(patsubst %.xml, %.ps, $(BOOKS))
psdocs: $(PS)
PDF := $(patsubst %.xml, %.pdf, $(BOOKS))
pdfdocs: $(PDF)
HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
htmldocs: $(HTML)
$(call cmd,build_main_index)
MAN := $(patsubst %.xml, %.9, $(BOOKS))
mandocs: $(MAN)
find $(obj)/man -name '*.9' | xargs gzip -nf
# Default location for installed man pages
export INSTALL_MAN_PATH = $(objtree)/usr
installmandocs: mandocs
mkdir -p $(INSTALL_MAN_PATH)/man/man9/
find $(obj)/man -name '*.9.gz' -printf '%h %f\n' | \
sort -k 2 -k 1 | uniq -f 1 | sed -e 's: :/:' | \
xargs install -m 644 -t $(INSTALL_MAN_PATH)/man/man9/
# no-op for the DocBook toolchain
epubdocs:
latexdocs:
linkcheckdocs:
###
#External programs used
KERNELDOCXMLREF = $(srctree)/scripts/kernel-doc-xml-ref
KERNELDOC = $(srctree)/scripts/kernel-doc
DOCPROC = $(objtree)/scripts/docproc
CHECK_LC_CTYPE = $(objtree)/scripts/check-lc_ctype
# Use a fixed encoding - UTF-8 if the C library has support built-in
# or ASCII if not
LC_CTYPE := $(call try-run, LC_CTYPE=C.UTF-8 $(CHECK_LC_CTYPE),C.UTF-8,C)
export LC_CTYPE
XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl
XMLTOFLAGS += --skip-validation
###
# DOCPROC is used for two purposes:
# 1) To generate a dependency list for a .tmpl file
# 2) To preprocess a .tmpl file and call kernel-doc with
# appropriate parameters.
# The following rules are used to generate the .xml documentation
# required to generate the final targets. (ps, pdf, html).
quiet_cmd_docproc = DOCPROC $@
cmd_docproc = SRCTREE=$(srctree)/ $(DOCPROC) doc $< >$@
define rule_docproc
set -e; \
$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \
$(cmd_$(1)); \
( \
echo 'cmd_$@ := $(cmd_$(1))'; \
echo $@: `SRCTREE=$(srctree) $(DOCPROC) depend $<`; \
) > $(dir $@).$(notdir $@).cmd
endef
%.xml: %.tmpl $(KERNELDOC) $(DOCPROC) $(KERNELDOCXMLREF) FORCE
$(call if_changed_rule,docproc)
# Tell kbuild to always build the programs
always := $(hostprogs-y)
notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \
exit 1
db2xtemplate = db2TYPE -o $(dir $@) $<
xmltotemplate = xmlto TYPE $(XMLTOFLAGS) -o $(dir $@) $<
# determine which methods are available
ifeq ($(shell which db2ps >/dev/null 2>&1 && echo found),found)
use-db2x = db2x
prefer-db2x = db2x
else
use-db2x = notfound
prefer-db2x = $(use-xmlto)
endif
ifeq ($(shell which xmlto >/dev/null 2>&1 && echo found),found)
use-xmlto = xmlto
prefer-xmlto = xmlto
else
use-xmlto = notfound
prefer-xmlto = $(use-db2x)
endif
# the commands, generated from the chosen template
quiet_cmd_db2ps = PS $@
cmd_db2ps = $(subst TYPE,ps, $($(PS_METHOD)template))
%.ps : %.xml
$(call cmd,db2ps)
quiet_cmd_db2pdf = PDF $@
cmd_db2pdf = $(subst TYPE,pdf, $($(PDF_METHOD)template))
%.pdf : %.xml
$(call cmd,db2pdf)
index = index.html
main_idx = $(obj)/$(index)
quiet_cmd_build_main_index = HTML $(main_idx)
cmd_build_main_index = rm -rf $(main_idx); \
echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \
echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \
cat $(HTML) >> $(main_idx)
quiet_cmd_db2html = HTML $@
cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \
$(patsubst %.html,%,$(notdir $@))</a><p>' > $@
###
# Rules to create an aux XML and .db, and use them to re-process the DocBook XML
# to fill internal hyperlinks
gen_aux_xml = :
quiet_gen_aux_xml = echo ' XMLREF $@'
silent_gen_aux_xml = :
%.aux.xml: %.xml
@$($(quiet)gen_aux_xml)
@rm -rf $@
@(cat $< | egrep "^<refentry id" | egrep -o "\".*\"" | cut -f 2 -d \" > $<.db)
@$(KERNELDOCXMLREF) -db $<.db $< > $@
.PRECIOUS: %.aux.xml
%.html: %.aux.xml
@(which xmlto > /dev/null 2>&1) || \
(echo "*** You need to install xmlto ***"; \
exit 1)
@rm -rf $@ $(patsubst %.html,%,$@)
$(call cmd,db2html)
@if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \
cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi
quiet_cmd_db2man = MAN $@
cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man/$(*F) $< ; fi
%.9 : %.xml
@(which xmlto > /dev/null 2>&1) || \
(echo "*** You need to install xmlto ***"; \
exit 1)
$(Q)mkdir -p $(obj)/man/$(*F)
$(call cmd,db2man)
@touch $@
###
# Rules to generate postscripts and PNG images from .fig format files
quiet_cmd_fig2eps = FIG2EPS $@
cmd_fig2eps = fig2dev -Leps $< $@
%.eps: %.fig
@(which fig2dev > /dev/null 2>&1) || \
(echo "*** You need to install transfig ***"; \
exit 1)
$(call cmd,fig2eps)
quiet_cmd_fig2png = FIG2PNG $@
cmd_fig2png = fig2dev -Lpng $< $@
%.png: %.fig
@(which fig2dev > /dev/null 2>&1) || \
(echo "*** You need to install transfig ***"; \
exit 1)
$(call cmd,fig2png)
###
# Rule to convert a .c file to inline XML documentation
gen_xml = :
quiet_gen_xml = echo ' GEN $@'
silent_gen_xml = :
%.xml: %.c
@$($(quiet)gen_xml)
@( \
echo "<programlisting>"; \
expand --tabs=8 < $< | \
sed -e "s/&/\\&amp;/g" \
-e "s/</\\&lt;/g" \
-e "s/>/\\&gt;/g"; \
echo "</programlisting>") > $@
endif # DOCBOOKS=""
endif # SPHINDIR=...
###
# Help targets as used by the top-level makefile
dochelp:
@echo ' Linux kernel internal documentation in different formats (DocBook):'
@echo ' htmldocs - HTML'
@echo ' pdfdocs - PDF'
@echo ' psdocs - Postscript'
@echo ' xmldocs - XML DocBook'
@echo ' mandocs - man pages'
@echo ' installmandocs - install man pages generated by mandocs to INSTALL_MAN_PATH'; \
echo ' (default: $(INSTALL_MAN_PATH))'; \
echo ''
@echo ' cleandocs - clean all generated DocBook files'
@echo
@echo ' make DOCBOOKS="s1.xml s2.xml" [target] Generate only docs s1.xml s2.xml'
@echo ' valid values for DOCBOOKS are: $(DOCBOOKS)'
@echo
@echo " make DOCBOOKS=\"\" [target] Don't generate docs from Docbook"
@echo ' This is useful to generate only the ReST docs (Sphinx)'
###
# Temporary files left by various tools
clean-files := $(DOCBOOKS) \
$(patsubst %.xml, %.dvi, $(DOCBOOKS)) \
$(patsubst %.xml, %.aux, $(DOCBOOKS)) \
$(patsubst %.xml, %.tex, $(DOCBOOKS)) \
$(patsubst %.xml, %.log, $(DOCBOOKS)) \
$(patsubst %.xml, %.out, $(DOCBOOKS)) \
$(patsubst %.xml, %.ps, $(DOCBOOKS)) \
$(patsubst %.xml, %.pdf, $(DOCBOOKS)) \
$(patsubst %.xml, %.html, $(DOCBOOKS)) \
$(patsubst %.xml, %.9, $(DOCBOOKS)) \
$(patsubst %.xml, %.aux.xml, $(DOCBOOKS)) \
$(patsubst %.xml, %.xml.db, $(DOCBOOKS)) \
$(patsubst %.xml, %.xml, $(DOCBOOKS)) \
$(patsubst %.xml, .%.xml.cmd, $(DOCBOOKS)) \
$(index)
clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
cleandocs:
$(Q)rm -f $(call objectify, $(clean-files))
$(Q)rm -rf $(call objectify, $(clean-dirs))
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable so we can use it in if_changed and friends.
.PHONY: $(PHONY)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
#!/bin/sh
mod=$1
mkdir -p usr/lib/debug/${mod%/*}
$OBJCOPY --only-keep-debug --compress-debug-sections $mod usr/lib/debug/$mod
$OBJCOPY --add-gnu-debuglink=${DESTDIR}/usr/lib/debug/$mod $mod
/usr/bin/$STRIP --strip-debug $mod
gzip -9 $mod

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,85 @@
This makes the Linux kernel build as ELFv2 on big endian ppc64. The upstream
doesn't seem to be interested in this but it's a small patch that is unlikely
to break/easy to remake and in worst case can always be ditched.
Using ELFv2 has some potential performance benefits and is already always used
on little endian. It requires a relatively modern toolchain, which we already
have.
Ping q66 if it does not apply.
--- a/arch/powerpc/Makefile 2020-01-05 14:40:50.395763093 +0100
+++ b/arch/powerpc/Makefile 2020-01-05 14:48:39.025251092 +0100
@@ -86,10 +86,8 @@ MULTIPLEWORD := -mmultiple
endif
ifdef CONFIG_PPC64
-cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1)
-cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mcall-aixdesc)
-aflags-$(CONFIG_CPU_BIG_ENDIAN) += $(call cc-option,-mabi=elfv1)
-aflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mabi=elfv2
+cflags-y += $(call cc-option,-mabi=elfv2,$(call cc-option,-mcall-aixdesc))
+aflags-y += $(call cc-option,-mabi=elfv2,$(call cc-option,-mabi=elfv1))
endif
cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -mlittle-endian
@@ -130,14 +128,8 @@ endif
endif
CFLAGS-$(CONFIG_PPC64) := $(call cc-option,-mtraceback=no)
-ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2,$(call cc-option,-mcall-aixdesc))
-AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2)
-else
-CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
-CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcall-aixdesc)
-AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
-endif
+AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2,$(call cc-option,-mabi=elfv1))
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,$(call cc-option,-mminimal-toc))
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD)
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -44,8 +44,8 @@ ifdef CONFIG_CPU_BIG_ENDIAN
BOOTCFLAGS += -mbig-endian
else
BOOTCFLAGS += -mlittle-endian
-BOOTCFLAGS += $(call cc-option,-mabi=elfv2)
endif
+BOOTCFLAGS += $(call cc-option,-mabi=elfv2)
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
--- a/drivers/crypto/vmx/Makefile 2020-01-01 10:56:10.560965046 +0100
+++ b/drivers/crypto/vmx/Makefile 2020-01-01 10:57:05.189968856 +0100
@@ -5,7 +5,7 @@
ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
override flavour := linux-ppc64le
else
-override flavour := linux-ppc64
+override flavour := linux-ppc64v2
endif
quiet_cmd_perl = PERL $@
--- a/drivers/crypto/vmx/ppc-xlate.pl
+++ b/drivers/crypto/vmx/ppc-xlate.pl
@@ -40,7 +40,7 @@ my $globl = sub {
};
my $text = sub {
my $ret = ($flavour =~ /aix/) ? ".csect\t.text[PR],7" : ".text";
- $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64le/);
+ $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64(le|v2)/);
$ret;
};
my $machine = sub {
@@ -142,7 +142,7 @@ my $vmr = sub {
# Some ABIs specify vrsave, special-purpose register #256, as reserved
# for system use.
-my $no_vrsave = ($flavour =~ /linux-ppc64le/);
+my $no_vrsave = ($flavour =~ /linux-ppc64(le|v2)/);
my $mtspr = sub {
my ($f,$idx,$ra) = @_;
if ($idx == 256 && $no_vrsave) {

View File

@ -0,0 +1,324 @@
# Template file for 'linux4.14'
pkgname=linux4.14
version=4.14.225
revision=2
wrksrc="linux-${version%.*}"
short_desc="Linux kernel and modules (${version%.*} series)"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="GPL-2.0-only"
homepage="http://www.kernel.org"
distfiles="https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${version%.*}.tar.xz
https://cdn.kernel.org/pub/linux/kernel/v4.x/patch-${version}.xz"
checksum="f81d59477e90a130857ce18dc02f4fbe5725854911db1e7ba770c7cd350f96a7
b9afed9ae1f63b67fa01d17b3146f23a2ab5ef8ce458f3aec4d0b174553d0c52"
skip_extraction="patch-${version}.xz"
python_version=2 #unverified
patch_args="-Np1"
nodebug=yes # -dbg package is generated below manually
nostrip=yes
noverifyrdeps=yes
noshlibprovides=yes
preserve=yes
archs="i686* x86_64* armv5tel* aarch64* ppc*"
hostmakedepends="bc elfutils-devel kmod openssl-devel perl uboot-mkimage
gmp-devel libmpc-devel xz"
case "$XBPS_TARGET_MACHINE" in
ppc64le*) broken="No ppc64le support";;
esac
_kernver="${version}_${revision}"
triggers="kernel-hooks"
kernel_hooks_version="${_kernver}"
# These files could be modified when an external module is built.
mutable_files="
/usr/lib/modules/${_kernver}/modules.builtin.bin
/usr/lib/modules/${_kernver}/modules.builtin.alias.bin
/usr/lib/modules/${_kernver}/modules.softdep
/usr/lib/modules/${_kernver}/modules.dep
/usr/lib/modules/${_kernver}/modules.dep.bin
/usr/lib/modules/${_kernver}/modules.symbols
/usr/lib/modules/${_kernver}/modules.symbols.bin
/usr/lib/modules/${_kernver}/modules.alias
/usr/lib/modules/${_kernver}/modules.alias.bin
/usr/lib/modules/${_kernver}/modules.devname"
# reproducible build
export KBUILD_BUILD_TIMESTAMP=${SOURCE_DATE_EPOCH:-0}
export KBUILD_BUILD_USER=voidlinux
export KBUILD_BUILD_HOST=voidlinux
pre_patch() {
xzcat $XBPS_SRCDISTDIR/$pkgname-$version/patch-${version}.xz | patch -Np1
}
do_configure() {
# 4.14rc1 misses Documentation/DocBook. We ship the directory from 4.12 here.
cp -a $FILESDIR/DocBook -t Documentation
# If there's a file called <arch>-dotconfig, use it to
# configure the kernel; otherwise use arch defaults and all stuff
# as modules (defconfig+allmodconfig).
local arch subarch _args
case "$XBPS_TARGET_MACHINE" in
i686*) arch=i386;;
x86_64*) arch=x86_64;;
armv5*|armv7*) arch=arm;;
aarch64*) arch=arm64;;
ppc64*) arch=powerpc; subarch=ppc64;;
ppc*) arch=powerpc;;
esac
if [ "$CROSS_BUILD" ]; then
_args="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
fi
if [ -f ${FILESDIR}/${subarch:-$arch}-dotconfig-custom ]; then
msg_normal "Detected a custom .config file for your arch, using it.\n"
cp -f ${FILESDIR}/${subarch:-$arch}-dotconfig-custom .config
make ${makejobs} ARCH=$arch ${_args} oldconfig
elif [ -f ${FILESDIR}/${subarch:-$arch}-dotconfig ]; then
msg_normal "Detected a .config file for your arch, using it.\n"
cp -f ${FILESDIR}/${subarch:-$arch}-dotconfig .config
make ${makejobs} ARCH=$arch ${_args} oldconfig
elif [ -f ${FILESDIR}/${XBPS_TARGET_MACHINE%%-musl}-dotconfig ]; then
msg_normal "Detected a .config file for your cpu family, using it.\n"
cp -f ${FILESDIR}/${XBPS_TARGET_MACHINE%%-musl}-dotconfig .config
make ${makejobs} ARCH=$arch ${_args} oldconfig
else
msg_normal "Defaulting to 'defconfig and allmodconfig'.\n"
make ${makejobs} ARCH=$arch ${_args} defconfig
make ${makejobs} ARCH=$arch ${_args} allmodconfig
fi
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
}
do_build() {
local arch _cross _args
case "$XBPS_TARGET_MACHINE" in
i686*) _args="bzImage modules"; arch=i386;;
x86_64*) _args="bzImage modules"; arch=x86_64;;
armv5*|armv7*) _args="zImage modules dtbs"; arch=arm;;
aarch64*) _args="Image modules dtbs"; arch=arm64;;
ppc*) _args="zImage modules"; arch=powerpc;;
esac
if [ "$CROSS_BUILD" ]; then
_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
fi
if [ "${_patchver}" ]; then
_version="EXTRAVERSION=${_patchver}"
fi
export LDFLAGS=
make ARCH=$arch ${_version} ${_cross} ${makejobs} prepare
make ARCH=$arch ${_version} ${_cross} ${makejobs} ${_args}
}
do_install() {
local arch subarch _args hdrdest
case "$XBPS_TARGET_MACHINE" in
i686*) arch=x86; subarch=i386;;
x86_64*) arch=x86; subarch=x86_64;;
armv5*|armv7*) arch=arm;;
aarch64*) arch=arm64;;
ppc*) arch=powerpc;;
esac
# Run depmod after compressing modules.
sed -i '2iexit 0' scripts/depmod.sh
# Install kernel, firmware and modules
make ${makejobs} INSTALL_MOD_PATH=${DESTDIR} modules_install
hdrdest=${DESTDIR}/usr/src/kernel-headers-${_kernver}
vinstall .config 644 boot config-${_kernver}
vinstall System.map 644 boot System.map-${_kernver}
case "$arch" in
x86)
vinstall arch/x86/boot/bzImage 644 boot vmlinuz-${_kernver}
;;
arm)
vinstall arch/arm/boot/zImage 644 boot
vmkdir boot/dtbs
cp arch/arm/boot/dts/*.dtb ${DESTDIR}/boot/dtbs
;;
arm64)
vinstall arch/arm64/boot/Image 644 boot vmlinux-${_kernver}
vmkdir boot/dtbs
cp arch/arm64/boot/dts/*/*.dtb ${DESTDIR}/boot/dtbs
;;
powerpc)
# zImage on powerpc is useless as it won't load initramfs
# raw vmlinux is huge, and this is nostrip, so do it manually
vinstall vmlinux 644 boot vmlinux-${_kernver}
/usr/bin/$STRIP ${DESTDIR}/boot/vmlinux-${_kernver}
;;
esac
# Switch to /usr.
vmkdir usr
mv ${DESTDIR}/lib ${DESTDIR}/usr
cd ${DESTDIR}/usr/lib/modules/${_kernver}
rm -f source build
ln -sf ../../../src/kernel-headers-${_kernver} build
cd ${wrksrc}
# Install required headers to build external modules
install -Dm644 Makefile ${hdrdest}/Makefile
install -Dm644 kernel/Makefile ${hdrdest}/kernel/Makefile
install -Dm644 .config ${hdrdest}/.config
mkdir -p ${hdrdest}/include
# Remove firmware stuff provided by the "linux-firmware" pkg.
rm -rf ${DESTDIR}/usr/lib/firmware
for i in acpi asm-generic config crypto drm generated linux math-emu \
media net pcmcia scsi sound trace uapi video xen; do
if [ -d include/$i ]; then
cp -a include/$i ${hdrdest}/include
fi
done
cd ${wrksrc}
mkdir -p ${hdrdest}/arch/${arch}
cp -a arch/${arch}/include ${hdrdest}/arch/${arch}
# Copy files necessary for later builds, like nvidia and vmware
# cp Module.symvers ${hdrdest}
# cp -a scripts ${hdrdest}
# mkdir -p ${hdrdest}/arch/${arch}/kernel
# cp arch/${arch}/Makefile ${hdrdest}/arch/${arch}
# if [ "$subarch" = "i386" ]; then
# mkdir -p ${hdrdest}/arch/x86
# cp arch/x86/Makefile_32.cpu ${hdrdest}/arch/x86
# fi
# if [ "$arch" = "x86" ]; then
# mkdir -p ${hdrdest}/arch/x86/kernel
# cp arch/x86/kernel/asm-offsets.s ${hdrdest}/arch/x86/kernel
# fi
# add headers for lirc package
# pci
for i in bt8xx cx88 saa7134; do
mkdir -p ${hdrdest}/drivers/media/pci/${i}
cp -a drivers/media/pci/${i}/*.h ${hdrdest}/drivers/media/pci/${i}
done
# usb
for i in cpia2 em28xx pwc; do
mkdir -p ${hdrdest}/drivers/media/usb/${i}
cp -a drivers/media/usb/${i}/*.h ${hdrdest}/drivers/media/usb/${i}
done
# i2c
mkdir -p ${hdrdest}/drivers/media/i2c
cp drivers/media/i2c/*.h ${hdrdest}/drivers/media/i2c
for i in cx25840; do
mkdir -p ${hdrdest}/drivers/media/i2c/${i}
cp -a drivers/media/i2c/${i}/*.h ${hdrdest}/drivers/media/i2c/${i}
done
# Add docbook makefile
install -Dm644 Documentation/DocBook/Makefile \
${hdrdest}/Documentation/DocBook/Makefile
# Add md headers
mkdir -p ${hdrdest}/drivers/md
cp drivers/md/*.h ${hdrdest}/drivers/md
# Add inotify.h
mkdir -p ${hdrdest}/include/linux
cp include/linux/inotify.h ${hdrdest}/include/linux
# Add wireless headers
mkdir -p ${hdrdest}/net/mac80211/
cp net/mac80211/*.h ${hdrdest}/net/mac80211
# add dvb headers for external modules
# mkdir -p ${hdrdest}/drivers/media/dvb-core
# cp drivers/media/dvb-core/*.h ${hdrdest}/drivers/media/dvb-core/
# mkdir -p ${hdrdest}/include/config/dvb/
# cp include/config/dvb/*.h ${hdrdest}/include/config/dvb/
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
# mkdir -p ${hdrdest}/drivers/media/dvb-frontends
# cp drivers/media/dvb-frontends/lgdt330x.h \
# ${hdrdest}/drivers/media/dvb-frontends/
# cp drivers/media/i2c/msp3400-driver.h ${hdrdest}/drivers/media/i2c/
# add dvb headers
# mkdir -p ${hdrdest}/drivers/media/usb/dvb-usb
# cp drivers/media/usb/dvb-usb/*.h ${hdrdest}/drivers/media/usb/dvb-usb/
# mkdir -p ${hdrdest}/drivers/media/dvb-frontends
# cp drivers/media/dvb-frontends/*.h ${hdrdest}/drivers/media/dvb-frontends/
# mkdir -p ${hdrdest}/drivers/media/tuners
# cp drivers/media/tuners/*.h ${hdrdest}/drivers/media/tuners/
# Add xfs and shmem for aufs building
mkdir -p ${hdrdest}/fs/xfs/libxfs
mkdir -p ${hdrdest}/mm
cp fs/xfs/libxfs/xfs_sb.h ${hdrdest}/fs/xfs/libxfs/xfs_sb.h
# Add objtool binary, needed to build external modules with dkms
case "$XBPS_TARGET_MACHINE" in
x86_64*)
mkdir -p ${hdrdest}/tools/objtool
cp tools/objtool/objtool ${hdrdest}/tools/objtool
;;
esac
# Copy in Kconfig files
for i in $(find . -name "Kconfig*"); do
mkdir -p ${hdrdest}/$(echo $i | sed 's|/Kconfig.*||')
cp $i ${hdrdest}/$i
done
# Remove unneeded architectures
case "$arch" in
i386|x86_64) _args="arm* p*";;
arm|arm64) _args="x86* p*";;
powerpc) _args="arm* x86* parisc";;
esac
for arch in alpha avr32 blackfin cris frv h8300 \
ia64 m* s* um v850 xtensa ${_args}; do
rm -rf ${hdrdest}/arch/${arch}
done
# Extract debugging symbols
msg_normal "$pkgver: extracting debug info, please wait...\n"
install -Dm644 vmlinux ${DESTDIR}/usr/lib/debug/boot/vmlinux-${_kernver}
(
cd ${DESTDIR}
export DESTDIR
find ./ -name '*.ko' -print0 | \
xargs -0r -n1 -P ${XBPS_MAKEJOBS} ${FILESDIR}/mv-debug
)
# ... and run depmod again.
depmod -b ${DESTDIR}/usr -F System.map ${_kernver}
}
linux4.14-headers_package() {
preserve=yes
nostrip=yes
noshlibprovides=yes
short_desc+=" - source headers for 3rd party modules"
pkg_install() {
vmove usr/src
vmove usr/lib/modules/${_kernver}/build
}
}
linux4.14-dbg_package() {
preserve=yes
nostrip=yes
noverifyrdeps=yes
noshlibprovides=yes
repository=debug
short_desc+=" - debugging symbols"
pkg_install() {
vmove usr/lib/debug
}
}

View File

@ -0,0 +1,11 @@
--- a/meson.build 2020-05-22 20:21:50.457744069 -0700
+++ b/meson.build 2020-05-22 20:46:43.193735356 -0700
@@ -5,7 +5,7 @@
c_args = ['-D_GNU_SOURCE', '-DEMACS', '-DVI', '-Wno-format-security', '-Wno-pointer-sign']
deps = []
-ncurses = dependency('ncurses', required: false)
+ncurses = dependency('ncursesw', required: false)
if ncurses.found()
deps += [ncurses]
else

View File

@ -0,0 +1,43 @@
# Template file for 'loksh'
pkgname=loksh
version=6.8.1
revision=1
build_style=meson
hostmakedepends="pkg-config"
makedepends="ncurses-devel"
short_desc="Linux port of OpenBSD's ksh"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="custom:Public Domain"
homepage="https://github.com/dimkr/loksh"
distfiles="https://github.com/dimkr/loksh/releases/download/${version}/loksh-${version}.tar.xz"
checksum=ceeda4913febdb7e5f42db6a465835178221417e9f24865b0017e89a1a6a610e
register_shell="/bin/loksh"
alternatives="
sh:sh:/usr/bin/loksh
sh:sh.1:/usr/share/man/man1/loksh-sh.1
ksh:ksh:/usr/bin/loksh
ksh:ksh.1:/usr/share/man/man1/loksh.1
"
build_options="static"
# Construcción estática
do_configure() {
if [ "$build_option_static" ]; then
CFLAGS+=" -static"
LDFLAGS+=" -static"
fi
meson --prefix=/usr\
build
}
post_install() {
vlicense LEGAL
mv ${DESTDIR}/usr/bin/ksh ${DESTDIR}/usr/bin/loksh
mv ${DESTDIR}/usr/share/man/man1/ksh.1 \
${DESTDIR}/usr/share/man/man1/loksh.1
mv ${DESTDIR}/usr/share/man/man1/sh.1 \
${DESTDIR}/usr/share/man/man1/loksh-sh.1
}

View File

@ -0,0 +1,24 @@
# Template file for 'base-minimal'
pkgname=minimal-custom
version=0.1
revision=1
build_style=meta
short_desc="Void Linux base system meta with minimal tools"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="Public Domain"
homepage="https://www.voidlinux.org/"
depends="
ca-certificates base-files busybox-static coreutils file dash gzip
gawk util-linux bsdtar shadow procps-ng iana-etc xbps-static tzdata
runit-void removed-packages"
#depends="
# base-files coreutils findutils diffutils dash grep gzip sed gawk
# util-linux which tar shadow procps-ng iana-etc xbps nvi tzdata
# runit-void removed-packages"
case "$XBPS_TARGET_MACHINE" in
*-musl) depends+=" musl";;
*) depends+=" glibc-locales";;
esac

View File

@ -0,0 +1,25 @@
# Template file for 'nnn'
pkgname=nnn
version=3.5
revision=1
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="ncurses-devel readline-devel gpm-devel"
short_desc="Missing terminal file browser for X"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="BSD-2-Clause"
homepage="https://github.com/jarun/nnn"
changelog="https://raw.githubusercontent.com/jarun/nnn/master/CHANGELOG"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=e636d4035499a112a0ad33f1557838132ed2e39d8857c5b219714fe9f64681f3
do_build() {
make O_STATIC=1 strip
}
post_install() {
vinstall misc/auto-completion/bash/nnn-completion.bash 644 \
usr/share/bash-completion/completions nnn
vlicense LICENSE
}

View File

@ -0,0 +1,11 @@
--- a/configure
+++ b/configure
@@ -932,7 +932,7 @@
fi
printf "checking for C compiler... "
-cccheck
+cc=$CC
if [ $? -ne 0 ] ; then
echo "not found"
echo "Please install a C compiler and re-run configure."

View File

@ -0,0 +1,32 @@
# Template file for 'oksh'
pkgname=oksh
version=6.9
revision=1
build_style=gnu-configure
makedepends="ncurses-devel"
short_desc="Portable OpenBSD ksh, based on the Public Domain Korn Shell"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="Public Domain"
homepage="https://github.com/ibara/oksh"
distfiles="${homepage}/releases/download/oksh-${version}/oksh-${version}.tar.gz"
checksum=c08d97b2ac9ee5d88e9e508d27c75502b2d06c20d4c5ab87b496cb3b9951bd35
register_shell="/bin/oksh"
alternatives="
sh:sh:/usr/bin/oksh
sh:sh.1:/usr/share/man/man1/oksh.1
ksh:ksh:/usr/bin/oksh
ksh:ksh.1:/usr/share/man/man1/oksh.1
"
build_options="static"
# Construcción estática
do_configure() {
if [ "$build_option_static" ]; then
./configure\
--prefix=/usr\
--enable-static\
--enable-lto
fi
}

View File

@ -0,0 +1 @@
ignore='2018????'

View File

@ -0,0 +1,51 @@
# Template file for 'palemoon'
pkgname=palemoon
version=29.2.1
revision=1
_release=1
archs="i686 x86_64"
hostmakedepends="curl python3-html2text tar xz"
depends="libvpx alsa-lib dbus-glib libXt gtk+"
short_desc="Open-source web browser based on Firefox focusing on efficiency"
maintainer="tuxliban <tenshalito@gmail.com>"
license="LGPL-2.1-or-later MPL-2.0-or-later GPL-3.0-or-later"
homepage="https://www.palemoon.org"
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
_debarch=amd64
checksum=695db94a6db9fa410f961a9c93452e5568eef14ff9d4cb91e1b033cdb6ccc7a4
else
_debarch=i386
checksum=e5d3de94e8059f6d40925fedc68ecae3851494a8702e3839822927791fb2ddef
fi
distfiles="https://download.opensuse.org/repositories/home:/stevenpusser/Debian_10/${_debarch}/${pkgname}_${version}-${_release}.gtk2_${_debarch}.deb"
_licenseURL="https://www.palemoon.org/redist.shtml"
do_extract() {
ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}_${version}-${_release}.gtk2_${_debarch}.deb
tar xf data.tar.xz
}
do_install() {
vinstall usr/share/applications/${pkgname}.desktop 0644 \
usr/share/applications
# Crear directorio en path falso ($DESTDIR) para el paquete
vmkdir opt
vmkdir usr/bin
# Mover archivos de forma recursiva
vcopy usr/lib/palemoon opt
ln -s /opt/palemoon/palemoon "${DESTDIR}/usr/bin/palemoon"
for res in 16 32 48 128; do
vinstall usr/share/icons/hicolor/${res}x${res}/apps/${pkgname}.png 0644 \
usr/share/icons/hicolor/${res}x${res}/apps ${pkgname}.png
done
}
post_install() {
curl ${_licenseURL} | html2text | sed '1,57d' > EULA.md
vlicense EULA.md
}

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec scrond -n 2>&1

34
Plantillas/scron/template Normal file
View File

@ -0,0 +1,34 @@
# Template file for 'scron'
pkgname=scron
version=0.4
revision=3
wrksrc=${pkgname}
build_style=gnu-makefile
short_desc="Simple cron daemon"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="MIT"
homepage="https://git.disroot.org/tuxliban/scron"
distfiles="${homepage}/archive/${version}.tar.gz"
checksum=eec79d97efbc5237f171fd43610b4aca20833c687721e795bfa9600d7845f3b6
provides="cron-daemon-0_1"
alternatives="
crond:crond:/etc/sv/scron
crond:crond:/usr/bin/scrond
"
pre_build() {
# STFU gcc
sed -i 's|BSD_SOURCE|DEFAULT_SOURCE|g' Makefile
sed -i 's|^CC|#CC|g' Makefile
sed -i 's|^CFLAGS|#CFLAGS|g' Makefile
sed -i 's|^LDFLAGS|#LDFLAGS|g' Makefile
}
do_install() {
vbin crond scrond
vsv scron
vlicense LICENSE
vdoc README
vman scron.1
}

View File

@ -0,0 +1,65 @@
include config.mk
.POSIX:
.SUFFIXES: .c .o
HDR = util.h arg.h
LIB = \
util/strlcpy.o \
util/eprintf.o
SRC = sdhcp.c
OBJ = $(SRC:.c=.o) $(LIB)
BIN = $(SRC:.c=)
MAN = $(SRC:.c=.1)
all: options binlib
options:
@echo sdhcp build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
binlib: util.a
$(MAKE) bin
bin: $(BIN)
$(OBJ): $(HDR) config.mk
.o:
@echo LD $@
@$(LD) -o $@ $< util.a $(LDFLAGS)
.c.o:
@echo CC $<
@$(CC) -c -o $@ $< $(CFLAGS)
util.a: $(LIB)
@echo AR $@
@$(AR) -r -c $@ $(LIB)
@ranlib $@
install: all
@echo installing executables to $(DESTDIR)$(PREFIX)/bin
@mkdir -p $(DESTDIR)$(PREFIX)/bin
@cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
@cd $(DESTDIR)$(PREFIX)/bin && chmod 755 $(BIN)
@echo installing manual pages to $(DESTDIR)$(MANPREFIX)/man1
@mkdir -p $(DESTDIR)$(MANPREFIX)/man1
@for m in $(MAN); do sed "s/VERSION/$(VERSION)/g" < "$$m" > $(DESTDIR)$(MANPREFIX)/man1/"$$m"; done
@cd $(DESTDIR)$(MANPREFIX)/man1 && chmod 644 $(MAN)
uninstall:
@echo removing executables from $(DESTDIR)$(PREFIX)/bin
@cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN)
@echo removing manual pages from $(DESTDIR)$(MANPREFIX)/man1
@cd $(DESTDIR)$(MANPREFIX)/man1 && rm -f $(MAN)
clean:
@echo cleaning
@rm -f $(BIN) $(OBJ) util.a
.PHONY: all options clean install uninstall

Some files were not shown because too many files have changed in this diff Show More