Discussion:
[netcf-devel] [PATCH 0/2] a couple more small changes to the spec file
Laine Stump
2018-08-16 00:20:05 UTC
Permalink
similar changes were recently made to the libvirt spec file.

Laine Stump (2):
rpm: simplify applying patches during rpmbuild
rpm: remove unused Group:

netcf.spec.in | 39 +--------------------------------------
1 file changed, 1 insertion(+), 38 deletions(-)

--
2.14.4
_______________________________________________
netcf-devel mailing list -- netcf-***@lists.fedorahosted.org
To unsubscribe send an email to netcf-devel-***@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/netcf-***@lists.fedorahosted.org/message/J7VIMRQJN2K6YC4UT3DQKMP7X
Laine Stump
2018-08-16 00:20:07 UTC
Permalink
This has apparently not been needed since the days of RHEL5, which was
never supported by netcf anyway.

https://fedoraproject.org/wiki/RPMGroups

Signed-off-by: Laine Stump <***@laine.org>
---
netcf.spec.in | 1 -
1 file changed, 1 deletion(-)

diff --git a/netcf.spec.in b/netcf.spec.in
index 19cff4a..51b67e8 100644
--- a/netcf.spec.in
+++ b/netcf.spec.in
@@ -3,7 +3,6 @@ Version: @VERSION@
Release: 1%{?dist}%{?extra_release}
Summary: Cross-platform network configuration library

-Group: System Environment/Libraries
License: LGPLv2+
URL: https://pagure.io/netcf/
Source: https://releases.pagure.org/netcf/%{name}-%{version}.tar.gz
--
2.14.4
_______________________________________________
netcf-devel mailing list -- netcf-***@lists.fedorahosted.org
To unsubscribe send an email to netcf-devel-***@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/netcf-***@lists.fedorahosted.org/message/JAVBTRHJMSBW45MZEXWANSFSG3RYTBTX
Daniel P. Berrangé
2018-08-16 07:58:20 UTC
Permalink
Post by Laine Stump
This has apparently not been needed since the days of RHEL5, which was
never supported by netcf anyway.
https://fedoraproject.org/wiki/RPMGroups
---
netcf.spec.in | 1 -
1 file changed, 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <***@redhat.com>

Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
_______________________________________________
netcf-devel mailing list -- netcf-***@lists.fedorahosted.org
To unsubscribe send an email to netcf-devel-***@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/netcf-***@lists.fedorahosted.org/mess
Laine Stump
2018-08-16 00:20:06 UTC
Permalink
All supported distroes that use RPM builds have %autosetup support, so we
no longer need to run git manually to apply patches.

Signed-off-by: Laine Stump <***@laine.org>
---
netcf.spec.in | 38 +-------------------------------------
1 file changed, 1 insertion(+), 37 deletions(-)

diff --git a/netcf.spec.in b/netcf.spec.in
index 883ed1a..19cff4a 100644
--- a/netcf.spec.in
+++ b/netcf.spec.in
@@ -96,43 +96,7 @@ Group: System Environment/Libraries
The libraries for %{name}.

%prep
-%setup -q
-
-# Patches have to be stored in a temporary file because RPM has
-# a limit on the length of the result of any macro expansion;
-# if the string is longer, it's silently cropped
-%{lua:
- tmp = os.tmpname();
- f = io.open(tmp, "w+");
- count = 0;
- for i, p in ipairs(patches) do
- f:write(p.."\n");
- count = count + 1;
- end;
- f:close();
- print("PATCHCOUNT="..count.."\n")
- print("PATCHLIST="..tmp.."\n")
-}
-
-git init -q
-git config user.name rpm-build
-git config user.email rpm-build
-git config gc.auto 0
-git add .
-git commit -q -a --author 'rpm-build <rpm-build>' \
- -m '%{name}-%{version} base'
-
-COUNT=$(grep '\.patch$' $PATCHLIST | wc -l)
-if [ $COUNT -ne $PATCHCOUNT ]; then
- echo "Found $COUNT patches in $PATCHLIST, expected $PATCHCOUNT"
- exit 1
-fi
-if [ $COUNT -gt 0 ]; then
- xargs git am <$PATCHLIST || exit 1
-fi
-echo "Applied $COUNT patches"
-rm -f $PATCHLIST
-
+%autosetup -S git_am

%build
%if %{with_libnl1}
--
2.14.4
_______________________________________________
netcf-devel mailing list -- netcf-***@lists.fedorahosted.org
To unsubscribe send an email to netcf-devel-***@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/netcf-***@lists.fedorahos
Daniel P. Berrangé
2018-08-16 07:58:05 UTC
Permalink
Post by Laine Stump
All supported distroes that use RPM builds have %autosetup support, so we
no longer need to run git manually to apply patches.
---
netcf.spec.in | 38 +-------------------------------------
1 file changed, 1 insertion(+), 37 deletions(-)
Reviewed-by: Daniel P. Berrangé <***@redhat.com>


Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
_______________________________________________
netcf-devel mailing list -- netcf-***@lists.fedorahosted.org
To unsubscribe send an email to netcf-devel-***@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/netcf-***@lists.fedorahosted.org/message/W2GTPHTUCOOQ2M3PXQLLE
Loading...