Accepting request 1144269 from home:dimstar:Factory
Fixes the build when referencing the pre script. the build changed directory to a parent, which is pere the sysusers_generate was then started from later, %pre -f … did not match the expected path. Fixed that by changing back to the expected directorty prior to calling sysusers_generate OBS-URL: https://build.opensuse.org/request/show/1144269 OBS-URL: https://build.opensuse.org/package/show/network/syncthing?expand=0&rev=292
This commit is contained in:
parent
82f229b7c1
commit
048cc5b655
@ -55,14 +55,11 @@ contains the necessary files for setting up a relay server, either
|
|||||||
joined to the syncthing relay pool or private.
|
joined to the syncthing relay pool or private.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}
|
%autosetup -n %{name} -p1
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# move source archive which is extracted as "syncthing" to be "src/github.com/syncthing/syncthing"
|
# move source archive which is extracted as "syncthing" to be "src/github.com/syncthing/syncthing"
|
||||||
cd ..
|
pushd ..
|
||||||
install -d "src/github.com/syncthing/"
|
install -d "src/github.com/syncthing/"
|
||||||
mv %{name} "src/github.com/syncthing/"%{name}
|
mv %{name} "src/github.com/syncthing/"%{name}
|
||||||
mkdir syncthing
|
mkdir syncthing
|
||||||
@ -77,8 +74,9 @@ export GOFLAGS="-trimpath -mod=vendor"
|
|||||||
go run build.go -no-upgrade -version v%{version} install
|
go run build.go -no-upgrade -version v%{version} install
|
||||||
# build and install strelaysrv without automatic updates
|
# build and install strelaysrv without automatic updates
|
||||||
go run build.go -no-upgrade -version v%{version} install strelaysrv
|
go run build.go -no-upgrade -version v%{version} install strelaysrv
|
||||||
|
popd
|
||||||
|
|
||||||
%sysusers_generate_pre %{name}-strelaysrv-user.conf %{name}-strelaysrv %{name}-strelaysrv-user.conf
|
%sysusers_generate_pre %{SOURCE3} %{name}-strelaysrv %{name}-strelaysrv-user.conf
|
||||||
|
|
||||||
%install
|
%install
|
||||||
st_dir=$PWD
|
st_dir=$PWD
|
||||||
@ -116,7 +114,7 @@ install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/%{name}-relaysrv.conf
|
|||||||
%pre
|
%pre
|
||||||
%service_add_pre %{name}-resume.service
|
%service_add_pre %{name}-resume.service
|
||||||
|
|
||||||
%pre relaysrv
|
%pre relaysrv -f %{name}-strelaysrv.pre
|
||||||
%service_add_pre strelaysrv.service
|
%service_add_pre strelaysrv.service
|
||||||
|
|
||||||
%post
|
%post
|
||||||
|
Loading…
x
Reference in New Issue
Block a user