From 8b7d60065e466cb49fe7c2468aa576d70076d184 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 11 Apr 2012 08:01:49 -0700 Subject: [PATCH 1/3] Clean up configure.pl - Remove blank lines at the end - Simply the handling of vendor Signed-off-by: Tom Eastep --- Shorewall-core/configure.pl | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/Shorewall-core/configure.pl b/Shorewall-core/configure.pl index 32095eb72..5bf0dbacc 100755 --- a/Shorewall-core/configure.pl +++ b/Shorewall-core/configure.pl @@ -59,8 +59,8 @@ my $rcfilename; if ( defined $vendor ) { $rcfilename = 'shorewallrc.' . $vendor; } else { - $rcfilename = 'shorewallrc.default'; - $vendor = 'linux'; + $rcfilename = 'shorewallrc.default'; + $params{HOST} = 'linux'; } open $rcfile, '<', $rcfilename or die "Unable to open $rcfilename for input: $!"; @@ -83,10 +83,8 @@ my $outfile; open $outfile, '>', 'shorewallrc' or die "Can't open 'shorewallrc' for output: $!"; -print "HOST=$vendor\n"; -print $outfile "HOST=$vendor\n"; - -for ( qw/ PREFIX +for ( qw/ HOST + PREFIX SHAREDIR LIBEXECDIR PERLLIBDIR @@ -113,18 +111,3 @@ for ( qw/ PREFIX close $outfile; 1; - - - - - - - - - - - - - - - From 4fa71d122c67909b332e8e77e28334e5598b1045 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 11 Apr 2012 15:23:19 -0700 Subject: [PATCH 2/3] Add comments to shorewallrc files. Signed-off-by: Tom Eastep --- Shorewall-core/shorewallrc.apple | 30 ++++++++++++------------ Shorewall-core/shorewallrc.archlinux | 29 ++++++++++++----------- Shorewall-core/shorewallrc.cygwin | 30 ++++++++++++------------ Shorewall-core/shorewallrc.debian | 32 ++++++++++++------------- Shorewall-core/shorewallrc.default | 34 +++++++++++++-------------- Shorewall-core/shorewallrc.redhat | 32 ++++++++++++------------- Shorewall-core/shorewallrc.slackware | 34 +++++++++++++-------------- Shorewall-core/shorewallrc.suse | 35 ++++++++++++++-------------- 8 files changed, 129 insertions(+), 127 deletions(-) diff --git a/Shorewall-core/shorewallrc.apple b/Shorewall-core/shorewallrc.apple index 0818929ea..0df440db2 100644 --- a/Shorewall-core/shorewallrc.apple +++ b/Shorewall-core/shorewallrc.apple @@ -3,18 +3,18 @@ # BUILD=apple HOST=apple -PREFIX=/usr -SHAREDIR=${PREFIX}/share -LIBEXECDIR=${PREFIX}/share -PERLLIBDIR=${PREFIX}/share/shorewall -CONFDIR=/etc -SBINDIR=/sbin -MANDIR=${SHAREDIR}/man -INITDIR= -INITFILE= -INITSOURCE= -ANNOTATED= -SYSTEMD= -SYSCONFDIR= -SPARSE=Yes -VARDIR=/var/lib +PREFIX=/usr #Top-level directory for shared files, libraries, etc. +SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. +LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. +PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl module directory +CONFDIR=/etc #Directory where subsystem configurations are installed +SBINDIR=/sbin #Directory where system administration programs are installed +MANDIR=${SHAREDIR}/man #Directory where manpages are installed. +INITDIR= #Unused on OS X +INITFILE= #Unused on OS X +INITSOURCE= #Unused on OS X +ANNOTATED= #Unused on OS X +SYSTEMD= #Unused on OS X +SYSCONFDIR= #Unused on OS X +SPARSE=Yes #Only install $PRODUCT/$PRODUCT.conf in $CONFDIR. +VARDIR=/var/lib #Unused on OS X diff --git a/Shorewall-core/shorewallrc.archlinux b/Shorewall-core/shorewallrc.archlinux index fe3d30f8d..922f75456 100644 --- a/Shorewall-core/shorewallrc.archlinux +++ b/Shorewall-core/shorewallrc.archlinux @@ -3,17 +3,18 @@ # BUILD=archlinux HOST=archlinux -PREFIX=/usr -SHAREDIR=${PREFIX}/share -LIBEXECDIR=${PREFIX}/share -PERLLIBDIR=${PREFIX}/share/shorewall -CONFDIR=/etc -SBINDIR=/sbin -MANDIR=${SHAREDIR}/man -INITDIR=/etc/rc.d -INITFILE=$PRODUCT -INITSOURCE=init.sh -ANNOTATED= -SYSCONFDIR= -SYSTEMD= -VARDIR=/var/lib +PREFIX=/usr #Top-level directory for shared files, libraries, etc. +SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. +LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. +PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl module directory +CONFDIR=/etc #Directory where subsystem configurations are installed +SBINDIR=/sbin #Directory where system administration programs are installed +MANDIR=${SHAREDIR}/man #Directory where manpages are installed. +INITDIR=/etc/rc.d #Directory where SysV init scripts are installed. +INITFILE=$PRODUCT #Name of the product's installed SysV init script +INITSOURCE=init.sh #Name of the distributed file to be installed as the SysV init script +ANNOTATED= #If non-zero, annotated configuration files are installed +SYSCONFDIR= #Directory where SysV init parameter files are installed +SYSTEMD= #Directory where .service files are installed (systems running systemd only) +SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR +VARDIR=/var/lib #Directory where product variable data is stored. diff --git a/Shorewall-core/shorewallrc.cygwin b/Shorewall-core/shorewallrc.cygwin index f8cfd5bbd..0038044a4 100644 --- a/Shorewall-core/shorewallrc.cygwin +++ b/Shorewall-core/shorewallrc.cygwin @@ -3,18 +3,18 @@ # BUILD=cygwin HOST=cygwin -PREFIX=/usr -SHAREDIR=${PREFIX}/share -LIBEXECDIR=${PREFIX}/share -PERLLIBDIR=${PREFIX}/share/shorewall -CONFDIR=/etc -SBINDIR=/bin -MANDIR=${SHAREDIR}/man -INITDIR=/etc/init.d -INITFILE= -INITSOURCE= -ANNOTATED= -SYSTEMD= -SYSCONFDIR= -SPARSE=Yes -VARDIR=/var/lib +PREFIX=/usr #Top-level directory for shared files, libraries, etc. +SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. +LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. +PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl module directory +CONFDIR=/etc #Directory where subsystem configurations are installed +SBINDIR=/bin #Directory where system administration programs are installed +MANDIR=${SHAREDIR}/man #Directory where manpages are installed. +INITDIR=/etc/init.d #Unused on Cygwin +INITFILE= #Unused on Cygwin +INITSOURCE= #Unused on Cygwin +ANNOTATED= #Unused on Cygwin +SYSTEMD= #Unused on Cygwin +SYSCONFDIR= #Unused on Cygwin +SPARSE=Yes #Only install $PRODUCT/$PRODUCT.conf in $CONFDIR. +VARDIR=/var/lib #Unused on Cygwin diff --git a/Shorewall-core/shorewallrc.debian b/Shorewall-core/shorewallrc.debian index 6d588fcba..8bf6f6678 100644 --- a/Shorewall-core/shorewallrc.debian +++ b/Shorewall-core/shorewallrc.debian @@ -3,19 +3,19 @@ # BUILD= #Default is to detect the build system HOST=debian -PREFIX=/usr -SHAREDIR=${PREFIX}/share -LIBEXECDIR=${PREFIX}/share -PERLLIBDIR=${PREFIX}/share/shorewall -CONFDIR=/etc -SBINDIR=/sbin -MANDIR=${PREFIX}/man -INITDIR=/etc/init.d -INITFILE=$PRODUCT -INITSOURCE=init.debian.sh -ANNOTATED= -SYSCONFFILE=default.debian -SYSCONFDIR=/etc/default -SYSTEMD= -SPARSE=Yes -VARDIR=/var/lib +PREFIX=/usr #Top-level directory for shared files, libraries, etc. +SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. +LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. +PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl module directory +CONFDIR=/etc #Directory where subsystem configurations are installed +SBINDIR=/sbin #Directory where system administration programs are installed +MANDIR=${PREFIX}/man #Directory where manpages are installed. +INITDIR=/etc/init.d #Directory where SysV init scripts are installed. +INITFILE=$PRODUCT #Name of the product's installed SysV init script +INITSOURCE=init.debian.sh #Name of the distributed file to be installed as the SysV init script +ANNOTATED= #If non-zero, annotated configuration files are installed +SYSCONFFILE=default.debian #Name of the distributed file to be installed in $SYSCONFDIR +SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed +SYSTEMD= #Directory where .service files are installed (systems running systemd only) +SPARSE=Yes #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR +VARDIR=/var/lib #Directory where product variable data is stored. diff --git a/Shorewall-core/shorewallrc.default b/Shorewall-core/shorewallrc.default index 318d96bc3..fb5f1354b 100644 --- a/Shorewall-core/shorewallrc.default +++ b/Shorewall-core/shorewallrc.default @@ -1,21 +1,21 @@ # # Default Shorewall 4.5 rc file # -HOST= #Default is to detect the host system +HOST=linux #Generic Linux BUILD= #Default is to detect the build system -PREFIX=/usr -SHAREDIR=${PREFIX}/share -LIBEXECDIR=${PREFIX}/share -PERLLIBDIR=${PREFIX}/share/shorewall -CONFDIR=/etc -SBINDIR=/sbin -MANDIR=${PREFIX}/man -INITDIR=etc/init.d -INITFILE=$PRODUCT -INITSOURCE=init.sh -ANNOTATED= -SYSTEMD= -SYSCONFFILE= -SYSCONFDIR= -SPARSE= -VARDIR=/var/lib +PREFIX=/usr #Top-level directory for shared files, libraries, etc. +SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. +LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. +PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl module directory +CONFDIR=/etc #Directory where subsystem configurations are installed +SBINDIR=/sbin #Directory where system administration programs are installed +MANDIR=${PREFIX}/man #Directory where manpages are installed. +INITDIR=etc/init.d #Directory where SysV init scripts are installed. +INITFILE=$PRODUCT #Name of the product's installed SysV init script +INITSOURCE=init.sh #Name of the distributed file to be installed as the SysV init script +ANNOTATED= #If non-zero, annotated configuration files are installed +SYSTEMD= #Directory where .service files are installed (systems running systemd only) +SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR +SYSCONFDIR= #Directory where SysV init parameter files are installed +SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR +VARDIR=/var/lib #Directory where product variable data is stored. diff --git a/Shorewall-core/shorewallrc.redhat b/Shorewall-core/shorewallrc.redhat index f172ad06b..cf1c693d0 100644 --- a/Shorewall-core/shorewallrc.redhat +++ b/Shorewall-core/shorewallrc.redhat @@ -3,19 +3,19 @@ # BUILD= #Default is to detect the build system HOST=redhat -PREFIX=/usr -SHAREDIR=${PREFIX}/share -LIBEXECDIR=${PREFIX}/share -PERLLIBDIR=/usr/share/shorewall -CONFDIR=/etc -SBINDIR=/sbin -MANDIR=${SHAREDIR}/man -INITDIR=/etc/rc.d/init.d -INITFILE=$PRODUCT -INITSOURCE=init.fedora.sh -ANNOTATED= -SYSTEMD=/lib/systemd/system -SYSCONFFILE=sysconfig -SYSCONFDIR=/etc/sysconfig/ -SPARSE= -VARDIR=/var/lib +PREFIX=/usr #Top-level directory for shared files, libraries, etc. +SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. +LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. +PERLLIBDIR=/usr/share/shorewall #Directory to install Shorewall Perl module directory +CONFDIR=/etc #Directory where subsystem configurations are installed +SBINDIR=/sbin #Directory where system administration programs are installed +MANDIR=${SHAREDIR}/man #Directory where manpages are installed. +INITDIR=/etc/rc.d/init.d #Directory where SysV init scripts are installed. +INITFILE=$PRODUCT #Name of the product's installed SysV init script +INITSOURCE=init.fedora.sh #Name of the distributed file to be installed as the SysV init script +ANNOTATED= #If non-zero, annotated configuration files are installed +SYSTEMD=/lib/systemd/system #Directory where .service files are installed (systems running systemd only) +SYSCONFFILE=sysconfig #Name of the distributed file to be installed as $SYSCONFDIR/$PRODUCT +SYSCONFDIR=/etc/sysconfig/ #Directory where SysV init parameter files are installed +SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR +VARDIR=/var/lib #Directory where product variable data is stored. diff --git a/Shorewall-core/shorewallrc.slackware b/Shorewall-core/shorewallrc.slackware index e0adbfc19..eabccafbd 100644 --- a/Shorewall-core/shorewallrc.slackware +++ b/Shorewall-core/shorewallrc.slackware @@ -3,20 +3,20 @@ # BUILD=slackware HOST=slackware -PREFIX=/usr -SHAREDIR=${PREFIX}/share -LIBEXECDIR=${PREFIX}/share -PERLLIBDIR=${PREFIX}/share/shorewall -CONFDIR=/etc -SBINDIR=/sbin -MANDIR=${PREFIX}/man -INITDIR=/etc/rc.d -INITSOURCE=init.slackware.firewall -INITFILE=rc.firewall -AUXINITSOURCE=init.slackware.$PRODUCT -AUXINITFILE=rc.$PRODUCT -SYSTEMD= -SYSCONFFILE= -SYSCONFDIR= -ANNOTATED= -VARDIR=/var/lib +PREFIX=/usr #Top-level directory for shared files, libraries, etc. +SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. +LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. +PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl module directory +CONFDIR=/etc #Directory where subsystem configurations are installed +SBINDIR=/sbin #Directory where system administration programs are installed +MANDIR=${PREFIX}/man #Directory where manpages are installed. +INITDIR=/etc/rc.d #Directory where SysV init scripts are installed. +INITSOURCE=init.slackware.firewall #Name of the distributed file to be installed as the SysV init script +INITFILE=rc.firewall #Name of the product's installed SysV init script +AUXINITSOURCE=init.slackware.$PRODUCT #Name of the distributed file to be installed as a second SysV init script +AUXINITFILE=rc.$PRODUCT #Name of the product's installed second init script +SYSTEMD= #Name of the directory where .service files are installed (systems running systemd only) +SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR +SYSCONFDIR= #Name of the directory where SysV init parameter files are installed. +ANNOTATED= #If non-empty, install annotated configuration files +VARDIR=/var/lib #Directory where product variable data is stored. diff --git a/Shorewall-core/shorewallrc.suse b/Shorewall-core/shorewallrc.suse index 5cf1b53f2..8e6057dda 100644 --- a/Shorewall-core/shorewallrc.suse +++ b/Shorewall-core/shorewallrc.suse @@ -1,21 +1,22 @@ # # SuSE Shorewall 4.5 rc file # -BUILD= #Default is to detect the build system +BUILD= #Default is to detect the build system HOST=suse -PREFIX=/usr -CONFDIR=/etc -SHAREDIR=${PREFIX}/share -LIBEXECDIR=${PREFIX}/lib -PERLLIBDIR=${PREFIX}/lib/perl5/vendor_perl/5.14.2 -SBINDIR=/sbin -MANDIR=${SHAREDIR}/man/ -INITDIR=/etc/init.d -INITFILE=$PRODUCT -INITSOURCE=init.sh -ANNOTATED= -SYSTEMD= -SYSCONFFILE= -SYSCONFDIR=/etc/sysconfig/ -SPARSE= -VARDIR=/var/lib +PREFIX=/usr #Top-level directory for shared files, libraries, etc. +CONFDIR=/etc #Directory where subsystem configurations are installed +SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. +LIBEXECDIR=${PREFIX}/lib #Directory for executable scripts. +PERLLIBDIR=${PREFIX}/lib/perl5/vendor_perl/5.14.2 #Directory to install Shorewall Perl module directory +SBINDIR=/sbin #Directory where system administration programs are installed +MANDIR=${SHAREDIR}/man/ #Directory where manpages are installed. +INITDIR=/etc/init.d #Directory where SysV init scripts are installed. +INITFILE=$PRODUCT #Name of the product's SysV init script +INITSOURCE=init.sh #Name of the distributed file to be installed as the SysV init script +ANNOTATED= #If non-zero, annotated configuration files are installed +SYSTEMD= #Directory where .service files are installed (systems running systemd only) +SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR +SYSCONFDIR=/etc/sysconfig/ #Directory where SysV init parameter files are installed +SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR +VARDIR=/var/lib #Directory where persistent product data is stored. + From 3c0936803265cda81589cebcc4e67f9dc525d3cf Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 11 Apr 2012 15:41:21 -0700 Subject: [PATCH 3/3] Make changes suggested by Orion Poplawski - Change shorewallrc.redhat LIBEXECDIR and PERLLIBDIR settings - Install -lite Makefiles in ${SHAREDIR}/${PRODUCT}/ Signed-off-by: Tom Eastep --- Shorewall-core/shorewallrc.redhat | 4 ++-- Shorewall-lite/install.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Shorewall-core/shorewallrc.redhat b/Shorewall-core/shorewallrc.redhat index cf1c693d0..851f1d0c0 100644 --- a/Shorewall-core/shorewallrc.redhat +++ b/Shorewall-core/shorewallrc.redhat @@ -5,8 +5,8 @@ BUILD= #Default is to detect the build system HOST=redhat PREFIX=/usr #Top-level directory for shared files, libraries, etc. SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. -LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. -PERLLIBDIR=/usr/share/shorewall #Directory to install Shorewall Perl module directory +LIBEXECDIR=${PREFIX}/libexec #Directory for executable scripts. +PERLLIBDIR=/usr/share/perl5 #Directory to install Shorewall Perl module directory CONFDIR=/etc #Directory where subsystem configurations are installed SBINDIR=/sbin #Directory where system administration programs are installed MANDIR=${SHAREDIR}/man #Directory where manpages are installed. diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh index 8e4e97562..43d780a5a 100755 --- a/Shorewall-lite/install.sh +++ b/Shorewall-lite/install.sh @@ -373,8 +373,8 @@ fi # # Install the Makefile # -run_install $OWNERSHIP -m 0600 Makefile ${DESTDIR}${CONFDIR}/$PRODUCT -echo "Makefile installed as ${DESTDIR}${CONFDIR}/$PRODUCT/Makefile" +run_install $OWNERSHIP -m 0600 Makefile ${DESTDIR}${SHAREDIR}/$PRODUCT +echo "Makefile installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/Makefile" # # Install the default config path file