[NetworkManager/f20] update makerepo.sh script

thaller thaller at fedoraproject.org
Sun Feb 16 14:39:12 UTC 2014


commit 1e5b6784aef63bbb8275fb400c175b4802ee22bf
Author: Thomas Haller <thaller at redhat.com>
Date:   Sat Feb 15 14:07:09 2014 +0100

    update makerepo.sh script
    
    - properly handle several commits in one patch
    - add parameter 'local' to call `fedpkg local`

 .gitignore         |    1 +
 makerepo.gitignore |  692 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 makerepo.sh        |  156 ++++++++++--
 3 files changed, 822 insertions(+), 27 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index bf8ed68..e22aa0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+*.makerepo-split.*
 network-manager-applet-0.6.5.tar.bz2
 NetworkManager-0.6.5.tar.bz2
 NetworkManager-0.7.0.svn2736.tar.gz
diff --git a/makerepo.gitignore b/makerepo.gitignore
new file mode 100644
index 0000000..7f52532
--- /dev/null
+++ b/makerepo.gitignore
@@ -0,0 +1,692 @@
+aclocal.m4
+autom4te.cache/output.0
+autom4te.cache/output.1
+autom4te.cache/requests
+autom4te.cache/traces.0
+autom4te.cache/traces.1
+build-aux/config.sub
+callouts/.libs/
+callouts/libtest-dispatcher-envp.la
+callouts/libtest_dispatcher_envp_la-nm-dispatcher-utils.lo
+callouts/Makefile
+callouts/Makefile.in
+callouts/nm-avahi-autoipd.action
+callouts/nm-avahi-autoipd-action.o
+callouts/nm-dispatcher.action
+callouts/nm-dispatcher-action.o
+callouts/nm-dispatcher-glue.h
+callouts/nm-dispatcher-utils.o
+callouts/org.freedesktop.nm_dispatcher.service
+callouts/tests/.libs/
+callouts/tests/Makefile
+callouts/tests/Makefile.in
+callouts/tests/test-dispatcher-envp
+callouts/tests/test-dispatcher-envp.o
+cli/completion/Makefile
+cli/completion/Makefile.in
+cli/Makefile
+cli/Makefile.in
+cli/src/common.o
+cli/src/connections.o
+cli/src/devices.o
+cli/src/.libs/
+cli/src/Makefile
+cli/src/Makefile.in
+cli/src/network-manager.o
+cli/src/nmcli
+cli/src/nmcli.o
+cli/src/settings.o
+cli/src/utils.o
+config.guess
+config.h
+config.log
+config.status
+config.sub
+configure
+data/Makefile
+data/Makefile.in
+data/NetworkManager-dispatcher.service
+data/NetworkManager.service
+data/NetworkManager-wait-online.service
+data/org.freedesktop.NetworkManager.service
+data/server.conf
+debugfiles.list
+debuglinks.list
+debugsources.list
+docs/api/Makefile
+docs/api/Makefile.in
+docs/libnm-glib/Makefile
+docs/libnm-glib/Makefile.in
+docs/libnm-util/Makefile
+docs/libnm-util/Makefile.in
+docs/Makefile
+docs/Makefile.in
+elfbins.list
+examples/C/glib/add-connection-dbus-glib
+examples/C/glib/add-connection-dbus-glib.o
+examples/C/glib/add-connection-libnm-glib
+examples/C/glib/add-connection-libnm-glib.o
+examples/C/glib/get-active-connections-dbus-glib
+examples/C/glib/get-active-connections-dbus-glib.o
+examples/C/glib/get-ap-info-libnm-glib
+examples/C/glib/get-ap-info-libnm-glib.o
+examples/C/glib/.libs/
+examples/C/glib/list-connections-dbus-glib
+examples/C/glib/list-connections-dbus-glib.o
+examples/C/glib/list-connections-libnm-glib
+examples/C/glib/list-connections-libnm-glib.o
+examples/C/glib/Makefile
+examples/C/glib/Makefile.in
+examples/C/glib/monitor-nm-running-dbus-glib
+examples/C/glib/monitor-nm-running-dbus-glib.o
+examples/C/glib/monitor-nm-running-GDBus
+examples/C/glib/monitor-nm-running-GDBus.o
+examples/C/glib/monitor-nm-state-GDBus
+examples/C/glib/monitor-nm-state-GDBus.o
+examples/C/Makefile
+examples/C/Makefile.in
+examples/C/qt/Makefile
+examples/C/qt/Makefile.in
+examples/dispatcher/Makefile
+examples/dispatcher/Makefile.in
+examples/Makefile
+examples/Makefile.in
+examples/python/dbus/Makefile
+examples/python/dbus/Makefile.in
+examples/python/gi/Makefile
+examples/python/gi/Makefile.in
+examples/python/Makefile
+examples/python/Makefile.in
+examples/ruby/Makefile
+examples/ruby/Makefile.in
+examples/shell/Makefile
+examples/shell/Makefile.in
+include/Makefile
+include/Makefile.in
+initscript/Arch/networkmanager
+initscript/Debian/NetworkManager
+initscript/linexa/networkmanager
+initscript/Mandriva/networkmanager
+initscript/RedHat/NetworkManager
+initscript/Slackware/rc.networkmanager
+initscript/SUSE/networkmanager
+introspection/all.xml
+introspection/Makefile
+introspection/Makefile.in
+libgsystem.la
+libgsystem_la-gsystem-console.lo
+libgsystem_la-gsystem-file-utils.lo
+libgsystem_la-gsystem-local-alloc.lo
+libgsystem_la-gsystem-log.lo
+libgsystem_la-gsystem-shutil.lo
+libgsystem_la-gsystem-subprocess-context.lo
+libgsystem_la-gsystem-subprocess.lo
+libndp/build-aux/config.sub
+libndp/config.guess
+libndp/config.log
+libndp/config.status
+libndp/config.sub
+libndp/include/Makefile
+libndp/libndp/libndp.pc
+libndp/libndp/Makefile
+libndp/libtool
+libndp/Makefile
+libndp/man/Makefile
+libndp/utils/Makefile
+libnm-glib/libdeprecated-nm-glib.la
+libnm-glib/libdeprecated_nm_glib_la-libnm_glib.lo
+libnm-glib/libnm-glib.la
+libnm-glib/libnm_glib_la-nm-access-point.lo
+libnm-glib/libnm_glib_la-nm-active-connection.lo
+libnm-glib/libnm_glib_la-nm-client.lo
+libnm-glib/libnm_glib_la-nm-dbus-helpers.lo
+libnm-glib/libnm_glib_la-nm-device-adsl.lo
+libnm-glib/libnm_glib_la-nm-device-bond.lo
+libnm-glib/libnm_glib_la-nm-device-bridge.lo
+libnm-glib/libnm_glib_la-nm-device-bt.lo
+libnm-glib/libnm_glib_la-nm-device-ethernet.lo
+libnm-glib/libnm_glib_la-nm-device-generic.lo
+libnm-glib/libnm_glib_la-nm-device-infiniband.lo
+libnm-glib/libnm_glib_la-nm-device.lo
+libnm-glib/libnm_glib_la-nm-device-modem.lo
+libnm-glib/libnm_glib_la-nm-device-olpc-mesh.lo
+libnm-glib/libnm_glib_la-nm-device-team.lo
+libnm-glib/libnm_glib_la-nm-device-vlan.lo
+libnm-glib/libnm_glib_la-nm-device-wifi.lo
+libnm-glib/libnm_glib_la-nm-device-wimax.lo
+libnm-glib/libnm_glib_la-nm-dhcp4-config.lo
+libnm-glib/libnm_glib_la-nm-dhcp6-config.lo
+libnm-glib/libnm_glib_la-nm-glib-enum-types.lo
+libnm-glib/libnm_glib_la-nm-ip4-config.lo
+libnm-glib/libnm_glib_la-nm-ip6-config.lo
+libnm-glib/libnm_glib_la-nm-object-cache.lo
+libnm-glib/libnm_glib_la-nm-object.lo
+libnm-glib/libnm_glib_la-nm-remote-connection.lo
+libnm-glib/libnm_glib_la-nm-remote-settings.lo
+libnm-glib/libnm_glib_la-nm-secret-agent.lo
+libnm-glib/libnm_glib_la-nm-types.lo
+libnm-glib/libnm_glib_la-nm-vpn-connection.lo
+libnm-glib/libnm_glib_la-nm-wimax-nsp.lo
+libnm-glib/libnm-glib.pc
+libnm-glib/libnm-glib-test
+libnm-glib/libnm-glib-test.la
+libnm-glib/libnm_glib_test_la-nm-access-point.lo
+libnm-glib/libnm_glib_test_la-nm-active-connection.lo
+libnm-glib/libnm_glib_test_la-nm-client.lo
+libnm-glib/libnm_glib_test_la-nm-dbus-helpers.lo
+libnm-glib/libnm_glib_test_la-nm-device-adsl.lo
+libnm-glib/libnm_glib_test_la-nm-device-bond.lo
+libnm-glib/libnm_glib_test_la-nm-device-bridge.lo
+libnm-glib/libnm_glib_test_la-nm-device-bt.lo
+libnm-glib/libnm_glib_test_la-nm-device-ethernet.lo
+libnm-glib/libnm_glib_test_la-nm-device-generic.lo
+libnm-glib/libnm_glib_test_la-nm-device-infiniband.lo
+libnm-glib/libnm_glib_test_la-nm-device.lo
+libnm-glib/libnm_glib_test_la-nm-device-modem.lo
+libnm-glib/libnm_glib_test_la-nm-device-olpc-mesh.lo
+libnm-glib/libnm_glib_test_la-nm-device-team.lo
+libnm-glib/libnm_glib_test_la-nm-device-vlan.lo
+libnm-glib/libnm_glib_test_la-nm-device-wifi.lo
+libnm-glib/libnm_glib_test_la-nm-device-wimax.lo
+libnm-glib/libnm_glib_test_la-nm-dhcp4-config.lo
+libnm-glib/libnm_glib_test_la-nm-dhcp6-config.lo
+libnm-glib/libnm_glib_test_la-nm-glib-enum-types.lo
+libnm-glib/libnm_glib_test_la-nm-ip4-config.lo
+libnm-glib/libnm_glib_test_la-nm-ip6-config.lo
+libnm-glib/libnm_glib_test_la-nm-object-cache.lo
+libnm-glib/libnm_glib_test_la-nm-object.lo
+libnm-glib/libnm_glib_test_la-nm-remote-connection.lo
+libnm-glib/libnm_glib_test_la-nm-remote-settings.lo
+libnm-glib/libnm_glib_test_la-nm-secret-agent.lo
+libnm-glib/libnm_glib_test_la-nm-types.lo
+libnm-glib/libnm_glib_test_la-nm-vpn-connection.lo
+libnm-glib/libnm_glib_test_la-nm-wimax-nsp.lo
+libnm-glib/libnm_glib_test-libnm-glib-test.o
+libnm-glib/libnm-glib-vpn.la
+libnm-glib/libnm_glib_vpn_la-nm-vpn-enum-types.lo
+libnm-glib/libnm_glib_vpn_la-nm-vpn-plugin.lo
+libnm-glib/libnm_glib_vpn_la-nm-vpn-plugin-ui-interface.lo
+libnm-glib/libnm_glib_vpn_la-nm-vpn-plugin-utils.lo
+libnm-glib/libnm-glib-vpn.pc
+libnm-glib/.libs/
+libnm-glib/Makefile
+libnm-glib/Makefile.in
+libnm-glib/NMClient-1.0.gir
+libnm-glib/NMClient-1.0.typelib
+libnm-glib/nm-glib-enum-types.c.stamp
+libnm-glib/nm-glib-enum-types.h.stamp
+libnm-glib/nm-secret-agent-glue.h
+libnm-glib/nm-vpn-enum-types.c.stamp
+libnm-glib/nm-vpn-enum-types.h.stamp
+libnm-glib/nm-vpn-plugin-glue.h
+libnm-glib/tests/.libs/
+libnm-glib/tests/Makefile
+libnm-glib/tests/Makefile.in
+libnm-glib/tests/test-remote-settings-client
+libnm-glib/tests/test-remote-settings-client.o
+libnm-util/crypto.lo
+libnm-util/crypto_nss.lo
+libnm-util/libnm-util.la
+libnm-util/libnm-util.pc
+libnm-util/.libs/
+libnm-util/libtest-crypto.la
+libnm-util/Makefile
+libnm-util/Makefile.in
+libnm-util/NetworkManager-1.0.gir
+libnm-util/NetworkManager-1.0.typelib
+libnm-util/nm-connection.lo
+libnm-util/nm-param-spec-specialized.lo
+libnm-util/nm-setting-8021x.lo
+libnm-util/nm-setting-adsl.lo
+libnm-util/nm-setting-bluetooth.lo
+libnm-util/nm-setting-bond.lo
+libnm-util/nm-setting-bridge.lo
+libnm-util/nm-setting-bridge-port.lo
+libnm-util/nm-setting-cdma.lo
+libnm-util/nm-setting-connection.lo
+libnm-util/nm-setting-generic.lo
+libnm-util/nm-setting-gsm.lo
+libnm-util/nm-setting-infiniband.lo
+libnm-util/nm-setting-ip4-config.lo
+libnm-util/nm-setting-ip6-config.lo
+libnm-util/nm-setting.lo
+libnm-util/nm-setting-olpc-mesh.lo
+libnm-util/nm-setting-ppp.lo
+libnm-util/nm-setting-pppoe.lo
+libnm-util/nm-setting-serial.lo
+libnm-util/nm-setting-team.lo
+libnm-util/nm-setting-team-port.lo
+libnm-util/nm-setting-vlan.lo
+libnm-util/nm-setting-vpn.lo
+libnm-util/nm-setting-wimax.lo
+libnm-util/nm-setting-wired.lo
+libnm-util/nm-setting-wireless.lo
+libnm-util/nm-setting-wireless-security.lo
+libnm-util/nm-utils-enum-types.c.stamp
+libnm-util/nm-utils-enum-types.h.stamp
+libnm-util/nm-utils-enum-types.lo
+libnm-util/nm-utils.lo
+libnm-util/nm-value-transforms.lo
+libnm-util/tests/certs/Makefile
+libnm-util/tests/certs/Makefile.in
+libnm-util/tests/.libs/
+libnm-util/tests/Makefile
+libnm-util/tests/Makefile.in
+libnm-util/tests/test-crypto
+libnm-util/tests/test-crypto.o
+libnm-util/tests/test-general
+libnm-util/tests/test-general.o
+libnm-util/tests/test-secrets
+libnm-util/tests/test-secrets.o
+libnm-util/tests/test-setting-8021x
+libnm-util/tests/test-setting-8021x.o
+libnm-util/tests/test-settings-defaults
+libnm-util/tests/test-settings-defaults.o
+.libs/libgsystem.a
+.libs/libgsystem.la
+.libs/libgsystem_la-gsystem-console.o
+.libs/libgsystem_la-gsystem-file-utils.o
+.libs/libgsystem_la-gsystem-local-alloc.o
+.libs/libgsystem_la-gsystem-log.o
+.libs/libgsystem_la-gsystem-shutil.o
+.libs/libgsystem_la-gsystem-subprocess-context.o
+.libs/libgsystem_la-gsystem-subprocess.o
+libtool
+Makefile
+Makefile.in
+man/Makefile
+man/Makefile.in
+man/nmcli.1
+man/nm-online.1
+man/nm-system-settings.conf.5
+NetworkManager.lang
+NetworkManager.pc
+po/ar.gmo
+po/as.gmo
+po/be at latin.gmo
+po/bg.gmo
+po/bn_IN.gmo
+po/bs.gmo
+po/ca.gmo
+po/cs.gmo
+po/da.gmo
+po/de.gmo
+po/dz.gmo
+po/el.gmo
+po/en_CA.gmo
+po/en_GB.gmo
+po/eo.gmo
+po/es.gmo
+po/et.gmo
+po/eu.gmo
+po/fi.gmo
+po/fr.gmo
+po/gl.gmo
+po/gu.gmo
+po/he.gmo
+po/hi.gmo
+po/hr.gmo
+po/hu.gmo
+po/id.gmo
+po/.intltool-merge-cache
+po/it.gmo
+po/ja.gmo
+po/ka.gmo
+po/kn.gmo
+po/ko.gmo
+po/ku.gmo
+policy/Makefile
+policy/Makefile.in
+policy/org.freedesktop.NetworkManager.policy
+policy/org.freedesktop.NetworkManager.policy.in
+po/lt.gmo
+po/lv.gmo
+po/Makefile
+po/Makefile.in
+po/mk.gmo
+po/ml.gmo
+po/mr.gmo
+po/nb.gmo
+po/ne.gmo
+po/nl.gmo
+po/oc.gmo
+po/or.gmo
+po/pa.gmo
+po/pl.gmo
+po/POTFILES
+po/pt_BR.gmo
+po/pt.gmo
+po/ru.gmo
+po/rw.gmo
+po/sk.gmo
+po/sl.gmo
+po/sq.gmo
+po/sr.gmo
+po/sr at latin.gmo
+po/stamp-it
+po/sv.gmo
+po/ta.gmo
+po/te.gmo
+po/th.gmo
+po/tr.gmo
+po/uk.gmo
+po/vi.gmo
+po/wa.gmo
+po/zh_CN.gmo
+po/zh_HK.gmo
+po/zh_TW.gmo
+src/config/tests/.libs/
+src/config/tests/Makefile
+src/config/tests/Makefile.in
+src/config/tests/nm-test-device.o
+src/config/tests/test-config
+src/config/tests/test-config.o
+src/devices/wimax/Makefile
+src/devices/wimax/Makefile.in
+src/dhcp-manager/Makefile
+src/dhcp-manager/Makefile.in
+src/dhcp-manager/nm-dhcp-helper
+src/dhcp-manager/nm_dhcp_helper-nm-dhcp-helper.o
+src/dhcp-manager/tests/.libs/
+src/dhcp-manager/tests/Makefile
+src/dhcp-manager/tests/Makefile.in
+src/dhcp-manager/tests/test-dhcp-dhclient
+src/dhcp-manager/tests/test-dhcp-dhclient.o
+src/errors.lo
+src/libNetworkManager.la
+src/.libs/
+src/main.o
+src/Makefile
+src/Makefile.in
+src/NetworkManager
+src/NetworkManagerUtils.lo
+src/nm-activation-request.lo
+src/nm-active-connection-glue.h
+src/nm-active-connection.lo
+src/nm-agent-manager.lo
+src/nm-atm-manager.lo
+src/nm-bluez-device.lo
+src/nm-bluez-manager.lo
+src/nm-call-store.lo
+src/nm-config-device.lo
+src/nm-config.lo
+src/nm-connection-provider.lo
+src/nm-connectivity.lo
+src/nm-dbus-manager.lo
+src/nm-default-wired-connection.lo
+src/nm-device-adsl.lo
+src/nm-device-bond.lo
+src/nm-device-bridge.lo
+src/nm-device-bt.lo
+src/nm-device-ethernet.lo
+src/nm-device-generic.lo
+src/nm-device-glue.h
+src/nm-device-gre.lo
+src/nm-device-infiniband.lo
+src/nm-device.lo
+src/nm-device-macvlan.lo
+src/nm-device-modem.lo
+src/nm-device-olpc-mesh.lo
+src/nm-device-team.lo
+src/nm-device-tun.lo
+src/nm-device-veth.lo
+src/nm-device-vlan.lo
+src/nm-device-wifi.lo
+src/nm-dhcp4-config.lo
+src/nm-dhcp6-config.lo
+src/nm-dhcp-client.lo
+src/nm-dhcp-dhclient.lo
+src/nm-dhcp-dhclient-utils.lo
+src/nm-dhcp-dhcpcd.lo
+src/nm-dhcp-manager.lo
+src/nm-dispatcher.lo
+src/nm-dns-dnsmasq.lo
+src/nm-dns-manager.lo
+src/nm-dnsmasq-manager.lo
+src/nm-dns-plugin.lo
+src/nm-dns-utils.lo
+src/nm-enum-types.c
+src/nm-enum-types.c.stamp
+src/nm-enum-types.h
+src/nm-enum-types.h.stamp
+src/nm-enum-types.lo
+src/nm-fake-platform.lo
+src/nm-fake-rdisc.lo
+src/nm-firewall-manager.lo
+src/nm-hostname-provider.lo
+src/nm-inotify-helper.lo
+src/nm-ip4-config.lo
+src/nm-ip6-config.lo
+src/nm-keyfile-connection.lo
+src/nm-linux-platform.lo
+src/nm-lndp-rdisc.lo
+src/nm-logging.lo
+src/nm-manager-auth.lo
+src/nm-manager.lo
+src/nm-modem-broadband.lo
+src/nm-modem.lo
+src/nm-modem-manager.lo
+src/nm-modem-old.lo
+src/nm-netlink-monitor.lo
+src/nm-platform.lo
+src/nm-policy-hosts.lo
+src/nm-policy.lo
+src/nm-posix-signals.lo
+src/nm-ppp-manager.lo
+src/nm-properties-changed-signal.lo
+src/nm-rdisc.lo
+src/nm-rfkill-manager.lo
+src/nm-secret-agent.lo
+src/nm-session-monitor-systemd.lo
+src/nm-session-utils.lo
+src/nm-settings-connection.lo
+src/nm-settings-error.lo
+src/nm-settings-glue.h
+src/nm-settings.lo
+src/nm-settings-utils.lo
+src/nm-sleep-monitor-systemd.lo
+src/nm-supplicant-config.lo
+src/nm-supplicant-interface.lo
+src/nm-supplicant-manager.lo
+src/nm-supplicant-settings-verify.lo
+src/nm-system-config-interface.lo
+src/nm-vpn-connection.lo
+src/nm-vpn-manager.lo
+src/nm-vpn-service.lo
+src/nm-wifi-ap.lo
+src/nm-wifi-ap-utils.lo
+src/platform/Makefile
+src/platform/Makefile.in
+src/platform/tests/dump
+src/platform/tests/dump.o
+src/platform/tests/.libs/
+src/platform/tests/Makefile
+src/platform/tests/Makefile.in
+src/platform/tests/monitor
+src/platform/tests/monitor.o
+src/platform/tests/nm-fake-platform.o
+src/platform/tests/nm-linux-platform.o
+src/platform/tests/nm-platform.o
+src/platform/tests/platform
+src/platform/tests/platform.o
+src/platform/tests/test-address-fake
+src/platform/tests/test_address_fake-nm-fake-platform.o
+src/platform/tests/test_address_fake-nm-linux-platform.o
+src/platform/tests/test_address_fake-nm-platform.o
+src/platform/tests/test_address_fake-test-address.o
+src/platform/tests/test_address_fake-test-common.o
+src/platform/tests/test-address-linux
+src/platform/tests/test_address_linux-nm-fake-platform.o
+src/platform/tests/test_address_linux-nm-linux-platform.o
+src/platform/tests/test_address_linux-nm-platform.o
+src/platform/tests/test_address_linux-test-address.o
+src/platform/tests/test_address_linux-test-common.o
+src/platform/tests/test-cleanup-fake
+src/platform/tests/test_cleanup_fake-nm-fake-platform.o
+src/platform/tests/test_cleanup_fake-nm-linux-platform.o
+src/platform/tests/test_cleanup_fake-nm-platform.o
+src/platform/tests/test_cleanup_fake-test-cleanup.o
+src/platform/tests/test_cleanup_fake-test-common.o
+src/platform/tests/test-cleanup-linux
+src/platform/tests/test_cleanup_linux-nm-fake-platform.o
+src/platform/tests/test_cleanup_linux-nm-linux-platform.o
+src/platform/tests/test_cleanup_linux-nm-platform.o
+src/platform/tests/test_cleanup_linux-test-cleanup.o
+src/platform/tests/test_cleanup_linux-test-common.o
+src/platform/tests/test-link-fake
+src/platform/tests/test_link_fake-nm-fake-platform.o
+src/platform/tests/test_link_fake-nm-linux-platform.o
+src/platform/tests/test_link_fake-nm-platform.o
+src/platform/tests/test_link_fake-test-common.o
+src/platform/tests/test_link_fake-test-link.o
+src/platform/tests/test-link-linux
+src/platform/tests/test_link_linux-nm-fake-platform.o
+src/platform/tests/test_link_linux-nm-linux-platform.o
+src/platform/tests/test_link_linux-nm-platform.o
+src/platform/tests/test_link_linux-test-common.o
+src/platform/tests/test_link_linux-test-link.o
+src/platform/tests/test-route-fake
+src/platform/tests/test_route_fake-nm-fake-platform.o
+src/platform/tests/test_route_fake-nm-linux-platform.o
+src/platform/tests/test_route_fake-nm-platform.o
+src/platform/tests/test_route_fake-test-common.o
+src/platform/tests/test_route_fake-test-route.o
+src/platform/tests/test-route-linux
+src/platform/tests/test_route_linux-nm-fake-platform.o
+src/platform/tests/test_route_linux-nm-linux-platform.o
+src/platform/tests/test_route_linux-nm-platform.o
+src/platform/tests/test_route_linux-test-common.o
+src/platform/tests/test_route_linux-test-route.o
+src/plugin.lo
+src/ppp-manager/.libs/
+src/ppp-manager/Makefile
+src/ppp-manager/Makefile.in
+src/ppp-manager/nm-pppd-plugin.la
+src/ppp-manager/nm-pppd-plugin.lo
+src/rdisc/Makefile
+src/rdisc/Makefile.in
+src/rdisc/tests/.libs
+src/rdisc/tests/Makefile
+src/rdisc/tests/Makefile.in
+src/rdisc/tests/nm-fake-rdisc.o
+src/rdisc/tests/nm-lndp-rdisc.o
+src/rdisc/tests/nm-logging.o
+src/rdisc/tests/nm-rdisc.o
+src/rdisc/tests/rdisc
+src/rdisc/tests/rdisc.o
+src/reader.lo
+src/settings/plugins/example/errors.lo
+src/settings/plugins/example/libnm-settings-plugin-example.la
+src/settings/plugins/example/.libs/
+src/settings/plugins/example/Makefile
+src/settings/plugins/example/Makefile.in
+src/settings/plugins/example/nm-example-connection.lo
+src/settings/plugins/example/plugin.lo
+src/settings/plugins/example/reader.lo
+src/settings/plugins/example/writer.lo
+src/settings/plugins/ifcfg-rh/errors.lo
+src/settings/plugins/ifcfg-rh/libifcfg-rh-io.la
+src/settings/plugins/ifcfg-rh/libnm-settings-plugin-ifcfg-rh.la
+src/settings/plugins/ifcfg-rh/.libs/
+src/settings/plugins/ifcfg-rh/Makefile
+src/settings/plugins/ifcfg-rh/Makefile.in
+src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.lo
+src/settings/plugins/ifcfg-rh/nm-ifcfg-rh-glue.h
+src/settings/plugins/ifcfg-rh/plugin.lo
+src/settings/plugins/ifcfg-rh/reader.lo
+src/settings/plugins/ifcfg-rh/shvar.lo
+src/settings/plugins/ifcfg-rh/tests/errors.o
+src/settings/plugins/ifcfg-rh/tests/.libs/
+src/settings/plugins/ifcfg-rh/tests/Makefile
+src/settings/plugins/ifcfg-rh/tests/Makefile.in
+src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile
+src/settings/plugins/ifcfg-rh/tests/network-scripts/Makefile.in
+src/settings/plugins/ifcfg-rh/tests/reader.o
+src/settings/plugins/ifcfg-rh/tests/shvar.o
+src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh
+src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.o
+src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh-utils
+src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh-utils.o
+src/settings/plugins/ifcfg-rh/tests/utils.o
+src/settings/plugins/ifcfg-rh/tests/writer.o
+src/settings/plugins/ifcfg-rh/utils.lo
+src/settings/plugins/ifcfg-rh/writer.lo
+src/settings/plugins/ifcfg-suse/Makefile
+src/settings/plugins/ifcfg-suse/Makefile.in
+src/settings/plugins/ifnet/Makefile
+src/settings/plugins/ifnet/Makefile.in
+src/settings/plugins/ifnet/tests/Makefile
+src/settings/plugins/ifnet/tests/Makefile.in
+src/settings/plugins/ifupdown/Makefile
+src/settings/plugins/ifupdown/Makefile.in
+src/settings/plugins/ifupdown/tests/Makefile
+src/settings/plugins/ifupdown/tests/Makefile.in
+src/settings/plugins/keyfile/errors.lo
+src/settings/plugins/keyfile/libkeyfile-io.la
+src/settings/plugins/keyfile/libnm-settings-plugin-keyfile.la
+src/settings/plugins/keyfile/.libs/
+src/settings/plugins/keyfile/Makefile
+src/settings/plugins/keyfile/Makefile.in
+src/settings/plugins/keyfile/nm-keyfile-connection.lo
+src/settings/plugins/keyfile/plugin.lo
+src/settings/plugins/keyfile/reader.lo
+src/settings/plugins/keyfile/tests/errors.o
+src/settings/plugins/keyfile/tests/keyfiles/Makefile
+src/settings/plugins/keyfile/tests/keyfiles/Makefile.in
+src/settings/plugins/keyfile/tests/.libs/
+src/settings/plugins/keyfile/tests/Makefile
+src/settings/plugins/keyfile/tests/Makefile.in
+src/settings/plugins/keyfile/tests/reader.o
+src/settings/plugins/keyfile/tests/test-keyfile
+src/settings/plugins/keyfile/tests/test-keyfile.o
+src/settings/plugins/keyfile/tests/utils.o
+src/settings/plugins/keyfile/tests/writer.o
+src/settings/plugins/keyfile/utils.lo
+src/settings/plugins/keyfile/writer.lo
+src/settings/plugins/Makefile
+src/settings/plugins/Makefile.in
+src/settings/tests/.libs/
+src/settings/tests/Makefile
+src/settings/tests/Makefile.in
+src/settings/tests/test-wired-defname
+src/settings/tests/test-wired-defname.o
+src/supplicant-manager/tests/.libs/
+src/supplicant-manager/tests/Makefile
+src/supplicant-manager/tests/Makefile.in
+src/supplicant-manager/tests/test-supplicant-config
+src/supplicant-manager/tests/test-supplicant-config.o
+src/tests/.libs/
+src/tests/Makefile
+src/tests/Makefile.in
+src/tests/test-dhcp-options
+src/tests/test_dhcp_options-test-dhcp-options.o
+src/tests/test-ip4-config
+src/tests/test-ip4-config.o
+src/tests/test-ip6-config
+src/tests/test-ip6-config.o
+src/tests/test-policy-hosts
+src/tests/test-policy-hosts.o
+src/tests/test-wifi-ap-utils
+src/tests/test-wifi-ap-utils.o
+src/utils.lo
+src/wifi-utils.lo
+src/wifi-utils-nl80211.lo
+src/wifi-utils-wext.lo
+src/writer.lo
+stamp-h1
+test/libnm-glib-test
+test/libnm_glib_test-libnm-glib-test.o
+test/.libs/
+test/Makefile
+test/Makefile.in
+test/nm-online
+test/nm-online.o
+tools/generate-settings-spec
+tools/generate-settings-spec.o
+tools/.libs/
+tools/Makefile
+tools/Makefile.in
+vapi/libnm-glib.vapi
+vapi/libnm-util.vapi
+vapi/Makefile
+vapi/Makefile.in
diff --git a/makerepo.sh b/makerepo.sh
index 4c47d0e..ff4b0f9 100755
--- a/makerepo.sh
+++ b/makerepo.sh
@@ -1,12 +1,73 @@
 #!/bin/bash
 
-set -vx
+#set -vx
 
 die() {
 	echo "$@" >&2
 	exit 1
 }
 
+DIRNAME=NetworkManager-0.9.9.0
+
+split_patch() {
+    # patches created with git-format-patch that contain more then one
+    # commit, cannot be easily reverted with patch, because patch works
+    # the patches from top down. In case of -R however, we have to apply
+    # the latest patches first.
+
+    read -r -d '' PERL_PROG <<-'EOF'
+		use strict;
+		use warnings;
+
+		open FILE, $ARGV[0]  or die "Can't open $ARGV[0] for reading: $!\n";
+
+		local $/ = undef;
+		my $file = <FILE>;
+		close FILE;
+
+		my @patches = split(/\n\nFrom /,$file);
+
+		my $i = $#patches + 1;
+		my $patch;
+		my $first = 1;
+		foreach $patch (@patches){
+			if ($first) {
+				$first = 0;
+			} else {
+				$patch = "From $patch"
+			}
+			my $o = sprintf("%s%s%03d", $ARGV[0], $ARGV[1], $i);
+			open(my $OUT, ">", $o) or die "Can't open $o for writing: $!";
+			$i--;
+
+			print $OUT "$patch";
+
+			close $OUT;
+		}
+	EOF
+
+    perl -e "$PERL_PROG" "$1" "$2"
+}
+
+unset REVERT_COUNT
+LOCAL=0
+for ARG; do
+    case "$ARG" in
+        local|-l)
+            LOCAL=1
+            ;;
+        *)
+            if [ -n "${REVERT_COUNT+x}" ]; then
+                die "invalid argument \"$ARG\""
+            fi
+            case "$ARG" in
+                ''|*[!0-9]*) die "invalid argument \"$ARG\": should be an integer (number of patches to revert)";;
+            esac
+            REVERT_COUNT="$ARG"
+            ;;
+    esac
+done
+
 srcdir="$(dirname "$(readlink -f "$0")")"
 
 (test -f $srcdir/NetworkManager.spec \
@@ -18,7 +79,7 @@ srcdir="$(dirname "$(readlink -f "$0")")"
 # generate the clean dir
 fedpkg prep || die "error while \`fedpkg prep\`"
 
-pushd NetworkManager-0.9.9.0
+pushd "$DIRNAME"
     git init .
     # if you have a local clone of NetworkManager, symlink
     # it as ../.git/local.
@@ -32,44 +93,85 @@ pushd NetworkManager-0.9.9.0
     git commit --allow-empty -m '*** empty initial commit'  # useful, to rebase the following commit
     git add -f -A .
     git commit -m '*** add all'
-    cat <<EOF > .gitignore
-EOF
+    cat ../makerepo.gitignore > .gitignore
     git rm --cached -r .
     git add .
     git commit -m "*** clean state (ignored files removed)"
 
-    REVERT_COUNT="$(echo "${1-1}" | sed -n 's/^\([0-9]\+\)$/\1/p' | head -n1)"
-    if [[ "$REVERT_COUNT" != "" ]]; then
-        echo "revert the last $REVERT_COUNT commits"
-        PATCH_LIST="$(sed -n 's/^Patch\([0-9]\+\): \+\(.*\)$/\1 \2/p' ../NetworkManager.spec | sort -n | tail -n $REVERT_COUNT)"
-        echo "$PATCH_LIST"
-        # revert and last patches...
-        for i in $(seq "$REVERT_COUNT" -1 1); do
-            LAST_PATCH_N=$(echo "$PATCH_LIST" | sed -n "$i"'s/^\([0-9]\+\) \+.*$/\1/p')
-            LAST_PATCH=$(  echo "$PATCH_LIST" | sed -n "$i"'s/^\([0-9]\+\) \+\(.*\)$/\2/p')
-            echo "revert Patch$LAST_PATCH_N \"$LAST_PATCH\"..."
-            patch --no-backup-if-mismatch -R -p1 < "../$LAST_PATCH" || die "error reverting Patch$LAST_PATCH_N $LAST_PATCH"
+    if [[ "$REVERT_COUNT" == "" || $REVERT_COUNT -gt 0 ]]; then
+
+        # parse the list of patches
+        IFS=$'\n' read -rd '' -a PATCH_LIST <<<"$(sed -n 's/^Patch\([0-9]\+\): \+\(.*\)$/\1 \2/p' ../NetworkManager.spec | sort -n)"
+
+        # truncate the list of patches to revert/reapply
+        if [[ "$REVERT_COUNT" == "" || "$REVERT_COUNT" -gt ${#PATCH_LIST[@]} ]]; then
+            echo "revert all ${#PATCH_LIST[@]} patches"
+        else
+            echo "revert the last $REVERT_COUNT patches of ${#PATCH_LIST[@]}"
+            PATCH_LIST=("${PATCH_LIST[@]:$((${#PATCH_LIST[@]} - $REVERT_COUNT))}")
+        fi
+
+        # split the list in index and patch file name
+        PATCH_LIST_N=()
+        for i in ${!PATCH_LIST[@]}; do
+            LAST_PATCH_N[$i]=$(echo "${PATCH_LIST[$i]}" | sed -n 's/^\([0-9]\+\) \+.*$/\1/p')
+            LAST_PATCH[$i]=$(  echo "${PATCH_LIST[$i]}" | sed -n 's/^\([0-9]\+\) \+\(.*\)$/\2/p')
+        done
+
+        # revert and patches in reverse order...
+        BASECOMMIT=("`git rev-parse HEAD`")
+        for j in "${!PATCH_LIST[@]}"; do
+            i=$((${#PATCH_LIST[@]} - $j - 1))
+            echo "revert Patch${LAST_PATCH_N[$i]} \"${LAST_PATCH[$i]}\"..."
+            patch -f --no-backup-if-mismatch -R -p1 < "../${LAST_PATCH[$i]}" || (
+                # error applying patch. Maybe we have a multi line patch...
+
+                split_patch "../${LAST_PATCH[$i]}" ".makerepo-split."
+
+                git reset --hard
+                git clean -fdx
+                for p in "../${LAST_PATCH[$i]}".makerepo-split.*; do
+                    echo ">>> try split part $p for ${LAST_PATCH[$i]}"
+                    patch --no-backup-if-mismatch -R -p1 < "$p" || die "error reverting Patch${LAST_PATCH_N[$i]} ${LAST_PATCH[$i]}"
+                done
+            )
             git add .
-            git commit --allow-empty -a -m "<< revert Patch$LAST_PATCH_N \"$LAST_PATCH\""
+            git commit --allow-empty -a -m "<< revert Patch${LAST_PATCH_N[$i]} \"${LAST_PATCH[$i]}\""
+            BASECOMMIT=("`git rev-parse HEAD`" "${BASECOMMIT[@]}")
         done
-        BASECOMMIT=`git rev-parse HEAD`
-        for i in $(seq 1 "$REVERT_COUNT"); do
-            LAST_PATCH_N=$(echo "$PATCH_LIST" | sed -n "$i"'s/^\([0-9]\+\) \+.*$/\1/p')
-            LAST_PATCH=$(  echo "$PATCH_LIST" | sed -n "$i"'s/^\([0-9]\+\) \+\(.*\)$/\2/p')
-            echo "reapply Patch$LAST_PATCH_N \"$LAST_PATCH\"..."
+
+        # reapply the patches
+        for i in ${!PATCH_LIST[@]}; do
+            echo "reapply Patch${LAST_PATCH_N[$i]} \"${LAST_PATCH[$i]}\"..."
+
+            # create an empty commit, indicating the commit before starting to reapply
+            BASECOMMIT_REVERT="${BASECOMMIT[$((i))]}"
+            COMMIT_MSG="$(git log -n1 --format='%s' "$BASECOMMIT_REVERT" | sed 's/<< revert \(Patch.*"\)$/-- before reapplying \1/')"
+            git commit --allow-empty -m "$COMMIT_MSG"
+
             # first try git-am to preserve the commit message, otherwise just revert the last commit
-            git am "../$LAST_PATCH" || (
-                git revert --no-edit $BASECOMMIT~$((i-1))
-                COMMIT_MSG="$(git log -n1 --format='%s' $BASECOMMIT~$((i-1)) | sed 's/<< revert \(Patch.*"\)$/>> reapply \1/')"
-                git commit --amend -m "$COMMIT_MSG"
+            git am "../${LAST_PATCH[$i]}" || (
+                git am --abort
+                COMMIT_MSG="$(git log -n1 --format='%s' "$BASECOMMIT_REVERT" | sed 's/<< revert \(Patch.*"\)$/>> reapply \1/')"
+                git commit --allow-empty -m "$COMMIT_MSG"
             )
 
-            # The tree to the version before should be identical. Just to be sure, reset it.
-            git reset $BASECOMMIT~$((i)) -- .
+            # The tree to the version before should be identical after reapplying the patch.
+            # Just to be sure, reset the commit.
+            git reset "${BASECOMMIT[$((i+1))]}" -- .
             EDITOR=true git commit --amend --no-edit
             git reset --hard HEAD
         done
     fi
 popd
 
+if [[ $LOCAL != 0 ]]; then
+    rm -rf ./.makerepo.git/
+    mv "$DIRNAME/.git" ./.makerepo.git/
+    fedpkg local
+    mv ./.makerepo.git/ "$DIRNAME/.git"
+    pushd "$DIRNAME"
+        git checkout -- .gitignore
+    popd
+fi
 


More information about the scm-commits mailing list