Browse Source

more rpm packaging

main
Nicolas Massé 5 years ago
parent
commit
ddc9fda309
  1. 22
      rpmbuild/SOURCES/gitea.service
  2. 15
      rpmbuild/SOURCES/prometheus.service
  3. 15
      rpmbuild/SOURCES/traefik.service
  4. 60
      rpmbuild/SPECS/gitea.spec
  5. 32
      rpmbuild/SPECS/lego.spec
  6. 49
      rpmbuild/SPECS/prometheus.spec
  7. 35
      rpmbuild/SPECS/restic.spec
  8. 56
      rpmbuild/SPECS/traefik.spec

22
rpmbuild/SOURCES/gitea.service

@ -0,0 +1,22 @@
[Unit]
Description=Gitea - A painless self-hosted Git service
Wants=network.target postgresql.service keycloak.service
After=network-online.target
[Service]
Environment=GITEA_APP_INI=/opt/gitea/etc/app.ini
Environment=GITEA_TEMP=/tmp/gitea
Environment=GITEA_CUSTOM=/srv/gitea/custom
Environment=GITEA_WORK_DIR=/srv/gitea
Restart=always
Type=simple
ExecStart=/opt/gitea/bin/gitea -c /opt/gitea/etc/app.ini
WorkingDirectory=/srv/gitea/git
User=git
Group=itix-svc
# If some dependencies of this service are not ready, leave them some time to start
RestartSec=10
[Install]
WantedBy=multi-user.target default.target

15
rpmbuild/SOURCES/prometheus.service

@ -0,0 +1,15 @@
[Unit]
Description=The Prometheus monitoring system and time series database
Wants=network.target
After=network-online.target
[Service]
Restart=always
Type=simple
ExecStart=/opt/prometheus/bin/prometheus
WorkingDirectory=/opt/prometheus/etc
User=prometheus
Group=itix-svc
[Install]
WantedBy=multi-user.target default.target

15
rpmbuild/SOURCES/traefik.service

@ -0,0 +1,15 @@
[Unit]
Description=The Cloud Native Application Proxy
Wants=network.target
After=network-online.target
[Service]
Restart=always
Type=simple
ExecStart=/opt/traefik/bin/traefik
WorkingDirectory=/srv/traefik
User=traefik
Group=itix-svc
[Install]
WantedBy=multi-user.target default.target

60
rpmbuild/SPECS/gitea.spec

@ -0,0 +1,60 @@
Name: gitea
Version: 1.13.1
Release: itix1
Summary: Git with a cup of tea, painless self-hosted git service
License: MIT
Source0: https://github.com/go-gitea/%{name}/releases/download/v%{version}/%{name}-%{version}-linux-amd64.xz
ExclusiveArch: x86_64
Source1: gitea.service
Requires(pre): shadow-utils
Requires: postgresql-server
BuildRequires: systemd
%description
The goal of this project is to make the easiest, fastest, and most painless
way of setting up a self-hosted Git service. Using Go, this can be done with
an independent binary distribution across all platforms which Go supports,
including Linux, macOS, and Windows on x86, amd64, ARM and PowerPC
architectures.
# Since we don't recompile from source, disable the build_id checking
%global _missing_build_ids_terminate_build 0
%global _build_id_links none
%global debug_package %{nil}
%prep
%setup -q -c -T
xz -dc %{S:0} > gitea
cp %{S:0} %{name}.service
%build
%install
install -d %{buildroot}/opt/%{name}/etc/
install -d %{buildroot}/srv/%{name}/custom
install -d %{buildroot}/srv/%{name}/git
install -D gitea %{buildroot}/opt/%{name}/bin/gitea
install -D -m 0644 %{name}.service %{buildroot}/%{_unitdir}/%{name}.service
%files
%defattr(0644, root, root, 0755)
%dir /opt/%{name}/bin
%dir /opt/%{name}/etc
%dir /srv/%{name}
%dir /srv/%{name}/custom
%dir /srv/%{name}/git
%attr(0755, root, root) /opt/%{name}/bin/gitea
%{_unitdir}/%{name}.service
%pre
getent group itix-svc >/dev/null || groupadd -r itix-svc
getent passwd git >/dev/null || useradd -r -g itix-svc \
-d /srv/%{name} -s /sbin/nologin -c "Git with a cup of tea" \
git
exit 0
%changelog
* Mon Feb 22 2021 Nicolas MASSE <nicolas.masse@itix.fr> - 1.13.1-itix1
- First release

32
rpmbuild/SPECS/lego.spec

@ -0,0 +1,32 @@
Name: lego
Version: 4.2.0
Release: itix1
Summary: Let's Encrypt client and ACME library written in Go
License: MIT
Source0: https://github.com/go-acme/%{name}/releases/download/v%{version}/%{name}_v%{version}_linux_amd64.tar.gz
ExclusiveArch: x86_64
%description
Let's Encrypt client and ACME library written in Go.
# Since we don't recompile from source, disable the build_id checking
%global _missing_build_ids_terminate_build 0
%global _build_id_links none
%global debug_package %{nil}
%prep
%setup -q -c
%build
%install
install -D lego %{buildroot}/usr/local/bin/lego
%files
%defattr(0644, root, root, 0755)
%attr(0755, root, root) /usr/local/bin/lego
%changelog
* Mon Feb 22 2021 Nicolas MASSE <nicolas.masse@itix.fr> - 4.2.0-itix1
- First release

49
rpmbuild/SPECS/prometheus.spec

@ -3,8 +3,11 @@ Version: 2.25.0
Release: itix1 Release: itix1
Summary: The Prometheus monitoring system and time series database. Summary: The Prometheus monitoring system and time series database.
License: Apache-2.0 License: Apache-2.0
Source0: https://github.com/prometheus/prometheus/releases/download/v%{version}/%{name}-%{version}.linux-amd64.tar.gz Source0: https://github.com/prometheus/%{name}/releases/download/v%{version}/%{name}-%{version}.linux-amd64.tar.gz
Source1: prometheus.service
ExclusiveArch: x86_64 ExclusiveArch: x86_64
Requires(pre): shadow-utils
BuildRequires: systemd
%description %description
@ -19,31 +22,43 @@ trigger alerts when specified conditions are observed.
%global debug_package %{nil} %global debug_package %{nil}
%prep %prep
%setup -q -n prometheus-%{version}.linux-amd64 %setup -q -n %{name}-%{version}.linux-amd64
cp %{S:0} %{name}.service
%build %build
rm NOTICE rm NOTICE
%install %install
mkdir -p %{buildroot}/opt/prometheus/bin/ mkdir -p %{buildroot}/srv/%{name}
cp -v prometheus %{buildroot}/opt/prometheus/bin/prometheus install -D prometheus %{buildroot}/opt/%{name}/bin/prometheus
cp -v promtool %{buildroot}/opt/prometheus/bin/promtool install -D promtool %{buildroot}/opt/%{name}/bin/promtool
cp -rv consoles %{buildroot}/opt/prometheus/bin/consoles/ install -D -m 0644 consoles/* -t %{buildroot}/opt/%{name}/bin/consoles/
cp -rv console_libraries %{buildroot}/opt/prometheus/bin/console_libraries/ install -D -m 0644 console_libraries/* -t %{buildroot}/opt/%{name}/bin/console_libraries/
cp -v prometheus.yml %{buildroot}/opt/prometheus/etc/prometheus.yaml install -D -m 0644 prometheus.yml %{buildroot}/opt/%{name}/etc/prometheus.yaml
install -D -m 0644 %{name}.service %{buildroot}/%{_unitdir}/%{name}.service
%files %files
%defattr(0644, root, root, 0755) %defattr(0644, root, root, 0755)
%license LICENSE %license LICENSE
%dir /opt/prometheus/bin/ %dir /opt/%{name}/bin/
%dir /opt/prometheus/bin/consoles/ %dir /opt/%{name}/bin/consoles/
%dir /opt/prometheus/bin/console_libraries/ %dir /opt/%{name}/bin/console_libraries/
/opt/prometheus/bin/prometheus %dir /opt/%{name}/etc/
/opt/prometheus/bin/promtool %dir /srv/%{name}/
/opt/prometheus/bin/consoles/* %attr(0644, root, root) /opt/%{name}/bin/prometheus
/opt/prometheus/bin/console_libraries/* %attr(0644, root, root) /opt/%{name}/bin/promtool
%dir /opt/prometheus/etc/prometheus.yaml /opt/%{name}/bin/consoles/*
%config /opt/prometheus/etc/prometheus.yaml /opt/%{name}/bin/console_libraries/*
%config /opt/%{name}/etc/prometheus.yaml
%{_unitdir}/%{name}.service
%pre
getent group itix-svc >/dev/null || groupadd -r itix-svc
getent passwd %{name} >/dev/null || useradd -r -g itix-svc \
-d /srv/%{name} -s /sbin/nologin -c "Prometheus monitoring" \
%{name}
exit 0
%changelog %changelog
* Mon Feb 22 2021 Nicolas MASSE <nicolas.masse@itix.fr> - 2.25.0-itix1 * Mon Feb 22 2021 Nicolas MASSE <nicolas.masse@itix.fr> - 2.25.0-itix1

35
rpmbuild/SPECS/restic.spec

@ -0,0 +1,35 @@
Name: restic
Version: 0.12.0
Release: itix1
Summary: Fast, secure, efficient backup program
License: BSD
Source0: https://github.com/restic/%{name}/releases/download/v%{version}/%{name}_%{version}_linux_amd64.bz2
ExclusiveArch: x86_64
%description
restic is a backup program that is fast, efficient and secure. It supports the
three major operating systems (Linux, macOS, Windows) and a few smaller ones
(FreeBSD, OpenBSD).
# Since we don't recompile from source, disable the build_id checking
%global _missing_build_ids_terminate_build 0
%global _build_id_links none
%global debug_package %{nil}
%prep
%setup -q -c -T
bunzip2 -c %{S:0} > restic
%build
%install
install -D restic %{buildroot}/opt/restic/bin/restic
%files
%defattr(0644, root, root, 0755)
%attr(0755, root, root) /opt/restic/bin/restic
%changelog
* Mon Feb 22 2021 Nicolas MASSE <nicolas.masse@itix.fr> - 0.12.0-itix1
- First release

56
rpmbuild/SPECS/traefik.spec

@ -0,0 +1,56 @@
Name: traefik
Version: 2.3.4
Release: itix1
Summary: The Cloud Native Application Proxy
License: MIT
Source0: https://github.com/traefik/%{name}/releases/download/v%{version}/%{name}_v%{version}_linux_amd64.tar.gz
ExclusiveArch: x86_64
Source1: traefik.service
Requires(pre): shadow-utils
BuildRequires: systemd
%description
Traefik (pronounced traffic) is a modern HTTP reverse proxy and load balancer
that makes deploying microservices easy. Traefik integrates with your existing
infrastructure components (Docker, Swarm mode, Kubernetes, Marathon, Consul,
Etcd, Rancher, Amazon ECS, ...) and configures itself automatically and
dynamically. Pointing Traefik at your orchestrator should be the only
onfiguration step you need.
# Since we don't recompile from source, disable the build_id checking
%global _missing_build_ids_terminate_build 0
%global _build_id_links none
%global debug_package %{nil}
%prep
%setup -q -c
cp %{S:0} %{name}.service
%build
%install
install -d %{buildroot}/opt/%{name}/etc/
install -d %{buildroot}/srv/%{name}/
install -D traefik %{buildroot}/opt/%{name}/bin/traefik
install -D -m 0644 %{name}.service %{buildroot}/%{_unitdir}/%{name}.service
%files
%defattr(0644, root, root, 0755)
%dir /opt/%{name}/bin
%dir /opt/%{name}/etc
%dir /srv/%{name}
%attr(0755, root, root) /opt/%{name}/bin/traefik
%{_unitdir}/%{name}.service
%pre
getent group itix-svc >/dev/null || groupadd -r itix-svc
getent passwd %{name} >/dev/null || useradd -r -g itix-svc \
-d /srv/%{name} -s /sbin/nologin -c "The Cloud Native Application Proxy" \
%{name}
exit 0
%changelog
* Mon Feb 22 2021 Nicolas MASSE <nicolas.masse@itix.fr> - 2.3.4-itix1
- First release
Loading…
Cancel
Save