Browse Source

authelia update 4.34.4

Signed-off-by: webbuilder_pel7ppc64lebuilder0 <webbuilder@powerel.org>
master
webbuilder_pel7ppc64lebuilder0 3 years ago
parent
commit
9290024407
  1. 28
      SPECS/authelia.spec

28
SPECS/authelia.spec

@ -2,12 +2,13 @@
%define debug_package %{nil} %define debug_package %{nil}


Name : authelia Name : authelia
Version : 4.31.0 Version : 4.34.4
Release : 1%{dist} Release : 1%{dist}
License : MIT License : MIT
URL : https://www.authelia.com/ URL : https://www.authelia.com/
Summary : Single Sign-On Multi-Factor portal for web apps Summary : Single Sign-On Multi-Factor portal for web apps
Source0 : authelia-sqlite-disable.patch Source0 : authelia.service
Patch0 : authelia-sqlite-disable.patch
BuildRequires: golang BuildRequires: golang
BuildRequires: git BuildRequires: git
BuildRequires: npm BuildRequires: npm
@ -34,26 +35,29 @@ git checkout v%{version}
export GITCOMMIT=$(git rev-parse --short HEAD) export GITCOMMIT=$(git rev-parse --short HEAD)
export BUILDDATE=$(date +%Y%m%d) export BUILDDATE=$(date +%Y%m%d)
pushd web pushd web
npm install sed 's|href="https://github.com/authelia/authelia"|href="https://www.powerel.org"|g' -i src/layouts/LoginLayout.tsx
sed 's|Powered by Authelia|Built by PowerEL - powered by Authelia|g' -i src/layouts/LoginLayout.tsx
npm install --force
npm run lint
npm run build npm run build
popd popd
#rm -rf internal/server/public_html #rm -rf internal/server/public_html
#cp -rv web/build internal/server/public_html #cp -rv web/build internal/server/public_html
cp -rv api internal/server/public_html/api cp -rv api internal/server/public_html/api
%ifarch ppc64le ppc64 %ifarch ppc64le ppc64
rm -rf internal/storage/sqlite_provider.go #rm -rf internal/storage/sqlite_provider.go
patch -p0 -i %{SOURCE0} #patch -p0 -i %{SOURCE0}
%endif %endif
if [ -f cmd/authelia/constants.go ]; then if [ -f cmd/authelia/constants.go ]; then
sed "s/__BUILD_TAG__/"%{version}"/" -i cmd/authelia/constants.go sed "s/__BUILD_TAG__/"%{version}"/" -i cmd/authelia/constants.go
sed "s/__BUILD_COMMIT__/"%{release}"/" -i cmd/authelia/constants.go sed "s/__BUILD_COMMIT__/"%{release}"/" -i cmd/authelia/constants.go
fi fi
sed 's|h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w=|h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60=|' -i go.sum #sed 's|h1:RbATFBbKYkVdqmSFtx13Bb/tVhR0lgOBXunWTZKeL4w=|h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60=|' -i go.sum
go build -v -tags netgo -trimpath -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'github.com/authelia/authelia/internal/utils.BuildTag="%{version}"' -X 'github.com/authelia/authelia/internal/utils.BuildState=\"tagged clean\"' -X 'github.com/authelia/authelia/internal/utils.BuildExtra="%{dist}"' -X 'github.com/authelia/authelia/internal/utils.BuildDate="${BUILDATE}"' -X 'github.com/authelia/authelia/internal/utils.BuildCommit="${GITCOMMIT}"' -X 'github.com/authelia/authelia/internal/utils.BuildBranch=\"master\"' -X 'github.com/authelia/authelia/internal/utils.BuildNumber="%{release}"'" -o authelia ./cmd/authelia/ CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-strong" CGO_LDFLAGS="-Wl,-z,relro,-z,now" go build -v -tags netgo -trimpath -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid "%{version}" -X 'github.com/authelia/authelia/internal/utils.BuildTag="%{version}"' -X 'github.com/authelia/authelia/internal/utils.BuildState=\"tagged clean\"' -X 'github.com/authelia/authelia/internal/utils.BuildExtra="%{dist}"' -X 'github.com/authelia/authelia/internal/utils.BuildDate="${BUILDATE}"' -X 'github.com/authelia/authelia/internal/utils.BuildCommit="${GITCOMMIT}"' -X 'github.com/authelia/authelia/internal/utils.BuildBranch=\"master\"' -X 'github.com/authelia/authelia/internal/utils.BuildNumber="%{release}"'" -o authelia ./cmd/authelia/




%install %install
install -p -D -m 0644 go/src/github.com/authelia/authelia/authelia.service %{buildroot}%{_unitdir}/authelia.service install -p -D -m 0644 %{SOURCE0} %{buildroot}%{_unitdir}/authelia@.service
mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/ mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/
install -p -D -m 0644 go/src/github.com/authelia/authelia/config.template.yml %{buildroot}%{_sysconfdir}/%{name}/configuration.yml install -p -D -m 0644 go/src/github.com/authelia/authelia/config.template.yml %{buildroot}%{_sysconfdir}/%{name}/configuration.yml
mkdir -p %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{_bindir}/
@ -62,21 +66,21 @@ install -p -D -m 0555 go/src/github.com/authelia/authelia/authelia %{buildroot}%




%post %post
%systemd_post authelia.service %systemd_post authelia@.service




%preun %preun
%systemd_preun authelia.service %systemd_preun authelia@.service




%postun %postun
%systemd_postun authelia.service %systemd_postun authelia@.service




%files %files
%config(noreplace) %{_sysconfdir}/%{name}/configuration.yml %config(noreplace) %{_sysconfdir}/%{name}/configuration.yml
%{_bindir}/authelia %{_bindir}/authelia
%{_unitdir}/authelia.service %{_unitdir}/authelia@.service




%changelog %changelog

Loading…
Cancel
Save