* update python-pbr to 5.4.0

This commit is contained in:
Alexander Baldeck 2019-07-10 14:47:52 +00:00
parent 619a72e8dc
commit 8a4dde1246
8 changed files with 326 additions and 0 deletions

58
memcached/PKGBUILD Normal file
View File

@ -0,0 +1,58 @@
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Dan McGee <dan@archlinux.org>
# Contributor: Michael Irwin <6d6469@gmail.com>
pkgname=memcached
pkgver=1.5.14
pkgrel=1
pkgdesc='Distributed memory object caching system'
url='https://memcached.org/'
arch=('x86_64')
license=('GPL')
depends=('libevent' 'libseccomp')
optdepends=('perl: for memcached-tool usage')
source=(https://www.memcached.org/files/${pkgname}-${pkgver}.tar.gz
memcached.service.patch
memcached.tmpfiles
memcached.sysusers)
sha256sums=('9c5bdf29a780fb6c6f7c9eaaeeda0583efdf663193758c3e316c969a510af2a9'
'40f81304f13d12c18986aa45f66ab65ac9886ff3e81548303a02295cce857296'
'c4d0ae2218b99a276ff6e0084ae81e66add0ca9347e4bde70e9172db6e44002a'
'228c4f536f3c9f9eee4e11226ec8846a22d4ba46c2d3bf2811413efcc322609a')
sha512sums=('d06083d971d0a40195b4dfb252a3bf7c3a0d20b2dcad56726ff9e0b87ba84024309300516dad40181f1b7af4d9c4f35924383977c5e1ff9b5f13d2ef05f684ed'
'dd21f49062054c601469f9abc9ee39a0f06c604e8805e7bc9bf2cfa65429962f93e7ac67764257c578fc15b1e75394956f350162c99b084c76a6e14d9331f31f'
'960705ff74d25afed477e0b2a5872a3a4fb49ed3105a351f0d0224abc947778f9dbda81e80be94ab636da4a8411a9dd56a8fd4513e5b86a3096a14fa67f1548b'
'e6ddcab9a6fee024072b6363ef60aa176ed258369bf3a17d475f19b1f410ffd6195b9c5737dc5b1371e8974b44bdbdaa109927acaeb54fb40302a5d67d7c13a8')
prepare() {
cd ${pkgname}-${pkgver}
patch -Np1 < ../memcached.service.patch
sed -e 's/^##safer##//g' -i scripts/*.service
}
build() {
cd ${pkgname}-${pkgver}
./configure \
--prefix=/usr \
--enable-seccomp
make
}
check() {
cd ${pkgname}-${pkgver}
make test
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
install -Dm 755 scripts/memcached-tool -t "${pkgdir}/usr/bin"
install -Dm 644 scripts/memcached-tool.1 -t "${pkgdir}/usr/share/man/man1"
install -Dm 644 scripts/*.service -t "${pkgdir}/usr/lib/systemd/system"
install -Dm 644 ../memcached.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/memcached.conf"
install -Dm 644 ../memcached.sysusers "${pkgdir}/usr/lib/sysusers.d/memcached.conf"
}
# vim: ts=2 sw=2 et:

View File

@ -0,0 +1,75 @@
From f74056bec3910ef03b6e993084731b482ba359ba Mon Sep 17 00:00:00 2001
From: anthraxx <levente@leventepolyak.net>
Date: Wed, 19 Dec 2018 01:00:32 +0100
Subject: [PATCH] modern configuration purely using systemd overrides
---
scripts/memcached.service | 12 ++++++++++--
scripts/memcached@.service | 15 +++++++++------
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/scripts/memcached.service b/scripts/memcached.service
index 88a4b8a..3a1e87e 100644
--- a/scripts/memcached.service
+++ b/scripts/memcached.service
@@ -7,6 +7,9 @@
#
# [Service]
# Environment=OPTIONS="-l 127.0.0.1,::1"
+#
+# To use the "instanced" version of this, just start 'memcached@11211' or
+# whatever port you'd like.
[Unit]
@@ -14,8 +17,13 @@ Description=memcached daemon
After=network.target
[Service]
-EnvironmentFile=/etc/sysconfig/memcached
-ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS
+User=memcached
+Environment=CACHESIZE=64
+Environment=MAXCONN=1024
+Environment=LISTEN="-l 127.0.0.1,::1"
+Environment=OPTIONS="-o modern,drop_privileges"
+ExecStart=/usr/bin/memcached -m ${CACHESIZE} -c ${MAXCONN} $LISTEN $OPTIONS
+Restart=always
# Set up a new file system namespace and mounts private /tmp and /var/tmp
# directories so this service cannot access the global directories and
diff --git a/scripts/memcached@.service b/scripts/memcached@.service
index 4e9f1d7..e666da9 100644
--- a/scripts/memcached@.service
+++ b/scripts/memcached@.service
@@ -9,18 +9,21 @@
# Environment=OPTIONS="-l 127.0.0.1,::1"
#
# To use the "instanced" version of this, just start 'memcached@11211' or
-# whatever port you'd like. If /etc/sysconfig/memcached.<port> exists, it
-# will be read first, so you can set different parameters for a given
-# instance.
+# whatever port you'd like.
+
[Unit]
Description=memcached daemon
After=network.target
[Service]
-EnvironmentFile=/etc/sysconfig/memcached
-EnvironmentFile=-/etc/sysconfig/memcached.%i
-ExecStart=/usr/bin/memcached -p %i -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS
+User=memcached
+Environment=CACHESIZE=64
+Environment=MAXCONN=1024
+Environment=LISTEN="-l 127.0.0.1,::1"
+Environment=OPTIONS="-o modern,drop_privileges"
+ExecStart=/usr/bin/memcached -p %i -m ${CACHESIZE} -c ${MAXCONN} $LISTEN $OPTIONS
+Restart=always
# Set up a new file system namespace and mounts private /tmp and /var/tmp
# directories so this service cannot access the global directories and
--
2.20.1

View File

@ -0,0 +1 @@
u memcached - - -

View File

@ -0,0 +1 @@
d /run/memcached 0775 memcached memcached -

138
nginx/PKGBUILD Normal file
View File

@ -0,0 +1,138 @@
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Sébastien Luttringer
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Miroslaw Szot <mss@czlug.icis.pcz.pl>
# Contributor: Daniel Micay <danielmicay@gmail.com>
pkgname=nginx
pkgver=1.16.0
pkgrel=1
pkgdesc='Lightweight HTTP server and IMAP/POP3 proxy server'
arch=(x86_64)
url='https://nginx.org'
license=(custom)
depends=(pcre zlib openssl geoip mailcap)
makedepends=(mercurial)
checkdepends=(perl perl-gd perl-io-socket-ssl perl-fcgi perl-cache-memcached
memcached ffmpeg inetutils)
backup=(etc/nginx/fastcgi.conf
etc/nginx/fastcgi_params
etc/nginx/koi-win
etc/nginx/koi-utf
etc/nginx/nginx.conf
etc/nginx/scgi_params
etc/nginx/uwsgi_params
etc/nginx/win-utf
etc/logrotate.d/nginx)
install=nginx.install
source=($url/download/nginx-$pkgver.tar.gz{,.asc}
hg+http://hg.nginx.org/nginx-tests#revision=ddbde6c5b0cd
service
logrotate)
validpgpkeys=(B0F4253373F8F6F510D42178520A9993A1C052F8) # Maxim Dounin <mdounin@mdounin.ru>
md5sums=('97207283f30cd90cdba638c3ea30323a'
'SKIP'
'SKIP'
'ba2e3b08ce0f0fff7cced624d0ecf7cc'
'6a01fb17af86f03707c8ae60f98a2dc2')
_common_flags=(
--with-compat
--with-debug
--with-file-aio
--with-http_addition_module
--with-http_auth_request_module
--with-http_dav_module
--with-http_degradation_module
--with-http_flv_module
--with-http_geoip_module
--with-http_gunzip_module
--with-http_gzip_static_module
--with-http_mp4_module
--with-http_realip_module
--with-http_secure_link_module
--with-http_slice_module
--with-http_ssl_module
--with-http_stub_status_module
--with-http_sub_module
--with-http_v2_module
--with-mail
--with-mail_ssl_module
--with-pcre-jit
--with-stream
--with-stream_geoip_module
--with-stream_realip_module
--with-stream_ssl_module
--with-stream_ssl_preread_module
--with-threads
)
_stable_flags=(
)
build() {
cd $pkgname-$pkgver
./configure \
--prefix=/etc/nginx \
--conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/bin/nginx \
--pid-path=/run/nginx.pid \
--lock-path=/run/lock/nginx.lock \
--user=http \
--group=http \
--http-log-path=/var/log/nginx/access.log \
--error-log-path=stderr \
--http-client-body-temp-path=/var/lib/nginx/client-body \
--http-proxy-temp-path=/var/lib/nginx/proxy \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--http-scgi-temp-path=/var/lib/nginx/scgi \
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
--with-cc-opt="$CFLAGS $CPPFLAGS" \
--with-ld-opt="$LDFLAGS" \
${_common_flags[@]} \
${_stable_flags[@]}
make
}
check() {
cd nginx-tests
TEST_NGINX_BINARY="$srcdir/$pkgname-$pkgver/objs/nginx" prove .
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
sed -e 's|\<user\s\+\w\+;|user html;|g' \
-e '44s|html|/usr/share/nginx/html|' \
-e '54s|html|/usr/share/nginx/html|' \
-i "$pkgdir"/etc/nginx/nginx.conf
rm "$pkgdir"/etc/nginx/*.default
rm "$pkgdir"/etc/nginx/mime.types # in mailcap
install -d "$pkgdir"/var/lib/nginx
install -dm700 "$pkgdir"/var/lib/nginx/proxy
chmod 755 "$pkgdir"/var/log/nginx
chown root:root "$pkgdir"/var/log/nginx
install -d "$pkgdir"/usr/share/nginx
mv "$pkgdir"/etc/nginx/html/ "$pkgdir"/usr/share/nginx
install -Dm644 ../logrotate "$pkgdir"/etc/logrotate.d/nginx
install -Dm644 ../service "$pkgdir"/usr/lib/systemd/system/nginx.service
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
rmdir "$pkgdir"/run
install -d "$pkgdir"/usr/share/man/man8/
gzip -9c man/nginx.8 > "$pkgdir"/usr/share/man/man8/nginx.8.gz
for i in ftdetect indent syntax; do
install -Dm644 contrib/vim/$i/nginx.vim \
"$pkgdir/usr/share/vim/vimfiles/$i/nginx.vim"
done
}

10
nginx/logrotate Normal file
View File

@ -0,0 +1,10 @@
/var/log/nginx/*log {
missingok
notifempty
create 640 http log
sharedscripts
compress
postrotate
test ! -r /run/nginx.pid || kill -USR1 `cat /run/nginx.pid`
endscript
}

27
nginx/nginx.install Normal file
View File

@ -0,0 +1,27 @@
post_upgrade() {
if (( $(vercmp $2 1.2.7-4) <= 0 )); then
chmod 750 var/log/nginx
chown http:log var/log/nginx
fi
if (( $(vercmp $2 1.2.1-2) <= 0 )); then
echo ':: Since 1.2.1-2 several changes has been made in package:'
echo ' - *.conf files have been moved to /etc/nginx'
echo ' - /etc/conf.d/nginx has been removed'
echo ' Main configuration file is set to /etc/nginx/nginx.conf'
echo ' - access.log and error.log can be found in /var/log/nginx by default'
echo ' - bundled *.html files have been moved to /usr/share/nginx/html'
echo ' - /etc/nginx/{html,logs} symbolic links and *.default files have been removed'
fi
if (( $(vercmp $2 1.10.2-3) < 0)); then
chown root:root var/log/nginx
fi
if (( $(vercmp $2 1.10.3-2) < 0 )); then
chmod 755 var/log/nginx
echo ':: Security notice:'
echo ' - When additional log directories are used in /var/log/nginx make sure they'
echo ' are owned by root:root and have 755 set as permission to mitigate CVE-2016-1247'
fi
}

16
nginx/service Normal file
View File

@ -0,0 +1,16 @@
[Unit]
Description=A high performance web server and a reverse proxy server
After=network.target network-online.target nss-lookup.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
PrivateDevices=yes
SyslogLevel=err
ExecStart=/usr/bin/nginx -g 'pid /run/nginx.pid; error_log stderr;'
ExecReload=/usr/bin/nginx -s reload
KillMode=mixed
[Install]
WantedBy=multi-user.target