Browse Source

concourse update specfile and version 6.0.0

Signed-off-by: pipelinebuilder_pel7x64builder0 <pipelinebuilder@powerel.org>
master
pipelinebuilder_pel7x64builder0 5 years ago
parent
commit
74b40145a1
  1. 27
      SOURCES/concourse-web.config
  2. 12
      SOURCES/concourse-web.service
  3. 4
      SOURCES/concourse-worker.config
  4. 12
      SOURCES/concourse-worker.service
  5. 60
      SPECS/concourse.spec

27
SOURCES/concourse-web.config

@ -0,0 +1,27 @@
CONCOURSE_SESSION_SIGNING_KEY=/etc/concourse/web/session_signing_key
CONCOURSE_TSA_HOST_KEY=/etc/concourse/web/tsa_host_key
CONCOURSE_TSA_AUTHORIZED_KEYS=/etc/concourse/authorized_worker_keys

CONCOURSE_POSTGRES_HOST=127.0.0.1
CONCOURSE_POSTGRES_PORT=5432
#CONCOURSE_POSTGRES_SOCKET=/var/run/postgresql
CONCOURSE_POSTGRES_USER=concourse_user
CONCOURSE_POSTGRES_PASSWORD=concourse_password
CONCOURSE_POSTGRES_DATABASE=concoursedb

CONCOURSE_MAX_OPEN_CONNECTIONS=32
CONCOURSE_PEER_ADDRESS=127.0.0.1

CONCOURSE_BASIC_AUTH_USERNAME=admin
CONCOURSE_BASIC_AUTH_PASSWORD=adminadmin
CONCOURSE_EXTERNAL_URL=http://localhost

CONCOURSE_ENABLE_BUILD_AUDITING=true
CONCOURSE_ENABLE_CONTAINER_AUDITING=true
CONCOURSE_ENABLE_JOB_AUDITING=true
CONCOURSE_ENABLE_PIPELINE_AUDITING=true
CONCOURSE_ENABLE_RESOURCE_AUDITING=true
CONCOURSE_ENABLE_SYSTEM_AUDITING=true
CONCOURSE_ENABLE_TEAM_AUDITING=true
CONCOURSE_ENABLE_WORKER_AUDITING=true
CONCOURSE_ENABLE_VOLUME_AUDITING=true

12
SOURCES/concourse-web.service

@ -0,0 +1,12 @@
[Unit]
Description=Concourse CI Web Process
After=postgresql.service

[Service]
User=concourse
Restart=on-failure
EnvironmentFile=/etc/concourse/web/config
ExecStart=/usr/bin/concourse web

[Install]
WantedBy=multi-user.target

4
SOURCES/concourse-worker.config

@ -0,0 +1,4 @@
CONCOURSE_WORK_DIR=/var/lib/concourse/worker/
CONCOURSE_TSA_HOST=127.0.0.1:2222
CONCOURSE_TSA_PUBLIC_KEY=/etc/concourse/worker/tsa_host_key.pub
CONCOURSE_TSA_WORKER_PRIVATE_KEY=/etc/concourse/worker/tsa_host_key

12
SOURCES/concourse-worker.service

@ -0,0 +1,12 @@
[Unit]
Description=Concourse CI Worker
After=network-online.target

[Service]
User=concourse
Restart=on-failure
EnvironmentFile=/etc/concourse/worker/config
ExecStart=/usr/bin/concourse worker

[Install]
WantedBy=multi-user.target

60
SPECS/concourse.spec

@ -1,6 +1,7 @@
Name: concourse Name: concourse
Version: 5.4.1 Version: 6.0.0
Release: 1%{?dist} Release: 1%{?dist}
Source0: https://github.com/concourse/concourse/archive/v%{version}.tar.gz
Summary: Concourse is a container-based continuous thing-doer written in Go and Elm. Summary: Concourse is a container-based continuous thing-doer written in Go and Elm.
Group: System/Pipeline Group: System/Pipeline
License: Apache License: Apache
@ -16,14 +17,18 @@ Concourse presents a general approach to automation that makes it great for CI/C




%package web %package web
Source0: concourse-web.service Source100: concourse-web.service
Source101: concourse-web.config
Summary: Concourse Web Summary: Concourse Web
Requires: concourse
%description web %description web




%package worker %package worker
Source1: concourse-worker.service Source200: concourse-worker.service
Source201: concourse-worker.config
Summary: Concourse Worker Summary: Concourse Worker
Requires: concourse
%description worker %description worker




@ -33,24 +38,24 @@ Summary: A command line interface that runs a build in a container with ATC




%prep %prep
%setup -q -T -c %{name}-%{version} %setup -q -c %{name}-%{version}
mkdir -p src/github.com/concourse mkdir -p src/github.com/concourse/
cd src/github.com/concourse tar xvf %{SOURCE0}
git clone https://github.com/concourse/concourse mv concourse-%{version} src/github.com/concourse/concourse/




%build %build
export GOPATH=`pwd` export GOPATH=`pwd`
export GO111MODULE=on export GO111MODULE=on
cd src/github.com/concourse/concourse cd src/github.com/concourse/concourse
git checkout v%{version}
%ifarch ppc64 %ifarch ppc64
export CGO_ENABLED=1 export CGO_ENABLED=1
%endif %endif
go mod download go mod download
go build -gcflags=all="-N -l" -ldflags '-extldflags -s -w -buildid %{version}' -o concourse ./cmd/concourse go build -v -gcflags=all="-N -l" -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o concourse ./cmd/concourse
cd fly pushd fly
go build -gcflags=all="-N -l" -ldflags '-extldflags -s -w -buildid %{version}' -o fly go build -v -gcflags=all="-N -l" -ldflags "-extldflags -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o fly
popd




%install %install
@ -58,26 +63,37 @@ mkdir -p %{buildroot}%{_bindir}
cp -rv src/github.com/concourse/concourse/concourse %{buildroot}%{_bindir} cp -rv src/github.com/concourse/concourse/concourse %{buildroot}%{_bindir}
cp -rv src/github.com/concourse/concourse/fly/fly %{buildroot}%{_bindir} cp -rv src/github.com/concourse/concourse/fly/fly %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_unitdir}
cp -rv %{SOURCE0} %{buildroot}%{_unitdir} cp -rv %{SOURCE100} %{buildroot}%{_unitdir}
cp -rv %{SOURCE1} %{buildroot}%{_unitdir} cp -rv %{SOURCE200} %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/web/
cp %{SOURCE101} %{buildroot}%{_sysconfdir}/%{name}/web/config
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/worker/
cp %{SOURCE201} %{buildroot}%{_sysconfdir}/%{name}/worker/config




%post web %pre
%systemd_post concourse-web.service getent group concourse > /dev/null || groupadd -r concourse
%post worker getent passwd concourse > /dev/null || useradd -r -d /var/lib/concourse -g concourse -s /sbin/nologin -c "Concourse User" concourse
%systemd_post concourse-worker.service exit 0




%post web
%{_bindir}/concourse generate-key -t rsa -f /etc/concourse/web/session_signing_key
%{_bindir}/concourse generate-key -t ssh -f /etc/concourse/web/tsa_host_key
%systemd_post concourse-web.service
%preun web %preun web
%systemd_preun concourse-web.service %systemd_preun concourse-web.service
%preun worker
%systemd_preun concourse-worker.service


%postun web %postun web
%systemd_postun concourse-web.service %systemd_postun concourse-web.service


%post worker
%{_bindir}/concourse generate-key -t ssh -f /etc/concourse/worker/tsa_host_key
%systemd_post concourse-worker.service
%postun worker %postun worker
%systemd_postun concourse-worker.service %systemd_postun concourse-worker.service
%preun worker
%systemd_preun concourse-worker.service




%files %files
@ -85,10 +101,12 @@ cp -rv %{SOURCE1} %{buildroot}%{_unitdir}




%files web %files web
%{_sysconfdir}/%{name}/web/config
%{_unitdir}/concourse-web.service %{_unitdir}/concourse-web.service




%files worker %files worker
%{_sysconfdir}/%{name}/worker/config
%{_unitdir}/concourse-worker.service %{_unitdir}/concourse-worker.service





Loading…
Cancel
Save