File tree Expand file tree Collapse file tree 3 files changed +77
-1
lines changed
common/oursrc/scripts-proxy Expand file tree Collapse file tree 3 files changed +77
-1
lines changed Original file line number Diff line number Diff line change 1+ [Unit]
2+ Description =Scripts HTTP/SNI proxy
3+ After =nss-lookup.target
4+ Wants =network-online.target
5+ After =network-online.target
6+
7+ [Service]
8+ Restart =on-failure
9+
10+ # Run as nobody but grant the ability to bind 80/443/444
11+ User =nobody
12+ Group =nobody
13+ AmbientCapabilities =CAP_NET_BIND_SERVICE CAP_NET_ADMIN
14+
15+ EnvironmentFile =-/etc/sysconfig/scripts-proxy
16+
17+ ExecStart =/usr/sbin/scripts-proxy $OPTIONS
18+
19+ [Install]
20+ WantedBy =multi-user.target
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ gems = pony:1.8 fcgi:0.9.2.1
2424upstream_gems = rubygem-pony rubygem-fcgi
2525upstream_eggs = python-authkit
2626upstream = openafs hesiod $(upstream_yum ) $(upstream_gems ) $(upstream_eggs ) moira zephyr zephyr.i686 python-zephyr python-afs python-moira python-hesiod athena-aclocal discuss fuse-python
27- oursrc = execsys tokensys accountadm httpdmods logview nss_nonlocal nss_nonlocal.i686 athrun php_scripts scripts-wizard scripts-base scripts-static-cat fuse-better-mousetrapfs scripts-munin-plugins scripts-krb5-localauth shackle
27+ oursrc = execsys tokensys accountadm httpdmods logview nss_nonlocal nss_nonlocal.i686 athrun php_scripts scripts-wizard scripts-base scripts-static-cat fuse-better-mousetrapfs scripts-munin-plugins scripts-krb5-localauth shackle scripts-proxy
2828allsrc = $(upstream ) $(oursrc )
2929oursrcdir = ${PWD}/../common/oursrc
3030patches = ${PWD}/../common/patches
Original file line number Diff line number Diff line change 1+ # https://fedoraproject.org/wiki/PackagingDrafts/Go
2+
3+ Name: scripts-proxy
4+ Version: 0.0
5+ Release: 0.%{scriptsversion }%{?dist }
6+ Summary: HTTP/SNI proxy for scripts.mit.edu
7+
8+ License: GPL+
9+ URL: http://scripts.mit.edu/
10+ Source0: %{name }.tar.gz
11+
12+ BuildRequires: (systemd-rpm-macros or systemd < 240)
13+ BuildRequires: go-rpm-macros
14+ BuildRequires: golang >= 1.6
15+
16+ %description
17+ scripts-proxy proxies HTTP and HTTPS+SNI requests to backend servers
18+ based on LDAP.
19+
20+ %global goipath github.com/mit-scripts/scripts/server/common/oursrc/scripts-proxy
21+ %global extractdir %{name }
22+
23+ %gometa
24+ %gopkg
25+
26+ %prep
27+ %goprep -k
28+
29+ %build
30+ %gobuild -o %{gobuilddir }/bin/scripts-proxy %{goipath }
31+
32+ %install
33+ %gopkginstall
34+ install -d %{buildroot }%{_sbindir }
35+ install -p -m 0755 %{gobuilddir }/bin/scripts-proxy %{buildroot }%{_sbindir }/scripts-proxy
36+ install -d %{buildroot }%{_unitdir }
37+ install -p -m 0644 ./scripts-proxy.service %{buildroot }%{_unitdir }/scripts-proxy.service
38+
39+ %files
40+ %defattr(0644, root, root)
41+ %{_unitdir }/scripts-proxy.service
42+ %attr(755,root,root) %{_sbindir }/scripts-proxy
43+ %gopkgfiles
44+
45+ %post
46+ %systemd_post scripts-proxy.service
47+
48+ %preun
49+ %systemd_preun scripts-proxy.service
50+
51+ %postun
52+ %systemd_postun_with_restart scripts-proxy.service
53+
54+ %changelog
55+ * Sun Mar 8 2020 Quentin Smith - 0.0-0
56+ - Initial packaging for scripts-proxy
You can’t perform that action at this time.
0 commit comments