nyuuzyou/wikis huggingface dataset:
Upgrading Qt

When Qt gets upgraded between major versions, we have to rebuild some packages due to ABI changes and private API usages. The following is a list of packages to bump on every major (e.g. 5.12.x to 5.14.x) upgrade:
* py3-qt5
* qt5-qtwebkit # is not part of the regular Qt releases
* kio-extras
* kdeclarative
* kwayland
* kwayland-integration
* kwayland-server
* plasma-framework
* breeze
* plasma-integration
* qqc2-desktop-style
* kwin
* kaidan # compiles it's QML files
Upgrading from older versions

=== Upgrading Alpine ≤v3.19 to v3.20.0===
When upgrading existing installations using grub, make sure to update the installed bootloader before rebooting, otherwise your machine might not boot. 
For more information on this issue, please check the release notes
=== Upgrading Alpine v2.x to v3.x ===
==== Installing statically linked tools ====
Statically linked version of apk-tools is needed, because the old musl version would stop working after a libc change (possibly in the middle of upgrade). Static version of busybox can be handy in case of the recovery from a failure.
==== Changing repositories to v3.x ====
To begin, you need to update your file. Here are some shortcuts for doing so:
:* Launch Enter to edit . Change the version number by hand.
:* Or, edit the file in place. This is how you'd change v2.7 to v3.0: 
==== Upgrading system ====
Use statically linked version of apk to update content of repository:
Simulating upgrade is recommended in order to detect issues beforehand:
With no problems encountered or after resolving them, start proper upgrade:
=== Upgrading from 2.0 or 1.10.x to Alpine Linux 2.2 and later ===
Since the apk tool has been significantly changed you need to download and install manually the latest version of . We also install just in case something goes wrong.
If current version is 1.10.x remove GNU Wget before attempting an upgrade:
Download and install it:
Download and install it:
Change repositories:
Proceed with update and upgrade:
The --available switch is used to force all packages to be upgraded, even if they have the same version number, due to changes in uClibc.
Reboot the system to load new kernel
Category:Installation
Category:Package Manager
Using Alpine on Windows domain with IPSEC isolation

Category:Networking
Based off Microsoft's document.
=== Requirements ===
# IPSEC uses certificates to authenticate computers to each other. You'll need to have a cert or PSK (pre-shared key) from the Domain Admin before proceeding. This document outlines the way to do it with a certificate. PSK is just a few changes in the configuration.
# Computer to run Alpine on
# a couple of NICs - if you plan on making this the gateway talk to the domain
== Step by Step ==
# Install the newest version of Alpine. 
# Configure it: Remember to keep one interface to be masq and the other on the domain network. 192.168.1.0/24 will be masq and 10.1.1.0/24 will be the domain
# #setup-alpine
# Install the following packages: ipsec-tools-cvs, openssl, iptables
# Extract the certificate in parts. The cert given to you by the domain admin most likely will be a pfx file.
 Extract the CA
 * #openssl pkcs12 -in PFXFILE -cacerts -nokeys -out DOMAIN-ca.pem 
 Extract the Key part of your cert
 * #openssl pkcs12 -in PFXFILE -nocerts -nodes -out MY-key.pem
 Extract the Pub cert file
 * #openssl pkcs12 -in PFXFILE -nokeys -clcerts -out MY-cert.pem
 If your admin gives you a p7b file, this most likely contains the CA chain. You have to convert it to pem file format and use it as DOMAIN-ca.pem
 * #openssl pkcs7 -inform DER -outform PEM -in CA_CHAIN -print_certs -text -out DOMAIN-ca.pem
# Put these certs in /etc/racoon/
# This is for Authentication headers in Domain isolation. Below the policy file is just to use port 3389 on a machine. Format is 
 policy src_net/mask[port] dst_net/mask[port] protocol policy and implementation of policy
The command below will do AH for an rdesktop connection(terminal server)
 * #vi /etc/ipsec.conf
 spdflush;
 spdadd 0.0.0.0/0 10.1.1.2/32[3389] tcp -P out ipsec ah/transport//use;
 spdadd 10.1.1.2/32[3389] 0.0.0.0/0 tcp -P in ipsec ah/transport//use;
 * #vi /etc/racoon/racoon.conf
 
path certificate "/etc/racoon/";
remote anonymous {
	exchange_mode main;
	certificate_type x509 "MY_cert.pem" "MY_key.pem";
	ca_type x509 "DOMAIN-ca.pem";
 #nat_traversal on; #this may not need to be used even if you are doing a router :). Have to research this.
	proposal {
		authentication_method rsasig;
		encryption_algorithm 3des;
		hash_algorithm sha1;
		dh_group 14 ;	
		}
	}
sainfo anonymous {
	encryption_algorithm 3des;
	authentication_algorithm hmac_sha1;
	compression_algorithm deflate;
}
 * rc-service racoon start
 * Get the masq working correctly
 * #iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
Using Unbound as an Ad-blocker

== Basic Components ==
You should have (or another DHCP server) and unbound both working on your network. 
== Setting up Unbound To Block/Refuse unwanted addresses ==
There are a number of freely available blacklists on the net. The installer mentioned above uses these lists by default:
*https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
*https://sysctl.org/cameleon/hosts
*https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
*https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
Alternatively, there is a set of curated lists at https://github.com/StevenBlack/hosts. There are various categories of lists there. The format of the file is a "host" (so you can put it in and be done). We will use the hosts file format:
unbound needs to include the blacklists.conf file into its main configuration. To do so, we need to create the include file in the following format:
Here is an example shell script to download the
StevenBlack
hosts file, and then format it for unbound:
#!/bin/sh
echo "server:" >/etc/unbound/blacklist.conf
curl -s https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | \
 grep ^0.0.0.0 - | \
 sed 's/ #.*$//;
 s/^0.0.0.0 \(.*\)/local-zone: "\1" refuse/' \
 >>/etc/unbound/blacklist.conf
You can run this once, or as part of a periodic cron task.
In the , add the following line somewhere in the config:
Reload unbound, and verify the config loads.
== Dnsmasq configuration ==
Dnsmasq defaults to using the resolver in — if unbound is listening on 127.0.0.1, then have it use that as the resolver.
Alternatively, if unbound is running on another interface, or on a separate machine — use the dhcp-option configuration in dnsmasq:
dhcp-option=6,[ip-of-unbound-server]
Enjoy Ad-Free browsing!
Category:Networking
Using espeak on Alpine Linux

= Espeak =
espeak multi-lingual speech synthesis is available in Alpine Linux 1.7.29 and above. 
== Installing ==
espeak can be installed by running:
== Example ==
For historical reasons, the canonical reference for speech synthesis on Alpine Linux is the phrase "Liver. Yes you heard me. Liver. There's nothing I can do about it."
To get your Alpine Linux machine to say that, you can run the following espeak command:
enjoy.
Category:Multimedia
Using serial modem

Category:Networking
== Requirements ==
Install alpine-2.1.3 or newer (see these notes if you are unsure how to do it).
Decide which serial port to use and connect your modem to it.<BR>
In the example below, replace ttyS0 with ttySX where X matches your com port number.<BR>
(/dev/ttyS0 is the same as COM1, ttyS1=COM2, ttyS2=COM3, ttyS3=COM4, ...)
== Install packages ==
Install required packages
== Load modules ==
Load the required modules and make sure they're automatically loaded at next reboot
== Config files ==
=== /etc/ppp/peers/serialmodem ===
(The filename 'serialmodem' can be changed, but you will need to remember it when running pon/poff command)
debug
/dev/ttyS0
115200
modem
crtscts
asyncmap 0
defaultroute
lock
noauth
user '{login_id}'
connect '/usr/sbin/chat -v -f /etc/ppp/chat-serialmodem'
=== /etc/ppp/chat-serialmodem ===
(The filename 'chat-serialmodem' can be changed, but you will need modify the config file shown above to reflect your choice)
ABORT 'BUSY'
ABORT 'ERROR'
ABORT 'NO ANSWER'
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT 'Invalid Login'
ABORT 'Login incorrect'
REPORT 'CONNECT'
TIMEOUT '60'
 'ATZ'
OK 'ATDT{phonenumber}'
CONNECT '\d\c'
Username: '{login_id}'
Password: '{your_password}'
=== /etc/ppp/pap-secrets ===
If your pppd log reports something like this:
 daemon.debug pppd[5665]: rcvd [LCP ConfReq id=0xf6 <asyncmap 0xa0000> <auth pap> <magic 0xa239b2b1> <pcomp> <accomp>]
(Note the "<auth pap>" section)<BR>
you might need to use a pap-secrets file (or chap-secrets depending on what pppd reports in the logs).<BR>
Your file might look something like this:
# client server secret IP addresses
{login_id} * {your_password} *
If you are using 'pap-secrets' (or 'chap-secrets') you should most likely comment out the 'Username:' and 'Password:' lines in your '/etc/ppp/chat-serialmodem' config.
== Note for above example configs ==
References:
* http://axion.physics.ubc.ca/ppp-linux.html
* http://www.yolinux.com/TUTORIALS/LinuxTutorialPPP.html
* https://tldp.org/HOWTO/PPP-HOWTO/options.html
= Start/Stop=
== Start connection ==
== Stop connection ==
= If something goes wrong... =
Check if process is running
Logfile might give you a clue on what went wrong
Check nic information
pppd has a statusinformation function that could come in handy
Uvesafb

uvesafb is a generic framebuffer driver.
== Step-by-step instructions ==
* install packet v86d: 
* create file with next content:
 
* edit and add 'kms' and 'v86d' to features list
* copy to and point needed resolution
* regenerate initrd: 
* edit and add module uvesafb to modules list
* regenerate boot loader config: or (actual command depends on the bootloader which you are using}}
== Links ==
* Uvesafb - Arch Wiki
Category:Drivers
Category:Graphics
VLAN

This article shows how to configure a network interface as an IEEE 802.1q VLAN trunk.
__TOC__
==Installation==
First, install the vlan package. This will give you support for VLANs in the file.
==Configuration==
Edit the file:
auto eth0.8
iface eth0.8 inet static
	address 192.168.0.2
	netmask 255.255.255.0
	gateway 192.168.0.1
	vlan-raw-device eth0
	vlan_id 8
With the vlan package installed, will find the trailing .8 in eth0.8 and will create a VLAN interface with vid 8 over eth0.
Alternatively with vlan8 over eth0:
auto vlan8
iface vlan8 inet static
	address 192.168.0.2
	netmask 255.255.255.0
	gateway 192.168.0.1
	vlan-raw-device eth0
A static IP address was used in the examples shown above, but DHCP can be used as well.
== Example with bridges associated with VLANs over bonding with differing MTUs on the various VLANs ==
This serves as an example of some of the more complicated networking possible. Particularly, this would work well for a hypervisor attached to a dedicated storage VLAN. Less complicated implementations can be achieved by merely removing the non-applicable parts.
auto lo
iface lo inet loopback
auto bond0
 iface bond0 inet manual
 bond_slaves eth0 eth1
 bond_mode 802.3ad
 bond_miimon 100
 bond_xmit_hash_policy layer2+3
 post-up ip link set dev bondi0 mtu 9000
iface bond0.1
auto br1
iface br1
 address 192.168.1.196/24
 gateway 192.168.1.1
 bridge_ports bond0.1
 bridge_stp off
 bridge_fd 0.0
 post-up ip link set dev bond0.1 mtu 1500
iface bond0.10 inet manual
auto br10
 iface br10 inet static
 address 192.168.10.1/24
 bridge_ports bond0.10
 bridge_stp off
 bridge_fd 0.0
== Example with two interfaces on the same adapter. One with VLAN and one without ==
Since Linux doesn't allow multiple default gateways we need to use a second routing table using iproute2
Then we'll add two new routing tables to the config file. One for each network
Now we need to edit 
auto lo
iface lo inet loopback
# the native interface without a VLAN (also called untagged)
auto eth0
iface eth0
 address 192.168.1.100/24
 gateway 192.168.1.1
 post-up ip route add 192.168.1.0/24 dev eth0 src 192.168.1.100 table rt1
 post-up ip route add default via 192.168.1.1 dev eth0 table rt1 # the actual gateway for this interface
 post-up ip rule add from 192.168.1.100/32 table rt1
 post-up ip rule add to 192.168.1.100/32 table rt1
# second interface with the vlan tag 5
auto eth0.5
iface eth0.5
 address 192.168.5.100/24
 post-up ip route add 192.168.5.0/24 dev eth0.5 src 192.168.5.100 table rt2
 post-up ip route add default via 192.168.5.1 dev eth0.5 table rt2 # the actual gateway for this interface
 post-up ip rule add from 192.168.5.100/32 table rt2
 post-up ip rule add to 192.168.5.100/32 table rt2
Note that if you want to add a third interface this way, you'll have to add another routing table
Category:Networking
VRF

VRF or Virtual Routing and Forwarding (or perhaps Virtual Routing Functions) provide virtualization of the routing table. They are useful for isolating services and entire networks from each other while avoiding the complexity of network namespaces.
== Prerequisites ==
To make use of VRFs, you will need `iproute2` and a kernel that is capable of using eBPF installed. Kernel 5.4.19-r1 and later are capable of using eBPF.
== VRF creation ==
The easiest way to define VRFs is to add them to /etc/network/interfaces:
auto vrf-mgmt
iface vrf-mgmt inet manual
 pre-up ip link add $IFACE type vrf table 42
 up ip link set dev $IFACE up
You can then associate specific interfaces with VRFs using pre-up commands:
auto eth0
iface eth0 inet static
 address 1.2.3.4
 netmask 255.255.255.0
 pre-up ip link set $IFACE master vrf-mgmt
 up ip route add default table 42 via 1.2.3.1
== VRF-based Service Isolation ==
Services can be isolated to specific VRFs when running OpenRC 0.42.1-r4 or newer. You can set the $vrf variable in an /etc/conf.d file for a service to isolate it in most cases.
For example, with sshd:
# echo 'vrf="vrf-mgmt"' >> /etc/conf.d/sshd
# rc-service sshd restart
== Name route tables ==
Routing tables can be named i.e. 42 can be named mgmt be editing /etc/iproute2/rt_tables or creating and separate config (e.g. /etc/iproute2/rt_tables.d/vrf.conf)
Example vrf.conf
42 mgmt
43 int
44 ext
Then instead of having to remember that 42 is is used for mgmt it can be used directly with ip route, example
# ip route add default table mgmt via 1.2.3.1
== Running network clients in a specific VRF ==
For ping is a simple as specifying a local interface that is already bound to a specific vrf
Example
# ping -I eth0 <ip to ping>
For other process like apk we use the ip vrf command
# ip vrf exec vrf-mgmt apk update
Category:Networking
Validator.lua

=== is_ipv4 (function) ===
INPUT:<BR>
This library function required the following inputs/parameters.
* String in form of ip address
** Example: 192.168.24.10
OUTPUT:<BR>
This library function deliverers the following output/parameters.
* false or "true"
CODING EXAMPLE:
 -- Include/Call for this library
 require("validator")
 -- Check if url is a folder
 liboutput = validator.is_ip("192.168.24.10")
If the string is a valid ip 'liboutput' would contain string:
 true
If the string is missing or an invalid ip 'liboutput' would contain false.
===is_mac (function) ===
INPUT:<BR>
This library function required the following inputs/parameters.
* String in form of mac address
** Example: 00:ca:ba:de:00:12
OUTPUT:<BR>
This library function deliverers the following output/parameters.
* false or "true"
CODING EXAMPLE:
 -- Include/Call for this library
 require("validator")
 -- Check if url is a folder
 liboutput = validator.is_mac("00:ca:ba:de:00:12")
If the string is a valid mac address 'liboutput' would contain string:
 true
If the string is missing or an invalid ip 'liboutput' would contain false.
===is_integer(function)===
INPUT:<BR>
This library function required the following inputs/parameters.
* Number
** Example: 100
OUTPUT:<BR>
This library function deliverers the following output/parameters.
* false or "true"
CODING EXAMPLE:
 -- Include/Call for this library
 require("validator")
 -- Check if url is a folder
 liboutput = validator.is_integer("100")
If the string is a valid ip 'liboutput' would contain string:
 true
If the string is missing or an invalid ip 'liboutput' would contain false.
===is_integer_in_range (function)===
INPUT:<BR>
This library function required the following inputs/parameters.
* 3 numbers --- number to test, min, max
** Example: (10,5,12)
OUTPUT:<BR>
This library function deliverers the following output/parameters.
* false or "true"
CODING EXAMPLE:
 -- Include/Call for this library
 require("validator")
 -- Check if url is a folder
 liboutput = validator.is_integer_in_range(10,5,15)
If the string is a valid ip 'liboutput' would contain string:
 true
If the string is missing or an invalid ip 'liboutput' would contain false.
===is_port (function)===
INPUT:<BR>
This library function required the following inputs/parameters.
* Number - is it between 1 and 65535
** Example: 45
OUTPUT:<BR>
This library function deliverers the following output/parameters.
* false or "true"
CODING EXAMPLE:
 -- Include/Call for this library
 require("validator")
 -- Check if url is a folder
 liboutput = validator.is_port("45")
If the string is a valid ip 'liboutput' would contain string:
 true
If the string is missing or an invalid ip 'liboutput' would contain false.
Category:Lua
VirtualBox guest additions

VirtualBox Guest Additions provide kernel modules for VirtualBox virtualized hardware and userspace daemons for features like shared clipboard and automatic resolution setting.
== Installation ==
Install . Additionally, install if you are going to use graphical environment (including wayland) in your Alpine guest.
== Enabling VirtualBox Guest Additions ==
Start and enable virtualbox-guest-additions service:
If you are using graphical environment, also start and enable virtualbox-drm-client service:
Category:Virtualization
VirtualBox shared folders

== 3.11 and newer ==
Enable the Community repo in /etc/apk/repositories then:
Create a mount point and install libraries
Then mount the folder
vbox_shared is the 'Folder Name' you decided in the virtualbox gui
== 3.8 - 3.10 ==
As of 3.8 release, simply enable the Community repo in /etc/apk/repositories then run:
 
Reboot system
=== Permanent shares ===
To set up a permanent share, enable vboxsf module and mount at startup.
Change vbox_shared to your foldername in Virtualbox dialog, maybe adjust the path /mnt/outside twice to your needs.
Reboot system
== 3.7 and previous ==
Install and virtualbox-guest-modules-virthardened at first:
The following error may occur:
If the error occurs, make sure your alpine version is greater than v3.6 and alpine community repo is enabled:
Update respository indexes from all remote repositories, then install guest modules and reboot:
Goto Device > Shared Folders > Shared Folder Settings ... add a directory mapping like this:
Mount it to alpine:
which vbox_shared is your folder name and /mnt/outside is the mounting point.
After this step the following error may occur:
If the error occurs, run command below:
And you will see /tmp/vbox_shared and /mnt/outside are connected.
P.S. Alpine will raise error "Invalid argument" if virtualbox-guest-additions is not installed when mounting drive.
VirtualBox will raise error "Guest Additions unavailable" if virtualbox-guest-modules-virthardened is not installed when adding shared path.
Category:Virtualization
Virtual Reality

The testing branch contains packages to make use of Virtual Reality on Alpine Linux so make sure that is enabled.
How to Enable the Testing Repository
== Initial Setup ==
You will need an OpenXR runtime to run any applications on VR.
Monado itself includes some required drivers, and it'll also pull in OpenHMD and libsurvive which provide drivers for the HMD and positional tracking respectively.
== Running ==
Any application that requires VR should automatically pick up your HMD.
You can use xrdesktop to interact with your desktop windows in VR if you're running KDE Plasma. Support for GNOME is in the works but as of now requires patches on top of GNOME which aren't packaged on Alpine.
Make sure to enable xrdesktop in the settings, Workspace -> Workspace Behaviour -> Desktop Effects -> xrdesktop.
Optionally you can install a Plasma applet to easily toggle VR mode.
Category:Multimedia
Virus action.sh

#!/bin/sh
## Send the user usefull info in the notification email
FROM="`awk '/^[Ff][Rr][Oo][Mm]:/' $EMAIL`"
SUBJECT="`awk '/[Ss][Uu][Bb][Jj][Ee][Cc][Tt]:/' $EMAIL`"
## Logfile to log status to
LOGFILE="/tmp/virus_action.log"
## From email address where the notification email comes from
MAILFROM=""
## Email address to send a copy of the virus/spam email to
QUARANTAINE=""
exec 1>>"$LOGFILE"
exec 2>>"$LOGFILE"
notify_user() {
 echo "HELO `hostname -f`"
 echo "MAIL FROM:<$MAILFROM>"
 for RCPT in "$RECIPIENTS"; do
 echo "RCPT TO:<$RCPT>"
 done
 echo "RCPT TO:<$RECIPIENTS>"
 echo "DATA"
 sleep 1
 echo "Subject: Mail system notification"
 echo "Dear user,"
 echo ""
 echo "A virus or spam email has been found by the mail system."
 echo "We have gathered the following information for you:"
 echo ""
 echo "Date: `date`"
 echo "$FROM"
 echo "$SUBJECT"
 echo "Virus/spam name: $VIRUS"
 echo ""
 echo "If you think this is incorrect, please notify your administrator at once."
 echo ""
 echo "Best regards,"
 echo ""
 echo "Your mail administrator"
 echo "."
 echo "quit"
}
send_virus() {
 echo "HELO `hostname -f`"
 echo "MAIL FROM:<$MAILFROM>"
 echo "RCPT TO:<$QUARANTAINE>"
 echo "DATA"
 sleep 1
 cat "$EMAIL"
 echo "."
 echo "quit"
}
notify_user | nc localhost 10026
send_virus | nc localhost 10026
rm "$EMAIL"
Category:Mail
Vpnc

vpnc is a VPN client for Cisco hardware VPNs.
== Installation ==
vpnc is in the repositories and can be installed with the vpnc package.
== Configuration ==
vpnc can be configured either on the command line or through its configuration file. The configuration files are stored in /etc/vpnc, with a template at /etc/vpnc/default.conf.
Copy the template file to /etc/vpnc/vpnc.conf and edit it to your preferences. A sensible configuration might look like:
IPSec gateway <gateway>
IPSec ID <group-id>
IPSec secret <group-psk>
IKE Authmode <authmode>
Xauth username <username>
Xauth password <password>
Domain <domain>
Debugging can be enabled at different levels by appending Debug x for some debug level x of 0 (default, does not print), 1 (minimal), 2 (verbose), 3 (everything except authentication data), or 99 (everything including authentication data).
You can run the VPN with
# vpnc /etc/vpnc/vpnc.conf
and test that it's working with
# ip a
You should see a new tunnel device (e.g. tun0).
You can now enable the service, and start it at boot if you require:
# killall vpnc
# rc-service vpnc start
# rc-update add vpnc boot
== NetworkManager ==
There exists a NetworkManager vpnc plugin. Future work will consider packaging this tool for the repositories and continuing this guide to document the process.
Category:VPN