add shrimpnet patch
This commit is contained in:
parent
2db9a62a77
commit
798b2bdc7e
8 changed files with 202 additions and 0 deletions
|
@ -1,5 +1,9 @@
|
|||
pkgname=iceshrimp.net-akkoma-fe-git
|
||||
<<<<<<< HEAD
|
||||
pkgver=3.10.0.fe1a3255
|
||||
=======
|
||||
pkgver=3.10.0.a9bdf9c2
|
||||
>>>>>>> b8f8580 (add shrimpnet patch)
|
||||
pkgrel=1
|
||||
license=(AGPL)
|
||||
arch=(any)
|
||||
|
|
96
pkgbuilds/iceshrimp.net-qol-git/PKGBUILD
Normal file
96
pkgbuilds/iceshrimp.net-qol-git/PKGBUILD
Normal file
|
@ -0,0 +1,96 @@
|
|||
# Maintainer: zotan <aur@zotan.email>
|
||||
|
||||
pkgname=iceshrimp.net-qol-git
|
||||
pkgver=2024.1.beta4.r98.gdd7b7634
|
||||
pkgrel=2
|
||||
pkgdesc="Decentralized and federated social networking service, implementing the ActivityPub standard"
|
||||
arch=(x86_64 aarch64)
|
||||
url="https://iceshrimp.dev/iceshrimp/iceshrimp.net"
|
||||
license=(EUPL)
|
||||
|
||||
makedepends=('dotnet-sdk>=9.0' 'aspnet-targeting-pack>=9.0' 'aspnet-targeting-pack<10.0')
|
||||
depends=('aspnet-runtime>=9.0' 'aspnet-runtime<10.0')
|
||||
optdepends=(
|
||||
"ffmpeg: for video transcoding"
|
||||
)
|
||||
|
||||
conflicts=(iceshrimp.net)
|
||||
provides=(iceshrimp.net)
|
||||
|
||||
backup=("etc/iceshrimp.net/configuration.ini")
|
||||
|
||||
install="iceshrimp.net.install"
|
||||
|
||||
source=(
|
||||
"iceshrimp.net::git+https://iceshrimp.dev/iceshrimp/iceshrimp.net.git#branch=dev"
|
||||
"iceshrimp.net.service"
|
||||
"iceshrimp.net.sysusers"
|
||||
"iceshrimp.net.tmpfiles"
|
||||
"iceshrimp.net.install"
|
||||
"iceshrimp.net.hook"
|
||||
"iceshrimp.net-uncap-polls.patch"
|
||||
)
|
||||
|
||||
sha512sums=('SKIP'
|
||||
'cfb7adf7e9f0d9d05ab89b2237ddf1ef4135ed9dde463e96c7cd94e03e497a85c77a795ac20c09214a2364e675c88e65ac119f6de82a08f5c2d64d657c4b3fc0'
|
||||
'9adf1781842ae7ff2779ca561f06ab2b6fb93e206698084283986627aba69b0fd4482ccbed3daebb2517e5966c326604e1cc57618589f331a966fee2db63815d'
|
||||
'0665aa7af2b2aa4405289ce9119439ddcc6b9e6c81dc8e3b9ed5d8ecdc4a39d49c950d41d3098ce99fe294ce51a2dee55ec7248c1756783b0e9aad0bde4654fa'
|
||||
'0a0467df278f3bd739114725b373f5ec6c7296f609f0a9bcb4f8142b44856fc63e32f76390adf757005035dc691a4c54a662cc8a287572b61e215c29e3d3cbf2'
|
||||
'085d94b31e8eb3109b18251381766799d45c351ec6c7ec45d6edad1915ed89fa9b32765f6deaec191a501274b791000e75ecd052af46bf5341af619b1c7a9bf7'
|
||||
'57dbdb3e73ea273c78c19befaf3d8e1f7dc079630d69eed1ffaf05636969d69e3b5f541d3c915b19edf6eb66398cbdd4b6a57e38f3e8088a259b8bd47f9b4ff7')
|
||||
|
||||
pkgver() {
|
||||
cd "${srcdir}/iceshrimp.net"
|
||||
git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/^v//g;s/^([[:digit:]]+\.[[:digit:]]+)\.r/\1.0.r/g;s/-/./g'
|
||||
}
|
||||
|
||||
rid() {
|
||||
if [[ $CARCH == "x86_64" ]]; then
|
||||
echo -n "linux-x64"
|
||||
else
|
||||
echo -n "linux-arm64"
|
||||
fi
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/iceshrimp.net"
|
||||
git apply ../iceshrimp.net-uncap-polls.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/iceshrimp.net/Iceshrimp.Backend"
|
||||
|
||||
if [[ -n $DISABLE_VIPS ]]; then
|
||||
VIPS=false
|
||||
else
|
||||
VIPS=true
|
||||
fi
|
||||
|
||||
if [[ -n $DISABLE_AOT ]] || ! dotnet workload list | grep -q '^wasm-tools\s'; then
|
||||
dotnet publish -c Release -r $(rid) -p:EnableLibVips=$VIPS -p:DeterministicSourcePaths=true -p:ContinuousIntegrationBuild=true
|
||||
else
|
||||
dotnet publish -c Release -r $(rid) -p:EnableAOT=true -p:EnableLibVips=$VIPS -p:DeterministicSourcePaths=true -p:ContinuousIntegrationBuild=true
|
||||
fi
|
||||
}
|
||||
|
||||
package() {
|
||||
# Add runtime-only dependencies
|
||||
depends+=(postgresql)
|
||||
|
||||
if [[ -n $DISABLE_VIPS ]]; then
|
||||
# Add runtime-only dependencies for libvips image processing
|
||||
depends+=(libvips openjpeg2)
|
||||
fi
|
||||
|
||||
install -dm 755 "${pkgdir}/usr/share/iceshrimp.net"
|
||||
install -dm 755 "${pkgdir}/etc/iceshrimp.net"
|
||||
|
||||
install -Dm 644 "${srcdir}/iceshrimp.net/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
install -Dm 644 "${srcdir}/iceshrimp.net.service" "${pkgdir}/usr/lib/systemd/system/iceshrimp.net.service"
|
||||
install -Dm 644 "${srcdir}/iceshrimp.net.sysusers" "${pkgdir}/usr/lib/sysusers.d/iceshrimp.net.conf"
|
||||
install -Dm 644 "${srcdir}/iceshrimp.net.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/iceshrimp.net.conf"
|
||||
install -Dm 644 "${srcdir}/iceshrimp.net.hook" "${pkgdir}/usr/share/libalpm/hooks/iceshrimp.net.hook"
|
||||
install -Dm 640 "${srcdir}/iceshrimp.net/Iceshrimp.Backend/configuration.ini" "${pkgdir}/etc/iceshrimp.net/configuration.ini"
|
||||
|
||||
cp -dpTr --no-preserve=ownership "${srcdir}/iceshrimp.net/Iceshrimp.Backend/bin/Release/net9.0/$(rid)/publish/" "${pkgdir}/usr/share/iceshrimp.net"
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
diff --git a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASQuestion.cs b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASQuestion.cs
|
||||
index 68559c4c..241fb012 100644
|
||||
--- a/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASQuestion.cs
|
||||
+++ b/Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASQuestion.cs
|
||||
@@ -15,14 +15,14 @@ public class ASQuestion : ASNote
|
||||
public List<ASQuestionOption>? OneOf
|
||||
{
|
||||
get => _oneOf;
|
||||
- set => _oneOf = value?[..Math.Min(10, value.Count)];
|
||||
+ set => _oneOf = value?[..value.Count];
|
||||
}
|
||||
|
||||
[J($"{Constants.ActivityStreamsNs}#anyOf")]
|
||||
public List<ASQuestionOption>? AnyOf
|
||||
{
|
||||
get => _anyOf;
|
||||
- set => _anyOf = value?[..Math.Min(10, value.Count)];
|
||||
+ set => _anyOf = value?[..value.Count];
|
||||
}
|
||||
|
||||
[J($"{Constants.ActivityStreamsNs}#endTime")]
|
11
pkgbuilds/iceshrimp.net-qol-git/iceshrimp.net.hook
Normal file
11
pkgbuilds/iceshrimp.net-qol-git/iceshrimp.net.hook
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Trigger]
|
||||
Type = Package
|
||||
Operation = Upgrade
|
||||
Target = iceshrimp.net-git
|
||||
Target = aspnet-runtime
|
||||
Target = dotnet-runtime
|
||||
|
||||
[Action]
|
||||
Description = Restarting iceshrimp.net daemon...
|
||||
When = PostTransaction
|
||||
Exec = /bin/bash -c '/usr/bin/systemctl is-active iceshrimp.net.service -q && /usr/bin/systemctl restart iceshrimp.net.service || /usr/bin/true'
|
7
pkgbuilds/iceshrimp.net-qol-git/iceshrimp.net.install
Normal file
7
pkgbuilds/iceshrimp.net-qol-git/iceshrimp.net.install
Normal file
|
@ -0,0 +1,7 @@
|
|||
post_install() {
|
||||
echo
|
||||
echo -e "--- Iceshrimp.NET post-installation instructions ---"
|
||||
echo -e "Please adjust configuration in \e[1;32m/etc/iceshrimp.net/configuration.ini\e[0m before starting the service"
|
||||
echo -e "Should you be migrating from a non-package install, please copy the contents of the \e[1;34mfiles\e[0m folder into \e[1;34m/var/lib/iceshrimp.net/files\e[0m and run \e[1;35msudo chown -R iceshrimp:iceshrimp /var/lib/iceshrimp.net/files\e[0m"
|
||||
echo
|
||||
}
|
55
pkgbuilds/iceshrimp.net-qol-git/iceshrimp.net.service
Normal file
55
pkgbuilds/iceshrimp.net-qol-git/iceshrimp.net.service
Normal file
|
@ -0,0 +1,55 @@
|
|||
[Unit]
|
||||
Description=Iceshrimp.NET daemon
|
||||
|
||||
Requires=postgresql.service
|
||||
After=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
|
||||
User=iceshrimp
|
||||
Group=iceshrimp
|
||||
|
||||
Environment="ICESHRIMP_CONFIG=/etc/iceshrimp.net/configuration.ini"
|
||||
Environment="MALLOC_TRIM_THRESHOLD_=131072"
|
||||
|
||||
# Running in a memory constrained environment? Add the below line to the [Service] Section of an override file (systemctl edit iceshrimp.net.service) to trade higher CPU time for less memory usage:
|
||||
#Environment="DOTNET_gcServer=0"
|
||||
|
||||
WorkingDirectory=/usr/share/iceshrimp.net
|
||||
SyslogIdentifier=iceshrimp.net
|
||||
ExecStart=/usr/share/iceshrimp.net/Iceshrimp.Backend --migrate-and-start
|
||||
|
||||
ReadOnlyPaths=/usr/share/iceshrimp.net
|
||||
ReadOnlyPaths=/etc/iceshrimp.net/configuration.ini
|
||||
ReadWritePaths=/var/lib/iceshrimp.net/files
|
||||
ReadWritePaths=-/var/lib/iceshrimp/iceshrimp.net.sock
|
||||
NoExecPaths=/var/lib/iceshrimp.net/files
|
||||
|
||||
RestrictSUIDSGID=true
|
||||
RestrictNamespaces=true
|
||||
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
PrivateUsers=true
|
||||
|
||||
ProtectHostname=true
|
||||
ProtectClock=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectControlGroups=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ProtectProc=invisible
|
||||
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=@system-service
|
||||
SystemCallErrorNumber=EPERM
|
||||
|
||||
LockPersonality=true
|
||||
NoNewPrivileges=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
1
pkgbuilds/iceshrimp.net-qol-git/iceshrimp.net.sysusers
Normal file
1
pkgbuilds/iceshrimp.net-qol-git/iceshrimp.net.sysusers
Normal file
|
@ -0,0 +1 @@
|
|||
u iceshrimp - "Iceshrimp daemon user" /usr/share/iceshrimp
|
7
pkgbuilds/iceshrimp.net-qol-git/iceshrimp.net.tmpfiles
Normal file
7
pkgbuilds/iceshrimp.net-qol-git/iceshrimp.net.tmpfiles
Normal file
|
@ -0,0 +1,7 @@
|
|||
z /etc/iceshrimp.net/configuration.ini 740 root iceshrimp -
|
||||
z /etc/iceshrimp.net 755 root iceshrimp -
|
||||
Z /usr/share/iceshrimp.net 755 iceshrimp iceshrimp -
|
||||
d /var/lib/iceshrimp.net/files 750 iceshrimp iceshrimp -
|
||||
Z /var/lib/iceshrimp.net/files 750 iceshrimp iceshrimp -
|
||||
d /run/iceshrimp 2710 iceshrimp http -
|
||||
Z /run/iceshrimp 2710 iceshrimp http -
|
Loading…
Add table
Reference in a new issue