This commit is contained in:
nyyu 2021-05-19 09:31:28 +02:00
parent 367013a179
commit eee014441d
29 changed files with 546 additions and 10070 deletions

5
.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
**/pkg/
**/src/
*.tar.*
*.zst
*.jar

View file

@ -0,0 +1,20 @@
pkgbase = drone-runner-docker
pkgdesc = Drone is a Continuous Delivery platform built on Docker, written in Go - Free enterprise variant
pkgver = 1.6.3
pkgrel = 1
url = https://drone.io
arch = x86_64
license = Apache
makedepends = go
makedepends = git
makedepends = gcc
depends = docker
backup = etc/drone/agent
source = git+https://github.com/drone-runners/drone-runner-docker.git#tag=v1.6.3
source = drone-agent.service
source = agent.conf
sha256sums = SKIP
sha256sums = dda7f52cb406beeb16024eb077ecfdd4b05929a955f796214646a16db5898ea2
sha256sums = 2c1a13f0d4bf83c1716db1b3179f38da7b9f0e762f781a8a6ab13cc683f057fe
pkgname = drone-runner-docker

View file

@ -0,0 +1,35 @@
# Maintainer: Sl@ny <webmaster [at] slany [dot] work>
pkgname=drone-runner-docker
pkgver=1.6.3
pkgrel=1
pkgdesc="Drone is a Continuous Delivery platform built on Docker, written in Go - Free enterprise variant"
arch=('x86_64')
url="https://drone.io"
license=('Apache')
makedepends=('go' 'git' 'gcc')
depends=('docker')
backup=('etc/drone/agent')
source=(git+https://github.com/drone-runners/$pkgname.git#tag=v$pkgver
'drone-agent.service'
'agent.conf')
sha256sums=('SKIP'
'dda7f52cb406beeb16024eb077ecfdd4b05929a955f796214646a16db5898ea2'
'2c1a13f0d4bf83c1716db1b3179f38da7b9f0e762f781a8a6ab13cc683f057fe')
build() {
cd "$srcdir/$pkgname"
go build -a -v -trimpath -buildmode=pie -mod=readonly -ldflags '-w -s' .
}
package() {
cd "$srcdir"
# binaries
install -Dm755 "$pkgname/$pkgname" "$pkgdir"/usr/bin/drone-agent
# service
install -Dm644 drone-agent.service "$pkgdir/usr/lib/systemd/system/drone-agent.service"
# config
install -Dm644 agent.conf "$pkgdir/etc/drone/agent"
}

View file

@ -0,0 +1,5 @@
# agent configuration
#DRONE_RPC_PROTO=http
#DRONE_RPC_HOST=
#DRONE_RPC_SECRET=""

View file

@ -0,0 +1,20 @@
[Unit]
Description=Drone Continuous Integration platform agent
After=network.target
[Service]
User=drone-agent
Group=docker
Type=simple
EnvironmentFile=/etc/drone/agent
ExecStart=/usr/bin/drone-agent
ExecReload=/usr/bin/kill -HUP $MAINPID
Restart=on-failure
KillSignal=SIGINT
LimitNOFILE=8192
PrivateDevices=yes
DynamicUser=yes
ReadWritePaths=/var/run/docker.sock
[Install]
WantedBy=multi-user.target

19
drone/.SRCINFO Normal file
View file

@ -0,0 +1,19 @@
pkgbase = drone
pkgdesc = Drone is a Continuous Delivery platform built on Docker, written in Go - Free enterprise variant
pkgver = 2.0.0
pkgrel = 1
url = https://drone.io
arch = x86_64
license = Apache
makedepends = go
makedepends = git
makedepends = gcc
backup = etc/drone/server
source = git+https://github.com/drone/drone.git#tag=v2.0.0
source = drone.service
source = server.conf
sha256sums = SKIP
sha256sums = 3cd219b1c5611b9ff4211d4837dff11228d9a491cd41d21f4c60af77c8c21d5c
sha256sums = 2b8957cd6b9f9ee6e8d831f58b0ef3fac2170a56f6259884ec7d30c3ba38c73a
pkgname = drone

37
drone/PKGBUILD Normal file
View file

@ -0,0 +1,37 @@
# Maintainer: Sl@ny <webmaster [at] slany [dot] work>
pkgname=drone
pkgver=2.0.0
pkgrel=1
pkgdesc="Drone is a Continuous Delivery platform built on Docker, written in Go - Free enterprise variant"
arch=('x86_64')
url="https://drone.io"
license=('Apache')
makedepends=('go' 'git' 'gcc')
backup=('etc/drone/server')
source=(git+https://github.com/drone/drone.git#tag=v$pkgver
'drone.service'
'server.conf')
sha256sums=('SKIP'
'3cd219b1c5611b9ff4211d4837dff11228d9a491cd41d21f4c60af77c8c21d5c'
'2b8957cd6b9f9ee6e8d831f58b0ef3fac2170a56f6259884ec7d30c3ba38c73a')
build() {
cd "$srcdir/$pkgname"
go build -a -v -trimpath -buildmode=pie -mod=readonly -tags "nolimit" -ldflags '-w -s' ./cmd/drone-server
}
package() {
cd "$srcdir"
# binaries
install -Dm755 "$pkgname/$pkgname"-server "$pkgdir"/usr/bin/"$pkgname"-server
# license
install -Dm644 "$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# service
install -Dm644 drone.service "$pkgdir/usr/lib/systemd/system/drone.service"
# config
install -Dm644 server.conf "$pkgdir/etc/drone/server"
}

19
drone/drone.service Normal file
View file

@ -0,0 +1,19 @@
[Unit]
Description=Drone Continuous Integration platform server
After=network.target
[Service]
User=drone
Type=simple
EnvironmentFile=/etc/drone/server
ExecStart=/usr/bin/drone-server
ExecReload=/usr/bin/kill -HUP $MAINPID
Restart=on-failure
KillSignal=SIGINT
LimitNOFILE=8192
PrivateDevices=yes
DynamicUser=yes
StateDirectory=drone
[Install]
WantedBy=multi-user.target

26
drone/server.conf Normal file
View file

@ -0,0 +1,26 @@
# drone server configuration
# database configuration
DRONE_DATABASE_DRIVER=sqlite3
DRONE_DATABASE_DATASOURCE=/var/lib/drone/drone.sqlite
# remote configuration
DRONE_GITHUB_CLIENT_ID=""
DRONE_GITHUB_CLIENT_SECRET=""
DRONE_GIT_ALWAYS_AUTH=false
# server
DRONE_SERVER_HOST="drone.exemple.com"
DRONE_SERVER_PROTO="https"
DRONE_SERVER_PORT=:8080
# secret
DRONE_RPC_SECRET=""
# access configuration
DRONE_USER_CREATE=
DRONE_USER_FILTER=
DRONE_REGISTRATION_CLOSED=false
# debug
DRONE_LOGS_DEBUG=false

19
ipset-blacklist/.SRCINFO Normal file
View file

@ -0,0 +1,19 @@
pkgbase = ipset-blacklist
pkgver = r133.ebfe5a5
pkgrel = 1
url = https://github.com/trick77/ipset-blacklist
arch = any
makedepends = git
depends = ipset
depends = iptables
depends = curl
optdepends = iprange: CIDR optimization
backup = etc/ipset-blacklist/ipset-blacklist.conf
source = git+https://github.com/trick77/ipset-blacklist.git
source = ipset-blacklist.service
source = ipset-blacklist.timer
sha256sums = SKIP
sha256sums = a950d286a885b62a52ff16cc5714808825a8519ed874e5427519816876a603ea
sha256sums = ebd5dc1a38b650beaeeb70451c7315be1286ae10b945f5a2baa593502af32609
pkgname = ipset-blacklist

View file

@ -6,6 +6,7 @@ url="https://github.com/trick77/ipset-blacklist"
makedepends=('git')
depends=('ipset' 'iptables' 'curl')
optdepends=('iprange: CIDR optimization')
backup=('etc/ipset-blacklist/ipset-blacklist.conf')
source=(
git+https://github.com/trick77/ipset-blacklist.git
'ipset-blacklist.service'

5
java8/PKGBUILD Normal file
View file

@ -0,0 +1,5 @@
pkgname=java8
pkgver=1
pkgrel=1
arch=('any')
provides=('java-runtime=8' 'java-runtime-openjdk=8')

View file

@ -1,12 +0,0 @@
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/lib/modules/%KERNVER%/*
Target = usr/lib/modules/%EXTRAMODULES%/*
[Action]
Description = Updating %PKGBASE% module dependencies...
When = PostTransaction
Exec = /usr/bin/depmod %KERNVER%

View file

@ -1,11 +0,0 @@
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = boot/vmlinuz-%PKGBASE%
Target = usr/lib/initcpio/*
[Action]
Description = Updating %PKGBASE% initcpios...
When = PostTransaction
Exec = /usr/bin/mkinitcpio -p %PKGBASE%

View file

@ -1,216 +0,0 @@
# $Id$
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Maintainer: Thomas Baechler <thomas@archlinux.org>
pkgbase=linux # Build stock -ARCH kernel
#pkgbase=linux-custom # Build kernel with a different name
_srcname=linux
pkgver=4.17rc6.r158.gbee797529d7c
pkgrel=1
arch=('x86_64')
url="https://www.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'kmod' 'inetutils' 'bc' 'libelf')
options=('!strip')
source=(
git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
config # the main kernel config file
60-linux.hook # pacman hook for depmod
90-linux.hook # pacman hook for initramfs regeneration
linux.preset # standard config files for mkinitcpio ramdisk
)
sha256sums=('SKIP'
'e39c02fd021f125a6202f7e4c0692dfd3ced93d404ecb6c8dca6994c8e17b227'
'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
'75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')
_kernelname=${pkgbase#linux}
: ${_kernelname:=-ARCH}
pkgver() {
cd "${_srcname}"
git describe --long | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g;s/\.rc/rc/'
}
prepare() {
cd ${_srcname}
# add upstream patch
#patch -p1 -i ../patch-${pkgver}
# add latest fixes from stable queue, if needed
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
cat ../config - >.config <<END
CONFIG_LOCALVERSION="${_kernelname}"
CONFIG_LOCALVERSION_AUTO=n
END
# set extraversion to pkgrel and empty localversion
sed -e "/^EXTRAVERSION =/s/=.*/= -${pkgrel}/" \
-e "/^EXTRAVERSION =/aLOCALVERSION =" \
-i Makefile
# don't run depmod on 'make install'. We'll do this ourselves in packaging
sed -i '2iexit 0' scripts/depmod.sh
# old config
make olddefconfig
# get kernel version
make prepare
# load configuration
# Configure the kernel. Replace the line below with one of your choice.
#make menuconfig # CLI menu for configuration
#make nconfig # new CLI menu for configuration
#make xconfig # X-based configuration
#make oldconfig # using old config from previous kernel version
# ... or manually edit .config
# rewrite configuration
yes "" | make config >/dev/null
}
build() {
cd ${_srcname}
make bzImage modules
}
_package() {
pkgdesc="The ${pkgbase/linux/Linux} kernel and modules"
[ "${pkgbase}" = "linux" ] && groups=('base')
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
optdepends=('crda: to set the correct wireless channels of your country')
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
install=linux.install
cd ${_srcname}
# get kernel version
_kernver="$(make kernelrelease)"
_basekernel=${_kernver%%-*}
_basekernel=${_basekernel%.*}
mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
make INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
# make room for external modules
local _extramodules="extramodules-${_basekernel}${_kernelname}"
ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
# add real version for building modules and running depmod from hook
echo "${_kernver}" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version"
# remove build and source links
rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
# now we call depmod...
depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
# add vmlinux
install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux
# sed expression for following substitutions
local _subst="
s|%PKGBASE%|${pkgbase}|g
s|%KERNVER%|${_kernver}|g
s|%EXTRAMODULES%|${_extramodules}|g
"
# hack to allow specifying an initially nonexisting install file
sed "${_subst}" "${startdir}/${install}" > "${startdir}/${install}.pkg"
true && install=${install}.pkg
# install mkinitcpio preset file
sed "${_subst}" ../linux.preset |
install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
# install pacman hooks
sed "${_subst}" ../60-linux.hook |
install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook"
sed "${_subst}" ../90-linux.hook |
install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook"
}
_package-headers() {
pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
cd ${_srcname}
local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
mkdir "${_builddir}/.tmp_versions"
cp -t "${_builddir}" -a include scripts
install -Dt "${_builddir}/arch/x86" -m644 arch/x86/Makefile
install -Dt "${_builddir}/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
cp -t "${_builddir}/arch/x86" -a arch/x86/include
install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
# http://bugs.archlinux.org/task/13146
install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
# http://bugs.archlinux.org/task/20402
install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h
# add xfs and shmem for aufs building
mkdir -p "${_builddir}"/{fs/xfs,mm}
# copy in Kconfig files
find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
# add objtool for external module building and enabled VALIDATION_STACK option
install -Dt "${_builddir}/tools/objtool" tools/objtool/objtool
# remove unneeded architectures
local _arch
for _arch in "${_builddir}"/arch/*/; do
[[ ${_arch} == */x86/ ]] && continue
rm -r "${_arch}"
done
# remove files already in linux-docs package
rm -r "${_builddir}/Documentation"
# remove now broken symlinks
find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete
# Fix permissions
chmod -R u=rwX,go=rX "${_builddir}"
# strip scripts directory
local _binary _strip
while read -rd '' _binary; do
case "$(file -bi "${_binary}")" in
*application/x-sharedlib*) _strip="${STRIP_SHARED}" ;; # Libraries (.so)
*application/x-archive*) _strip="${STRIP_STATIC}" ;; # Libraries (.a)
*application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries
*) continue ;;
esac
/usr/bin/strip ${_strip} "${_binary}"
done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
}
pkgname=("${pkgbase}" "${pkgbase}-headers")
for _p in ${pkgname[@]}; do
eval "package_${_p}() {
$(declare -f "_package${_p#${pkgbase}}")
_package${_p#${pkgbase}}
}"
done
# vim:set ts=8 sts=2 sw=2 et:

File diff suppressed because it is too large Load diff

View file

@ -1,10 +0,0 @@
post_upgrade() {
if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
echo "WARNING: /boot appears to be a separate partition but is not mounted."
fi
}
post_remove() {
rm -f boot/initramfs-%PKGBASE%.img
rm -f boot/initramfs-%PKGBASE%-fallback.img
}

View file

@ -1,14 +0,0 @@
# mkinitcpio preset file for the '%PKGBASE%' package
ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-%PKGBASE%"
PRESETS=('default' 'fallback')
#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-%PKGBASE%.img"
#default_options=""
#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-%PKGBASE%-fallback.img"
fallback_options="-S autodetect"

19
nexus-oss/update.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/sh
ver=`curl -s --head https://download.sonatype.com/nexus/3/latest-unix.tar.gz | grep location | cut -d' ' -f2`
ver=${ver%-unix*}
ver=${ver##*nexus-}
echo $ver
array=(${ver//-/ })
sed -i "s/_version=.*/_version=${array[0]}/" PKGBUILD
sed -i "s/_patch=.*/_patch=${array[1]}/" PKGBUILD
updpkgsums > /dev/null 2>&1
if [ $? -eq 0 ]
then
git add .SRCINFO PKGBUILD
git commit -m "update to $ver" > /dev/null 2>&1
if [ $? -eq 0 ]
then
git push
fi
fi

View file

@ -1,55 +0,0 @@
# $Id$
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>
pkgbase=nvidia
pkgname=(nvidia)
pkgver=396.24
_extramodules=extramodules-4.17-ARCH
pkgrel=99
pkgdesc="NVIDIA drivers for linux"
arch=('x86_64')
url="http://www.nvidia.com/"
makedepends=("nvidia-utils=${pkgver}" 'linux' 'linux-headers>=4.16' 'linux-headers<4.17')
license=('custom')
options=('!strip')
_pkg="NVIDIA-Linux-x86_64-${pkgver}"
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run"
kernel-4.16.patch)
sha256sums=('59bb112b17ca72cd15fed4e521d4b52b0e9f5b8b13a95b36521f8eda978b568e'
'622ac792ec200b2239cb663c0010392118b78c9904973d82cd261165c16d6385')
prepare() {
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
# Restore phys_to_dma support (still needed for 396.18)
# https://bugs.archlinux.org/task/58074
patch -Np1 -i ../kernel-4.16.patch
# Change to GPL license
find . -name '*.c' -type f -print0 | xargs -0 sed -i -E 's/MODULE_LICENSE\("(.*)"\)/MODULE_LICENSE\("GPL"\)/g'
}
build() {
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
cd "${_pkg}"/kernel
make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
}
package_nvidia() {
pkgdesc="NVIDIA drivers for linux"
depends=('linux>=4.16' 'linux<4.17' "nvidia-utils=${pkgver}" 'libgl')
install -Dt "${pkgdir}/usr/lib/modules/${_extramodules}" -m644 \
"${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm,-uvm}.ko
find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
echo "blacklist nouveau" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${srcdir}/${_pkg}/LICENSE"
}

View file

@ -1,33 +0,0 @@
diff --git a/kernel/common/inc/nv-linux.h b/kernel/common/inc/nv-linux.h
index 10fc418..22ef968 100644
--- a/kernel/common/inc/nv-linux.h
+++ b/kernel/common/inc/nv-linux.h
@@ -175,7 +175,11 @@ static inline uid_t __kuid_val(kuid_t uid)
#if defined(NV_VM_INSERT_PAGE_PRESENT)
#include <linux/pagemap.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
#include <linux/dma-mapping.h>
+#else
+#include <linux/dma-direct.h>
+#endif
#endif
#if defined(CONFIG_SWIOTLB) && defined(NVCPU_AARCH64)
diff --git a/kernel/conftest.sh b/kernel/conftest.sh
index b23dbb4..42dc576 100755
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -1906,7 +1906,12 @@ compile_test() {
# Determine if the phys_to_dma function is present.
#
CODE="
+ #include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0)
#include <linux/dma-mapping.h>
+#else
+ #include <linux/dma-direct.h>
+#endif
void conftest_phys_to_dma(void) {
phys_to_dma();
}"

67
pacman/PKGBUILD Normal file
View file

@ -0,0 +1,67 @@
# vim: set ts=2 sw=2 et:
# Maintainer: Dan McGee <dan@archlinux.org>
# Maintainer: Dave Reisner <dreisner@archlinux.org>
pkgname=pacman
pkgver=6.0.0alpha1
pkgrel=1
pkgdesc="A library-based package manager with dependency support"
arch=('x86_64')
url="https://www.archlinux.org/pacman/"
license=('GPL')
groups=('base-devel')
depends=('bash' 'glibc' 'libarchive' 'curl'
'gpgme' 'pacman-mirrorlist' 'archlinux-keyring')
makedepends=('asciidoc' 'meson')
checkdepends=('python' 'fakechroot')
optdepends=('perl-locale-gettext: translation support in makepkg-template')
provides=('libalpm.so')
backup=(etc/pacman.conf
etc/makepkg.conf)
options=('strip' 'debug')
validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae <allan@archlinux.org>
'B8151B117037781095514CA7BBDFFC92306B1121') # Andrew Gregory (pacman) <andrew@archlinux.org>
source=(git+https://git.archlinux.org/pacman.git
pacman.conf
makepkg.conf)
sha256sums=('SKIP'
'2034931c26dff14d625fe4ed4cec9ba61579e6fc43bcd3eeea3591d99a0c08e1'
'9f2c04d2f0ce40d6ae320ef3ccf9e8f108fe3b83989b8f57f91efc539451d95f')
prepare() {
cd pacman
}
build() {
mkdir -p pacman/build
cd pacman/build
meson --prefix=/usr \
--buildtype=plain \
-Ddoc=enabled \
-Duse-git-version=true \
-Dscriptlet-shell=/usr/bin/bash \
-Dldconfig=/usr/bin/ldconfig \
..
ninja
}
check() {
cd pacman/build
ninja test
}
package() {
cd pacman/build
DESTDIR="$pkgdir" ninja install
# install Arch specific stuff
install -dm755 "$pkgdir/etc"
install -m644 "$srcdir/pacman.conf" "$pkgdir/etc"
install -m644 "$srcdir/makepkg.conf" "$pkgdir/etc"
}

149
pacman/makepkg.conf Normal file
View file

@ -0,0 +1,149 @@
#!/hint/bash
#
# /etc/makepkg.conf
#
#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')
# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget
#-- The package required by makepkg to download VCS sources
# Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
'git::git'
'hg::mercurial'
'svn::subversion')
#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"
#-- Compiler and Linker Flags
CFLAGS="-march=znver1 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS \
-Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
#RUSTFLAGS="-C opt-level=2"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j8"
#-- Debugging flags
DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
#DEBUG_RUSTFLAGS="-C debuginfo=2"
#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(!distcc !color !ccache check !sign)
# A negated environment option will do the opposite of the comments below.
#
#-- distcc: Use the Distributed C/C++/ObjC compiler
#-- color: Colorize output messages
#-- ccache: Use ccache to cache compilation
#-- check: Run the check() function if present in the PKGBUILD
#-- sign: Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg
#########################################################################
# GLOBAL PACKAGE OPTIONS
# These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug)
# A negated option will do the opposite of the comments below.
#
#-- strip: Strip symbols from binaries/libraries
#-- docs: Save doc directories specified by DOC_DIRS
#-- libtool: Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs: Leave empty directories in packages
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge: Remove files specified by PURGE_TARGETS
#-- debug: Add debugging flags as specified in DEBUG_* variables
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)
#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(md5)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"
#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"
#-- Specify a key to use for package signing
#GPGKEY=""
#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSZST=(zstd -c -T0 --ultra -20 -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q)
COMPRESSLZ=(lzip -c -f)
#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'

100
pacman/pacman.conf Normal file
View file

@ -0,0 +1,100 @@
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
Color
TotalDownload
CheckSpace
VerbosePkgLists
ParallelDownloads = 5
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
#[testing]
#Include = /etc/pacman.d/mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
#[community-testing]
#Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.
#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist
#[multilib]
#Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

View file

@ -1,72 +0,0 @@
# Submitter: Atsushi Ichiki <hitotuky at gmail dot com>
# Maintainer: Max Falk <gmdfalk at gmail dot com>
_pkgname=sonarqube
pkgname=${_pkgname}
pkgver=6.7.1
pkgrel=1
pkgdesc="An open source platform for continuous inspection of code quality"
arch=("i686" "x86_64")
url="http://www.sonarqube.org/"
license=('LGPL3')
depends=('java-runtime>=8')
optdepends=('apache: a fully featured webserver'
'mariadb: Fast SQL database server, drop-in replacement for MySQL'
'maven: a java project management and project comprehension tool'
'postgresql: A sophisticated object-relational DBMS')
backup=("etc/${_pkgname}/sonar.properties"
"etc/${_pkgname}/wrapper.conf")
conflicts=("${_pkgname}-lts")
provides=("${_pkgname}")
options=('!strip')
install=${pkgname}.install
source=("https://sonarsource.bintray.com/Distribution/${_pkgname}/${_pkgname}-${pkgver}.zip"
"${_pkgname}.service"
"${_pkgname}-tmpfile.conf"
"${_pkgname}-user.conf")
sha256sums=('74cc70ef75d83fa260c7be86863416f45e092f77a2582ab51529d84f9a696fc7'
'acf98543b635778a690c5d1a8796bf67de725eeda1c72856bd63ea148a892223'
'6e024de469ebb1bc4083274412f0a5d68d5fa511c2139ce4cb1d243c51ff9535'
'43ff10bbb495827e952225dce79da79bb800627eaa6f1d933f8f7fb408aafe6d')
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
# Copy everything except bin and conf to /usr/share/sonarqube.
install -dm755 "${pkgdir}/usr/share/${_pkgname}"
cp -dr --no-preserve=ownership {bin,data,extensions,lib,temp,web,elasticsearch} "${pkgdir}/usr/share/${_pkgname}/"
# Install the license.
install -Dm644 "COPYING" "${pkgdir}/usr/share/doc/${_pkgname}/COPYING"
# Install the configuration files to /etc/sonarqube.
install -Dm644 "conf/sonar.properties" "${pkgdir}/etc/${_pkgname}/sonar.properties"
install -Dm644 "conf/wrapper.conf" "${pkgdir}/etc/${_pkgname}/wrapper.conf"
# Install the systemd configuration and service files.
cd "${srcdir}"
install -Dm644 "${_pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service"
install -Dm644 "${_pkgname}-user.conf" "${pkgdir}/usr/lib/sysusers.d/${_pkgname}.conf"
install -Dm644 "${_pkgname}-tmpfile.conf" "${pkgdir}/usr/lib/tmpfiles.d/${_pkgname}.conf"
# Symbolic links because SonarQube expects a specific directory layout.
ln -s "/var/log/${_pkgname}" "${pkgdir}/usr/share/${_pkgname}/logs"
ln -s "/run/${_pkgname}" "${pkgdir}/usr/share/${_pkgname}/run"
ln -s "/etc/${_pkgname}" "${pkgdir}/usr/share/${_pkgname}/conf"
# Modify the service file in place to adjust the binary path to the CPU architecture. This is necessary because
# SonarQube expects a certain directory layout. The alternative would be to patch SonarQube's config files which is messy.
if [[ "$CARCH" == 'x86_64' ]]; then
sed -i 's/\$ARCH/linux-x86-64/g' "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service"
elif [[ "$CARCH" == 'i686' ]]; then
sed -i 's/\$ARCH/linux-x86-32/g' "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service"
fi
}

View file

@ -1,4 +0,0 @@
d /run/sonarqube 0755 sonarqube sonarqube -
f /run/sonarqube/SonarQube.pid 0644 sonarqube sonarqube -
d /var/log/sonarqube 0755 sonarqube sonarqube -
d /etc/sonarqube 0755 sonarqube sonarqube -

View file

@ -1 +0,0 @@
u sonarqube - "SonarQube user"

View file

@ -1,22 +0,0 @@
#!/usr/bin/env sh
# vim:set ts=4 sw=4 et:
username="sonarqube"
post_install() {
systemd-sysusers "${username}.conf"
systemd-tmpfiles --create "${username}.conf"
chown -R "$username:$username" /etc/$username /run/$username /usr/share/$username /var/log/$username
}
post_upgrade(){
getent passwd "${username}" >/dev/null 2>&1 || systemd-sysusers "${username}.conf"
systemd-tmpfiles --create sonarqube.conf
if [ "$(vercmp $2 5.6)" -lt 0 ]; then
echo " >> "
echo " >> Major version update from 5.2 to 5.6. Please take a look at http://www.sonarqube.org/downloads/ for more information."
echo " >> "
fi
}

View file

@ -1,20 +0,0 @@
[Unit]
Description=An open source platform for continuous inspection of code quality
Documentation=http://www.sonarqube.org
Wants=network.target
After=network.target
[Service]
Type=forking
User=sonarqube
Group=sonarqube
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=sonarqube
RuntimeDirectory=sonarqube
ExecStart=/usr/share/sonarqube/bin/$ARCH/sonar.sh start
ExecStop=/usr/share/sonarqube/bin/$ARCH/sonar.sh stop
[Install]
WantedBy=multi-user.target