Skip to content

Commit 4a37c56

Browse files
remicolletac000
authored andcommitted
pkg/rpm: Remove deprecated rpm spec file items
The 'Group' and 'BuildRoot' tags have been declared as deprecated by the Fedora project. Also, to quote the Fedora Packaging Guidelines The contents of the buildroot SHOULD NOT be removed in the first line of %install. The %defattr directive in the %files list SHOULD ONLY be used when setting a non-default value, or to reset to the default value after having set a non-default value. Link: <https://fedoraproject.org/wiki/RPMGroups> Link: <https://fedoraproject.org/wiki/Phase_out_buildroot_tag_(draft)> Link: <https://fedoraproject.org/wiki/Archive:PackagingDrafts/BuildRoot> Link: <https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections> [ Tweaked subject & added commit message - Andrew ] Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
1 parent ec11eb1 commit 4a37c56

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

pkg/rpm/unit.module.spec.in

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,10 @@ Release: %%RELEASE%%%{?dist}.ngx
3030
License: ASL 2.0
3131
Vendor: %%PACKAGE_VENDOR%%
3232
URL: https://unit.nginx.org/
33-
Group: System Environment/Daemons
3433

3534
Source0: unit-%{version}.tar.gz
3635
%%MODULE_SOURCES%%
3736

38-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
39-
4037
BuildRequires: pcre2-devel
4138

4239
Requires: unit-r%%UNIT_VERSION%%
@@ -77,7 +74,6 @@ make %%MODULE_MAKEARGS%%
7774
%{__mv} build build-nodebug
7875

7976
%install
80-
%{__rm} -rf %{buildroot}
8177
%{__mkdir} -p %{buildroot}%{_datadir}/doc/%%NAME%%
8278
if [ `basename %{SOURCE100}` == COPYRIGHT.%{name} ]; then
8379
%{__install} -m 644 -p %{SOURCE100} \
@@ -100,16 +96,12 @@ cd %{bdir}
10096
grep -v 'usr/src' debugfiles.list > debugfiles.list.new && mv debugfiles.list.new debugfiles.list
10197
cat /dev/null > debugsources.list
10298

103-
%clean
104-
%{__rm} -rf %{buildroot}
105-
10699
%post
107100
if [ $1 -eq 1 ]; then
108101
%%MODULE_POST%%
109102
fi
110103

111104
%files
112-
%defattr(-,root,root,-)
113105
%dir %{_datadir}/doc/%%NAME%%
114106
%{_datadir}/doc/%%NAME%%/*
115107
%%MODULE_FILES%%

pkg/rpm/unit.spec.in

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ Release: %%RELEASE%%%{?dist}.ngx
3131
License: ASL 2.0
3232
Vendor: %%PACKAGE_VENDOR%%
3333
URL: https://unit.nginx.org/
34-
Group: System Environment/Daemons
3534

3635
Source0: unit-%{version}.tar.gz
3736
Source1: unit.service
3837
Source2: unit-debug.service
3938
Source3: unit.example.config
4039
Source4: unit.logrotate
4140

42-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
4341
BuildRequires: systemd
4442
Requires(post): systemd
4543
Requires(preun): systemd
@@ -68,7 +66,6 @@ dynamically via an API.
6866
Summary: NGINX Unit (development files)
6967
Version: %%VERSION%%
7068
Release: %%RELEASE%%%{?dist}.ngx
71-
Group: Development/Libraries
7269
Requires: unit == %%VERSION%%-%%RELEASE%%%{?dist}.ngx
7370
%description devel
7471
Library and include files required for NGINX Unit modules development.
@@ -106,7 +103,6 @@ PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \
106103
%endif
107104

108105
%install
109-
%{__rm} -rf %{buildroot}
110106
%{__ln_s} build-nodebug build
111107
DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install
112108
%{__mkdir} -p %{buildroot}%{_bindir}
@@ -160,9 +156,6 @@ cd %{bdir}
160156
grep -v 'usr/src' debugfiles.list > debugfiles.list.new && mv debugfiles.list.new debugfiles.list
161157
cat /dev/null > debugsources.list
162158

163-
%clean
164-
%{__rm} -rf %{buildroot}
165-
166159
%post
167160
getent group unit >/dev/null || groupadd -r unit
168161
getent passwd unit >/dev/null || \
@@ -213,7 +206,6 @@ More info: https://unit.nginx.org/installation/#official-packages
213206
BANNER
214207

215208
%files
216-
%defattr(-,root,root,-)
217209
%attr(0755,root,root) %{_bindir}/unitc
218210
%attr(0755,root,root) %{_bindir}/setup-unit
219211
%attr(0755,root,root) %{_sbindir}/unitd

0 commit comments

Comments
 (0)