The following patch series allows you to build a working tarball with 'make dist' and not have to rerun the autogen.sh script to build it. It also updates .gitignore when you're working that it ignores the files built up in the process of running make.
Doug Goldstein (4): Reorganize .gitignore while adding entries build: enable builds to work from the tarball Fix make distcheck Fix categories for .desktop entries to be valid
.gitignore | 31 +++++++++---- Makefile.am | 3 +- autogen.sh | 4 -- config/Makefile.am | 58 +++++++++++++----------- config/firewall-applet.desktop.in | 2 +- config/firewall-config.desktop.in | 2 +- po/POTFILES.in | 89 +++++++++++++++++++++++++++++++++++++ po/POTFILES.in.in | 16 ------- src/Makefile.am | 31 +++++-------- 9 files changed, 158 insertions(+), 78 deletions(-) create mode 100644 po/POTFILES.in delete mode 100644 po/POTFILES.in.in
Added a bunch of entries for files that exist after running 'make'. Additionally I reorganized it based on pattern matching and full paths as I've seen other projects do like libvirt and qemu. --- .gitignore | 31 +++++++++++++++++++++---------- 1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/.gitignore b/.gitignore index 365b4db..f2551e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,22 @@ -aclocal.m4 -configure +/aclocal.m4 +/autom4te.cache +/config.cache +/config.guess +/config.log +/config.status +/config/firewall-applet.desktop +/config/firewall-config.desktop +/config/org.fedoraproject.FirewallApplet.gschema.valid +/config/org.fedoraproject.FirewallApplet.gschema.xml +/config/org.fedoraproject.FirewallD1.policy +/configure +/doc/man/man1/*.1 +/doc/man/man5/*.5 +/doxygen.conf +/firewalld-*.tar.bz2 +/po/* +/src/firewall/config/__init__.py +Makefile Makefile.in -config/Makefile.in -doc/Makefile.in -doc/man/Makefile.in -doc/man/man1/Makefile.in -po/Makefile.in.in -po/POTFILES.in -po/LINGUAS -src/Makefile.in +!/po/*.po +!/po/POTFILES.in
Currently builds from the tarball always require you to run autogen.sh, this allows you to build from just the tarball. --- autogen.sh | 4 -- po/POTFILES.in | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++ po/POTFILES.in.in | 16 --------- 3 files changed, 89 insertions(+), 20 deletions(-) create mode 100644 po/POTFILES.in delete mode 100644 po/POTFILES.in.in
diff --git a/autogen.sh b/autogen.sh index eaa895d..2d515cb 100755 --- a/autogen.sh +++ b/autogen.sh @@ -9,10 +9,6 @@ cd $srcdir rm -rf $srcdir/autom* rm -f $srcdir/config.*
-# create po/POTFILES.in -rm -f po/POTFILES.in -for i in $(cat po/POTFILES.in.in); do echo $i>>po/POTFILES.in; done - # create po/LINGUAS ls po/*.po | sed -e 's/.po//' | sed -e 's/po///' > po/LINGUAS
diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..85d7695 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,89 @@ +config/org.fedoraproject.FirewallD1.policy.in +config/firewall-applet.desktop.in +config/firewall-config.desktop.in +config/icmptypes/destination-unreachable.xml +config/icmptypes/echo-reply.xml +config/icmptypes/echo-request.xml +config/icmptypes/parameter-problem.xml +config/icmptypes/redirect.xml +config/icmptypes/router-advertisement.xml +config/icmptypes/router-solicitation.xml +config/icmptypes/source-quench.xml +config/icmptypes/time-exceeded.xml +config/services/amanda-client.xml +config/services/bacula-client.xml +config/services/bacula.xml +config/services/cluster-suite.xml +config/services/dhcpv6-client.xml +config/services/dns.xml +config/services/ftp.xml +config/services/http.xml +config/services/https.xml +config/services/imaps.xml +config/services/ipp-client.xml +config/services/ipp.xml +config/services/ipsec.xml +config/services/libvirt-tls.xml +config/services/libvirt.xml +config/services/mdns.xml +config/services/nfs.xml +config/services/ntp.xml +config/services/openvpn.xml +config/services/pop3s.xml +config/services/radius.xml +config/services/samba-client.xml +config/services/samba.xml +config/services/smtp.xml +config/services/ssh.xml +config/services/telnet.xml +config/services/tftp-client.xml +config/services/tftp.xml +config/zones/block.xml +config/zones/dmz.xml +config/zones/drop.xml +config/zones/external.xml +config/zones/home.xml +config/zones/internal.xml +config/zones/public.xml +config/zones/trusted.xml +config/zones/work.xml +src/firewall/__init__.py +src/firewall/client.py +src/firewall/dbus_utils.py +src/firewall/errors.py +src/firewall/functions.py +src/firewall/config/dbus.py +src/firewall/core/__init__.py +src/firewall/core/base.py +src/firewall/core/ebtables.py +src/firewall/core/fw.py +src/firewall/core/fw_config.py +src/firewall/core/fw_direct.py +src/firewall/core/fw_icmptype.py +src/firewall/core/fw_service.py +src/firewall/core/fw_zone.py +src/firewall/core/ipXtables.py +src/firewall/core/logger.py +src/firewall/core/modules.py +src/firewall/core/prog.py +src/firewall/core/watcher.py +src/firewall/core/io/__init__.py +src/firewall/core/io/firewalld_conf.py +src/firewall/core/io/icmptype.py +src/firewall/core/io/io_object.py +src/firewall/core/io/service.py +src/firewall/core/io/zone.py +src/firewall/server/__init__.py +src/firewall/server/config.py +src/firewall/server/config_icmptype.py +src/firewall/server/config_service.py +src/firewall/server/config_zone.py +src/firewall/server/decorators.py +src/firewall/server/firewalld.py +src/firewall/server/server.py +src/firewalld +src/firewall-applet +src/firewall-cmd +src/firewall-config +src/firewall-config.glade +src/firewall-offline-cmd diff --git a/po/POTFILES.in.in b/po/POTFILES.in.in deleted file mode 100644 index b40088b..0000000 --- a/po/POTFILES.in.in +++ /dev/null @@ -1,16 +0,0 @@ -config/org.fedoraproject.FirewallD*.policy.in -config/firewall-*.desktop.in -config/icmptypes/*.xml -config/services/*.xml -config/zones/*.xml -src/firewall/*.py -src/firewall/config/*.py -src/firewall/core/*.py -src/firewall/core/io/*.py -src/firewall/server/*.py -src/firewalld -src/firewall-applet -src/firewall-cmd -src/firewall-config -src/firewall-config.glade -src/firewall-offline-cmd
A series of changes to the build system get make distcheck to actually succeed --- Makefile.am | 3 +- config/Makefile.am | 58 ++++++++++++++++++++++++++++----------------------- src/Makefile.am | 31 ++++++++++----------------- 3 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/Makefile.am b/Makefile.am index dde5b48..fc07dd5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,8 @@ SUBDIRS = config doc po src EXTRA_DIST = \ COPYING \ autogen.sh \ - ${PACKAGE_NAME}.spec + ${PACKAGE_NAME}.spec \ + fix_python_shebang.sh
CLEANFILES = *~ *# .#* *.tar*
diff --git a/config/Makefile.am b/config/Makefile.am index a511adc..e990ea0 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -4,11 +4,11 @@ dist_sconf_DATA = firewalld.conf
desktop_FILES = firewall-applet.desktop.in firewall-config.desktop.in desktopdir = $(datadir)/applications -dist_desktop_DATA = $(desktop_FILES:.in=) +desktop_DATA = $(desktop_FILES:.in=)
polkit1_action_FILES = org.fedoraproject.FirewallD1.policy.in polkit1_actiondir = $(datadir)/polkit-1/actions -dist_polkit1_action_DATA = $(polkit1_action_FILES:.in=) +polkit1_action_DATA = $(polkit1_action_FILES:.in=)
dbus_policydir = $(sysconfdir)/dbus-1/system.d dist_dbus_policy_DATA = FirewallD.conf @@ -16,28 +16,32 @@ dist_dbus_policy_DATA = FirewallD.conf gsettings_in_file = org.fedoraproject.FirewallApplet.gschema.xml.in gsettings_SCHEMAS = $(gsettings_in_file:.xml.in=.xml)
+BUILT_SOURCES = \ + $(desktop_DATA) \ + $(polkit1_action_DATA) \ + $(gsettings_SCHEMAS) + @INTLTOOL_DESKTOP_RULE@ @INTLTOOL_POLICY_RULE@ @INTLTOOL_XML_NOMERGE_RULE@ @GSETTINGS_RULES@
-all: $(dist_desktop_DATA) $(dist_polkit1_action_DATA) +all: $(desktop_DATA) $(polkit1_action_DATA) $(gsettings_SCHEMAS)
CLEANFILES = *~ *# .#*
DISTCLEANFILES = \ - $(dist_desktop_DATA) \ - $(dist_polkit1_action_DATA) + $(desktop_DATA) \ + $(polkit1_action_DATA) \ + $(gsettings_SCHEMAS)
EXTRA_DIST = \ - $(pam_FILES) \ - $(console_FILES) \ $(desktop_FILES) \ $(polkit1_action_FILES) \ $(gsettings_in_file) \ - icmptypes/*.xml \ - services/*.xml \ - zones/*.xml \ + icmptypes \ + services \ + zones \ firewalld.init \ firewalld.service \ firewalld.sysconfig @@ -53,33 +57,35 @@ UNINSTALL_TARGETS += uninstall-init endif
install-sysconfig: - mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig - $(INSTALL) firewalld.sysconfig $(DESTDIR)$(sysconfdir)/sysconfig/firewalld + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig + $(INSTALL_DATA) $(srcdir)/firewalld.sysconfig $(DESTDIR)$(sysconfdir)/sysconfig/firewalld
uninstall-sysconfig: rm -f $(DESTDIR)$(sysconfdir)/sysconfig/firewalld + rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
-install-init: firewalld.init firewalld.sysconfig - mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d - $(INSTALL_SCRIPT) firewalld.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/firewalld +install-init: install-sysconfig + $(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d + $(INSTALL_SCRIPT) $(srcdir)/firewalld.init $(DESTDIR)$(sysconfdir)/rc.d/init.d/firewalld
-uninstall-init: +uninstall-init: uninstall-sysconfig rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/firewalld - rm -f $(DESTDIR)$(sysconfdir)/sysconfig/firewalld + rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d || :
-install-service: - mkdir -p $(DESTDIR)$(SYSTEMD_UNITDIR) - $(INSTALL) firewalld.service $(DESTDIR)$(SYSTEMD_UNITDIR) +install-service: install-sysconfig + echo "$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNITDIR)" + echo "$(INSTALL_DATA) $(srcdir)/firewalld.service $(DESTDIR)$(SYSTEMD_UNITDIR)/firewalld.service"
-uninstall-service: +uninstall-service: uninstall-sysconfig rm -f $(DESTDIR)$(SYSTEMD_UNITDIR)/firewalld.service + rmdir $(DESTDIR)$(SYSTEMD_UNITDIR) || :
install-config: - mkdir -p $(DESTDIR)$(sconfdir) - mkdir -p $(DESTDIR)$(sconfdir)/icmptypes - mkdir -p $(DESTDIR)$(sconfdir)/services - mkdir -p $(DESTDIR)$(sconfdir)/zones - mkdir -p $(DESTDIR)$(prefixlibdir) + $(MKDIR_P) $(DESTDIR)$(sconfdir) + $(MKDIR_P) $(DESTDIR)$(sconfdir)/icmptypes + $(MKDIR_P) $(DESTDIR)$(sconfdir)/services + $(MKDIR_P) $(DESTDIR)$(sconfdir)/zones + $(MKDIR_P) $(DESTDIR)$(prefixlibdir) cp -r icmptypes $(DESTDIR)$(prefixlibdir) cp -r services $(DESTDIR)$(prefixlibdir) cp -r zones $(DESTDIR)$(prefixlibdir) diff --git a/src/Makefile.am b/src/Makefile.am index e48fe93..9d3b520 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,33 +1,26 @@ -bin_SCRIPTS = firewall-applet firewall-cmd firewall-offline-cmd firewall-config -sbin_SCRIPTS = firewalld +dist_bin_SCRIPTS = firewall-applet firewall-cmd firewall-offline-cmd firewall-config +dist_sbin_SCRIPTS = firewalld
gladedir = $(pkgdatadir) -glade_PYTHON = firewall-config.glade +dist_glade_DATA = firewall-config.glade
gtkextradir = $(pkgdatadir) -gtkextra_PYTHON = gtk3_chooserbutton.py +dist_gtkextra_DATA = gtk3_chooserbutton.py
icondir = $(datadir)/icons/hicolor -iconFILES = icons/*/apps/* +nobase_dist_icon_DATA = $(wildcard icons/*/apps/*)
-EXTRA_DIST = $(bin_SCRIPTS) \ - $(sbin_SCRIPTS) \ - firewall/*.py \ - firewall/*/*.py \ - firewall/*/*.py.in \ - firewall/*/*/*.py \ - $(iconFILES) +nobase_dist_python_DATA = \ + $(wildcard firewall/*.py) \ + $(wildcard firewall/*/*.py) \ + $(wildcard firewall/*/*/*.py) + +EXTRA_DIST = \ + firewall/config/__init__.py.in
CLEANFILES = *~ *# .#* *.py?
install-data-local: - install -d $(DESTDIR)/$(pythondir) - cp -fpR firewall $(DESTDIR)/$(pythondir) - find $(DESTDIR)/$(pythondir) -name "*.in" -exec rm {} ; - - install -d $(DESTDIR)/$(icondir) - cp -fpR icons/* $(DESTDIR)/$(icondir) - @echo "Fixing python shebang" @list='$(bin_SCRIPTS)'; \ for p in $$list; do \
On 11/03/2012 05:08 PM, Doug Goldstein wrote:
-install-service:
- mkdir -p $(DESTDIR)$(SYSTEMD_UNITDIR)
- $(INSTALL) firewalld.service $(DESTDIR)$(SYSTEMD_UNITDIR)
+install-service: install-sysconfig
- echo "$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNITDIR)"
- echo "$(INSTALL_DATA) $(srcdir)/firewalld.service $(DESTDIR)$(SYSTEMD_UNITDIR)/firewalld.service"
Is the echo "..." intentional ? This way the service file is not installed.
icondir = $(datadir)/icons/hicolor -iconFILES = icons/*/apps/* +nobase_dist_icon_DATA = $(wildcard icons/*/apps/*)
The icons are now installed into /usr/share/icons/hicolor/icons/*/apps/ (the second icons/ is redundant). Not sure how to solve this other than with separate Makefile.am in icons/ Any idea ?
On Mon, Nov 5, 2012 at 5:19 AM, Jiri Popelka jpopelka@redhat.com wrote:
On 11/03/2012 05:08 PM, Doug Goldstein wrote:
-install-service:
mkdir -p $(DESTDIR)$(SYSTEMD_UNITDIR)
$(INSTALL) firewalld.service $(DESTDIR)$(SYSTEMD_UNITDIR)
+install-service: install-sysconfig
echo "$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNITDIR)"
echo "$(INSTALL_DATA) $(srcdir)/firewalld.service
$(DESTDIR)$(SYSTEMD_UNITDIR)/firewalld.service"
Is the echo "..." intentional ? This way the service file is not installed.
Ha. I was having a problem with this rule and added an echo to debug it and never removed it. I'll fix this.
icondir = $(datadir)/icons/hicolor -iconFILES = icons/*/apps/* +nobase_dist_icon_DATA = $(wildcard icons/*/apps/*)
The icons are now installed into /usr/share/icons/hicolor/icons/*/apps/ (the second icons/ is redundant). Not sure how to solve this other than with separate Makefile.am in icons/ Any idea ?
That's actually what I was going to do. But was trying to be as minimally invasive as possible. I'll figure this out.
The .desktop entries didn't validate with desktop-file-validate due to incorrect categories. For more information see:
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.h... http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html#category-regis... --- config/firewall-applet.desktop.in | 2 +- config/firewall-config.desktop.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/firewall-applet.desktop.in b/config/firewall-applet.desktop.in index 9d0e697..1f5b06f 100644 --- a/config/firewall-applet.desktop.in +++ b/config/firewall-applet.desktop.in @@ -2,7 +2,7 @@ _Name=Firewall Applet _Comment=Firewall Applet Icon=firewall-applet -Categories=System;Settings;Security; +Categories=Settings;Security; Exec=/usr/bin/firewall-applet Type=Application StartupNotify=true diff --git a/config/firewall-config.desktop.in b/config/firewall-config.desktop.in index 794d8e9..6d152f0 100644 --- a/config/firewall-config.desktop.in +++ b/config/firewall-config.desktop.in @@ -2,7 +2,7 @@ _Name=Firewall _Comment=Firewall Configuration Icon=firewall-config -Categories=System;Settings;Security; +Categories=Settings;Security; Exec=/usr/bin/firewall-config Type=Application StartupNotify=true
+1
good idea, the patches apply cleanly
On 11/03/2012 05:08 PM, Doug Goldstein wrote:
The following patch series allows you to build a working tarball with 'make dist' and not have to rerun the autogen.sh script to build it. It also updates .gitignore when you're working that it ignores the files built up in the process of running make.
firewalld-devel@lists.fedorahosted.org