summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Auditor2017-03-15 16:12:58 +0100
committerStefan Auditor2017-03-15 18:20:58 +0100
commit55ec86e321d1b980d848b60a05c58e726bcb6ad4 (patch)
tree67356497ce1d6d44005f852461447b1045289c13
parent19c188c2b69f2e32ff750c800097dc149cbc0e74 (diff)
downloadaur-55ec86e321d1b980d848b60a05c58e726bcb6ad4.tar.gz
Package review by Doug Newgard
- Put all files into sources array - Fix up paths - Move architecture independent files to general sources array - Pull license file from release tag - Copy license to the wright directory - Remove user deletion from post_remove hook
-rw-r--r--.SRCINFO16
-rw-r--r--.gitlab-ci.yml9
-rw-r--r--PKGBUILD42
-rwxr-xr-xtest.sh7
-rw-r--r--traefik.install14
5 files changed, 44 insertions, 44 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f97bf9a82c8f..b25e61b84c4c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = traefik-bin
pkgdesc = A modern reverse proxy
pkgver = 1.1.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/containous/traefik
install = traefik.install
arch = i686
@@ -9,14 +9,20 @@ pkgbase = traefik-bin
license = MIT
backup = etc/traefik/traefik.toml
backup = etc/logrotate.d/traefik
+ source = traefik.install
+ source = traefik.logrotate
+ source = traefik.service
+ source = traefik.toml
+ source = https://raw.githubusercontent.com/containous/traefik/v1.1.2/LICENSE.md
+ sha512sums = 24f2b89ea13f630684f2628e4e36d51917bd10013a8250ecb63d9931626b7406bc158e97a0f14b0a7b89448eb398d57cd271f2d89b6c64a2b285bda71950e0f8
+ sha512sums = d1dfacff1e7a5b9f8e8b4796fcfbb9c1bed6151013708078361ac31ae221dd956f746ec1e0bc5bd09a05763438d877318259577f6f0178d42f011bd737c31207
+ sha512sums = 1ba00b19f691e173eb1d69d2a3e1bcb95370025de49baf4f8024c30579cb58c6296ed743959f261b4ada6731f1c810ebe4eb0e3481e7eb17a9f09596fa004986
+ sha512sums = 05de0378cd4c430084c122dfcbb433c9cf8dda912dee03a5c80d1e199b133ecc0b32f6e8ae985544dca89355e21c23c8c4d04c05e1d0a72f5bf135db7fc724d2
+ sha512sums = 8ca3ccd49fccf47a67d6e80bd21ceec6a3968a9d3defd781862782cd4eb2a5763688fb028091548ed102c719267623f18f94fa532ee7a1673806246407e150e7
source_i686 = traefik_i686_1.1.2::https://github.com/containous/traefik/releases/download/v1.1.2/traefik_linux-386
- source_i686 = https://raw.githubusercontent.com/containous/traefik/master/LICENSE.md
sha512sums_i686 = e08ba5893c0781df3a51d91a25fef388f16ba4dfd5ed4630e54090cd393d8b7db051bc0531847d06e3135bc04a628b3bb76bfb5da8e4a29dea397cf01d0f273c
- sha512sums_i686 = 8ca3ccd49fccf47a67d6e80bd21ceec6a3968a9d3defd781862782cd4eb2a5763688fb028091548ed102c719267623f18f94fa532ee7a1673806246407e150e7
source_x86_64 = traefik_x86_64_1.1.2::https://github.com/containous/traefik/releases/download/v1.1.2/traefik_linux-amd64
- source_x86_64 = https://raw.githubusercontent.com/containous/traefik/master/LICENSE.md
sha512sums_x86_64 = 02294f3fb021b0c84578285a17ca3f5b31be92d7547a155e69dea0ad0d9e53ef688fed080061849d9b6b77bbdc3cc272abbf0e771e7d3a3ef1ba89a9f6e2de25
- sha512sums_x86_64 = 8ca3ccd49fccf47a67d6e80bd21ceec6a3968a9d3defd781862782cd4eb2a5763688fb028091548ed102c719267623f18f94fa532ee7a1673806246407e150e7
pkgname = traefik-bin
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3c8044badc48..1e9113895712 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,12 +9,9 @@ test:
only:
- master
before_script:
- - pacman -Syyu --noconfirm
- - pacman -S namcap --noconfirm
+ - pacman -Syyu namcap --noconfirm
- useradd somebody
- echo "somebody ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
- - mkdir -p /home/somebody/
- - chown -R somebody:somebody /home/somebody/
script:
- sudo -u somebody ./test.sh
@@ -25,11 +22,10 @@ github:
- git checkout "$CI_BUILD_REF_NAME"
- git remote add github https://"$GITHUB_USERNAME":"$GITHUB_TOKEN"@github.com/sanduhrs/arch-aur-traefik-bin
script:
- - echo "Deploy to Github"
- git push github
environment:
name: staging
- url: https://github.com/sanduhrs/arch-aur-traefik
+ url: https://github.com/sanduhrs/arch-aur-traefik-bin
only:
- branches
when: on_success
@@ -49,7 +45,6 @@ aur:
- git checkout "$CI_BUILD_REF_NAME"
- git remote add aur ssh://aur@aur.archlinux.org/traefik-bin.git
script:
- - echo "Deploy to Github"
- git push aur
environment:
name: production
diff --git a/PKGBUILD b/PKGBUILD
index 7088f0332086..1ab0e6d01f01 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname='traefik'
pkgname="${_pkgname}-bin"
pkgver='1.1.2'
-pkgrel=1
+pkgrel=2
pkgdesc='A modern reverse proxy'
arch=('i686' 'x86_64')
url='https://github.com/containous/traefik'
@@ -13,30 +13,30 @@ backup=(
'etc/traefik/traefik.toml'
'etc/logrotate.d/traefik'
)
-source_i686=(
- "${_pkgname}_i686_${pkgver}"::"https://github.com/containous/traefik/releases/download/v${pkgver}/${_pkgname}_linux-386"
- "https://raw.githubusercontent.com/containous/traefik/master/LICENSE.md"
-)
-source_x86_64=(
- "${_pkgname}_x86_64_${pkgver}"::"https://github.com/containous/traefik/releases/download/v${pkgver}/${_pkgname}_linux-amd64"
- "https://raw.githubusercontent.com/containous/traefik/master/LICENSE.md"
-)
-sha512sums_i686=(
- 'e08ba5893c0781df3a51d91a25fef388f16ba4dfd5ed4630e54090cd393d8b7db051bc0531847d06e3135bc04a628b3bb76bfb5da8e4a29dea397cf01d0f273c'
- '8ca3ccd49fccf47a67d6e80bd21ceec6a3968a9d3defd781862782cd4eb2a5763688fb028091548ed102c719267623f18f94fa532ee7a1673806246407e150e7'
-)
-sha512sums_x86_64=(
- '02294f3fb021b0c84578285a17ca3f5b31be92d7547a155e69dea0ad0d9e53ef688fed080061849d9b6b77bbdc3cc272abbf0e771e7d3a3ef1ba89a9f6e2de25'
- '8ca3ccd49fccf47a67d6e80bd21ceec6a3968a9d3defd781862782cd4eb2a5763688fb028091548ed102c719267623f18f94fa532ee7a1673806246407e150e7'
+source=(
+ 'traefik.install'
+ 'traefik.logrotate'
+ 'traefik.service'
+ 'traefik.toml'
+ "https://raw.githubusercontent.com/containous/${_pkgname}/v${pkgver}/LICENSE.md"
)
+source_i686=("${_pkgname}_i686_${pkgver}"::"https://github.com/containous/${_pkgname}/releases/download/v${pkgver}/${_pkgname}_linux-386")
+source_x86_64=("${_pkgname}_x86_64_${pkgver}"::"https://github.com/containous/${_pkgname}/releases/download/v${pkgver}/${_pkgname}_linux-amd64")
+sha512sums=('24f2b89ea13f630684f2628e4e36d51917bd10013a8250ecb63d9931626b7406bc158e97a0f14b0a7b89448eb398d57cd271f2d89b6c64a2b285bda71950e0f8'
+ 'd1dfacff1e7a5b9f8e8b4796fcfbb9c1bed6151013708078361ac31ae221dd956f746ec1e0bc5bd09a05763438d877318259577f6f0178d42f011bd737c31207'
+ '1ba00b19f691e173eb1d69d2a3e1bcb95370025de49baf4f8024c30579cb58c6296ed743959f261b4ada6731f1c810ebe4eb0e3481e7eb17a9f09596fa004986'
+ '05de0378cd4c430084c122dfcbb433c9cf8dda912dee03a5c80d1e199b133ecc0b32f6e8ae985544dca89355e21c23c8c4d04c05e1d0a72f5bf135db7fc724d2'
+ '8ca3ccd49fccf47a67d6e80bd21ceec6a3968a9d3defd781862782cd4eb2a5763688fb028091548ed102c719267623f18f94fa532ee7a1673806246407e150e7')
+sha512sums_i686=('e08ba5893c0781df3a51d91a25fef388f16ba4dfd5ed4630e54090cd393d8b7db051bc0531847d06e3135bc04a628b3bb76bfb5da8e4a29dea397cf01d0f273c')
+sha512sums_x86_64=('02294f3fb021b0c84578285a17ca3f5b31be92d7547a155e69dea0ad0d9e53ef688fed080061849d9b6b77bbdc3cc272abbf0e771e7d3a3ef1ba89a9f6e2de25')
package() {
install -d -m755 "${pkgdir}/var/log/traefik"
- install -D -m644 "../traefik.logrotate" "${pkgdir}/etc/logrotate.d/traefik"
- install -D -m644 "../traefik.service" "${pkgdir}/usr/lib/systemd/system/traefik.service"
- install -D -m644 "../traefik.toml" "${pkgdir}/etc/traefik/traefik.toml"
+ install -D -m644 "${srcdir}/traefik.logrotate" "${pkgdir}/etc/logrotate.d/traefik"
+ install -D -m644 "${srcdir}/traefik.service" "${pkgdir}/usr/lib/systemd/system/traefik.service"
+ install -D -m644 "${srcdir}/traefik.toml" "${pkgdir}/etc/traefik/traefik.toml"
- install -D -m644 "LICENSE.md" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
- install -D -m755 "${_pkgname}_${CARCH}_${pkgver}" "${pkgdir}/usr/bin/${_pkgname}"
+ install -D -m644 "${srcdir}/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -D -m755 "${srcdir}/${_pkgname}_${CARCH}_${pkgver}" "${pkgdir}/usr/bin/${_pkgname}"
}
diff --git a/test.sh b/test.sh
index e4ab0d9e0888..518a7cbd8863 100755
--- a/test.sh
+++ b/test.sh
@@ -2,11 +2,12 @@
if [ ! -z ${1+x} ];
then
- if [[ $1 == *\/ ]];
+ if [ -f $1 ];
then
- SRCINFO="$1.SRCINFO"
+ SRCINFO="$1"
else
- SRCINFO="$1/.SRCINFO"
+ echo "File not found $1"
+ exit 1
fi
else
SRCINFO=".SRCINFO"
diff --git a/traefik.install b/traefik.install
index 367764358f5e..07c0968d3ff7 100644
--- a/traefik.install
+++ b/traefik.install
@@ -1,14 +1,12 @@
post_install() {
- getent group traefik >/dev/null || groupadd -r traefik
- getent passwd traefik >/dev/null || useradd -g traefik -r -M -s /bin/false traefik
- chown traefik:traefik /var/log/traefik
- setcap 'cap_net_bind_service=+ep' /bin/traefik
+ getent group traefik &> /dev/null || groupadd -r traefik &> /dev/null
+ getent passwd traefik &> /dev/null || useradd -s /sbin/nologin -c "Traefik user" -d /var/empty -g traefik -r traefik &> /dev/null
+ chmod u+s usr/bin/traefik &>/dev/null
+ chown traefik:traefik usr/bin/traefik &>/dev/null
+ chown traefik:traefik var/log/traefik &>/dev/null
+ setcap 'cap_net_bind_service=+ep' usr/bin/traefik &>/dev/null
}
post_upgrade() {
post_install
}
-
-post_remove() {
- userdel traefik
-}