Accepting request 1206564 from devel:tools:scm
OBS-URL: https://build.opensuse.org/request/show/1206564 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/forgejo?expand=0&rev=16
This commit is contained in:
commit
5643d3ff6d
28
dont-strip.patch
Normal file
28
dont-strip.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
diff -rub forgejo-src-8.0.3/Makefile forgejo-src-8.0.3-patched/Makefile
|
||||||
|
--- forgejo-src-8.0.3/Makefile 2024-09-06 14:33:46.000000000 +0200
|
||||||
|
+++ forgejo-src-8.0.3-patched/Makefile 2024-10-09 15:01:55.191532699 +0200
|
||||||
|
@@ -784,7 +784,7 @@
|
||||||
|
|
||||||
|
.PHONY: install $(TAGS_PREREQ)
|
||||||
|
install: $(wildcard *.go)
|
||||||
|
- CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'
|
||||||
|
+ CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) install -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)'
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
build: frontend backend
|
||||||
|
@@ -816,13 +816,13 @@
|
||||||
|
go run $(GOVULNCHECK_PACKAGE) ./...
|
||||||
|
|
||||||
|
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
|
||||||
|
- CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
|
||||||
|
+ CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $@
|
||||||
|
|
||||||
|
forgejo: $(EXECUTABLE)
|
||||||
|
ln -f $(EXECUTABLE) forgejo
|
||||||
|
|
||||||
|
static-executable: $(GO_SOURCES) $(TAGS_PREREQ)
|
||||||
|
- CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags 'netgo osusergo $(TAGS)' -ldflags '-s -w -linkmode external -extldflags "-static" $(LDFLAGS)' -o $(EXECUTABLE)
|
||||||
|
+ CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -o $(EXECUTABLE)
|
||||||
|
|
||||||
|
.PHONY: release
|
||||||
|
release: frontend generate release-linux release-copy release-compress vendor release-sources release-check
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 9 13:22:28 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
|
||||||
|
|
||||||
|
- add dont-strip.patch for not stripping the main binary (so we can
|
||||||
|
create debuginfo package)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 9 05:46:17 UTC 2024 - Tuukka Pasanen <tuukka.pasanen@ilmi.fi>
|
||||||
|
|
||||||
|
- Add package environment-to-ini for OCI containers
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 10 07:49:29 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
|
Tue Sep 10 07:49:29 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
|
||||||
|
|
||||||
|
20
forgejo.spec
20
forgejo.spec
@ -51,6 +51,7 @@ Source10: %{name}.apparmor
|
|||||||
Source11: %{name}.firewalld
|
Source11: %{name}.firewalld
|
||||||
Source99: get-sources.sh
|
Source99: get-sources.sh
|
||||||
Patch0: custom-app.ini.patch
|
Patch0: custom-app.ini.patch
|
||||||
|
Patch1: dont-strip.patch
|
||||||
BuildRequires: golang-packaging
|
BuildRequires: golang-packaging
|
||||||
BuildRequires: golang(API) = 1.22
|
BuildRequires: golang(API) = 1.22
|
||||||
## node >= 20
|
## node >= 20
|
||||||
@ -111,6 +112,19 @@ Requires: selinux-policy-targeted
|
|||||||
This package adds SELinux enforcement to %{name}.
|
This package adds SELinux enforcement to %{name}.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%package environment-to-ini
|
||||||
|
Summary: Configuration params via environment variables for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description environment-to-ini
|
||||||
|
OCI Container users can change arbitrary configuration
|
||||||
|
via environment variables with this tool
|
||||||
|
|
||||||
|
Forgejo needs to use an ini file for configuration because the running
|
||||||
|
environment that starts the OCI container may not be the same as that used
|
||||||
|
by the hooks. An ini file also gives a good default and means that
|
||||||
|
users do not have to completely provide a full environment.
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Providing Git hosting for your project, friends, company or community? Forgejo (/for'd͡ʒe.jo/ inspired by forĝejo
|
Providing Git hosting for your project, friends, company or community? Forgejo (/for'd͡ʒe.jo/ inspired by forĝejo
|
||||||
– the Esperanto word for forge) has you covered with its intuitive interface, light and easy hosting and a lot of builtin functionality.
|
– the Esperanto word for forge) has you covered with its intuitive interface, light and easy hosting and a lot of builtin functionality.
|
||||||
@ -121,14 +135,15 @@ local-npm-registry %{_sourcedir} install --also=dev
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%sysusers_generate_pre %{SOURCE6} %{name} %{name}.conf
|
%sysusers_generate_pre %{SOURCE6} %{name} %{name}.conf
|
||||||
export EXTRA_GOFLAGS="-buildmode=pie -mod=vendor"
|
|
||||||
export TAGS="bindata timetzdata sqlite sqlite_unlock_notify"
|
export TAGS="bindata timetzdata sqlite sqlite_unlock_notify"
|
||||||
%make_build build
|
%make_build build
|
||||||
|
go build -buildmode=pie -mod=vendor -o contrib/environment-to-ini/environment-to-ini contrib/environment-to-ini/environment-to-ini.go
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -d %{buildroot}%{_bindir}
|
install -d %{buildroot}%{_bindir}
|
||||||
install -d %{buildroot}%{_datadir}/%{name}
|
install -d %{buildroot}%{_datadir}/%{name}
|
||||||
install -d %{buildroot}%{_datadir}/%{name}/{conf,https,mailer}
|
install -d %{buildroot}%{_datadir}/%{name}/{conf,https,mailer}
|
||||||
|
install -Dm0755 contrib/environment-to-ini/environment-to-ini %{buildroot}%{_bindir}
|
||||||
ln -s %{name} %{buildroot}%{_bindir}/gitea
|
ln -s %{name} %{buildroot}%{_bindir}/gitea
|
||||||
install -d %{buildroot}%{_sharedstatedir}/%{name}/{data,https,indexers,queues,repositories}
|
install -d %{buildroot}%{_sharedstatedir}/%{name}/{data,https,indexers,queues,repositories}
|
||||||
install -d %{buildroot}%{_sysconfdir}/%{name}
|
install -d %{buildroot}%{_sysconfdir}/%{name}
|
||||||
@ -216,4 +231,7 @@ semodule -r %{name} 2>/dev/null || :
|
|||||||
%files firewalld
|
%files firewalld
|
||||||
%{_prefix}/lib/firewalld/services/%{name}.xml
|
%{_prefix}/lib/firewalld/services/%{name}.xml
|
||||||
|
|
||||||
|
%files environment-to-ini
|
||||||
|
%{_bindir}/environment-to-ini
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user