From 44c34a7adc620ffffc81b68bc0bba22288849649 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 13 Oct 2014 21:38:36 +0200 Subject: [PATCH 1/4] build: Don't leak generated files into distribution gdbus-codegen will generate code that will need a too recent version of glib. --- callouts/Makefile.am | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/callouts/Makefile.am b/callouts/Makefile.am index 1c5f39566d..2f725b0705 100644 --- a/callouts/Makefile.am +++ b/callouts/Makefile.am @@ -53,7 +53,7 @@ nm_dispatcher_LDADD = \ noinst_LTLIBRARIES += libnmdbus-dispatcher.la -libnmdbus_dispatcher_la_SOURCES = \ +nodist_libnmdbus_dispatcher_la_SOURCES = \ nmdbus-dispatcher.c \ nmdbus-dispatcher.h @@ -69,10 +69,6 @@ nmdbus-dispatcher.h: nm-dispatcher.xml nmdbus-dispatcher.c: nmdbus-dispatcher.h @true -BUILT_SOURCES = \ - nmdbus-dispatcher.c \ - nmdbus-dispatcher.h - ########################################### # dispatcher envp ########################################### @@ -113,7 +109,7 @@ install-data-hook: $(mkinstalldirs) -m 0755 $(DESTDIR)$(dispatcherdir)/pre-down.d $(mkinstalldirs) -m 0755 $(DESTDIR)$(dispatcherdir)/pre-up.d -CLEANFILES = $(BUILT_SOURCES) $(dbusactivation_DATA) +CLEANFILES = $(nodist_libnmdbus_dispatcher_la_SOURCES) $(dbusactivation_DATA) EXTRA_DIST = \ $(dbusservice_DATA) \ From 1f631cd08d0f01cd118e7222822518d62916f117 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 13 Oct 2014 20:58:05 +0200 Subject: [PATCH 2/4] contrib/rpm: Don't exclude files that are not built RPM still insist that they need to exist in order to be excluded. --- contrib/fedora/rpm/NetworkManager.spec | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index be95bfc8ca..5c5f0a229b 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -528,16 +528,12 @@ fi %files adsl %defattr(-,root,root,0755) %{_libdir}/%{name}/libnm-device-plugin-adsl.so -%else -%exclude %{_libdir}/%{name}/libnm-device-plugin-adsl.so %endif %if 0%{?with_bluetooth} %files bluetooth %defattr(-,root,root,0755) %{_libdir}/%{name}/libnm-device-plugin-bluetooth.so -%else -%exclude %{_libdir}/%{name}/libnm-device-plugin-bluetooth.so %endif %if 0%{?with_team} @@ -550,8 +546,6 @@ fi %files wifi %defattr(-,root,root,0755) %{_libdir}/%{name}/libnm-device-plugin-wifi.so -%else -%exclude %{_libdir}/%{name}/libnm-device-plugin-wifi.so %endif %if 0%{?with_wwan} @@ -559,17 +553,12 @@ fi %defattr(-,root,root,0755) %{_libdir}/%{name}/libnm-device-plugin-wwan.so %{_libdir}/%{name}/libnm-wwan.so -%else -%exclude %{_libdir}/%{name}/libnm-device-plugin-wwan.so -%exclude %{_libdir}/%{name}/libnm-wwan.so %endif %if 0%{?with_wimax} %files wimax %defattr(-,root,root,0755) %{_libdir}/%{name}/libnm-device-plugin-wimax.so -%else -%exclude %{_libdir}/%{name}/libnm-device-plugin-wimax.so %endif %files devel From 5d763a83759eaba3a9ec72767fa6e63c0bfba146 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 13 Oct 2014 20:58:05 +0200 Subject: [PATCH 3/4] contrib/rpm: Fix Fedora 19 build Too old to have recent enough ModemManager. --- contrib/fedora/rpm/NetworkManager.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 5c5f0a229b..4ee0a3eb4d 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -47,6 +47,12 @@ %global with_wimax 1 %endif +# ModemManager on Fedora < 20 too old for Bluetooth && wwan +%if (0%{?fedora} && 0%{?fedora} < 20) +%global with_bluetooth 0 +%global with_wwan 0 +%endif + # Bluetooth requires the WWAN plugin %if 0%{?with_bluetooth} %global with_wwan 1 @@ -154,7 +160,7 @@ BuildRequires: wimax-devel BuildRequires: systemd >= 200-3 systemd-devel BuildRequires: libsoup-devel BuildRequires: libndp-devel >= 1.0 -%if 0%{?with_wwan} && (0%{?rhel} || (0%{?fedora} && 0%{?fedora} > 19)) +%if 0%{?with_bluetooth} || (0%{?with_wwan} && (0%{?rhel} || (0%{?fedora} && 0%{?fedora} > 19))) BuildRequires: ModemManager-glib-devel >= 1.0 %endif %if 0%{?with_nmtui} From 479dd171ae040ee9a281ccb3a57ccf8517406eaa Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 13 Oct 2014 22:34:41 +0200 Subject: [PATCH 4/4] contrib/rpm: Count all predecessors in revision number The revision number of the RPM (as build by contrib/rpm) should be increasing so that newer packages can be installed using `yum install` and older packages can be downgraded using `yum downgrade`. By counting only --first-parent, the following example turns out wrong. Note the duplicate revision numbers. -- A(100)----------------------------F(101)----G(102) \ / B(101)----C(102)----D(103)----E(104) Just count *all* parent commits --- contrib/fedora/rpm/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/fedora/rpm/build.sh b/contrib/fedora/rpm/build.sh index 6b648f3db4..e70eb21491 100755 --- a/contrib/fedora/rpm/build.sh +++ b/contrib/fedora/rpm/build.sh @@ -62,7 +62,7 @@ exec > >(tee "$BUILDLOG") exec 2>&1 UUID=`uuidgen` -RELEASE_VERSION="${RELEASE_VERSION:-$(git rev-list --first-parent HEAD | wc -l)}" +RELEASE_VERSION="${RELEASE_VERSION:-$(git rev-list HEAD | wc -l)}" VERSION="${VERSION:-$(get_version || die "Could not read $VERSION")}" COMMIT_FULL="${COMMIT_FULL:-$(git rev-parse --verify HEAD || die "Error reading HEAD revision")}" COMMIT="${COMMIT:-$(git rev-parse --verify HEAD | sed 's/^\(.\{10\}\).*/\1/' || die "Error reading HEAD revision")}"