From ddeae2b68e9a58a1cf9d74995ba209e9c1a35d2f Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 27 Dec 2013 12:07:49 -0500 Subject: [PATCH] Twiddle a few more settings by default. --- app-antivirus/clamav-unofficial-sigs/Manifest | 2 +- .../clamav-unofficial-sigs-3.7.2.ebuild | 39 ++++++++++++------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/app-antivirus/clamav-unofficial-sigs/Manifest b/app-antivirus/clamav-unofficial-sigs/Manifest index b28935a..c7834c5 100644 --- a/app-antivirus/clamav-unofficial-sigs/Manifest +++ b/app-antivirus/clamav-unofficial-sigs/Manifest @@ -1,3 +1,3 @@ DIST clamav-unofficial-sigs-3.7.2.tar.gz 38549 SHA256 96e98e6e4434c5950fa9831c6a43236fed7eabae44beded16171305cf3f9bdb9 SHA512 ee07bf521cca229bc85acb887c8e520149955732797a9d220e24f09cb9e89f9bd189ad77dc781c03c60bdaaec2bfa91a6c96cf7a0b689759cddf3ff231b8b0a4 WHIRLPOOL af4925c8a9bb8c09472131f98026b809da13e122a530c4a48614014b8156a259d37303cb1042da98d0bd8b0f4abef3cd7c05f2d549f87e1b7cd533d4a8d4d188 -EBUILD clamav-unofficial-sigs-3.7.2.ebuild 2243 SHA256 9f0c826e651d32cd7c42062a347a33301f0458006238ff2c476897dd9182b0a2 SHA512 217ede6b2867f7eab494c43edef4a189a91e24879d8e037fe2fee963e61f58ab505e2bd27775449bebb88470de6cdd371bad9b168e94fd013d08e96f72e99713 WHIRLPOOL 49cb2426c4924e741a739001a6e97c57386802fadb4c1c73879bda934b4f324b2a4fcccaf36327df94fc30dad83b02521f06fea3279c9b124f7c02f3ee8ce52d +EBUILD clamav-unofficial-sigs-3.7.2.ebuild 2791 SHA256 091735ffa9f5678b0c792ce2e2aaf3af22b1ed4dcc4843fa9935af9266396855 SHA512 ff3f4e25f9cc07ae88f83bfb7d468b8f2ba27c3e1e4b5725552dfe3db4a4511038b1f0de776c7594b943543d22633dc61c70355743875a88914bd97be8be66ee WHIRLPOOL 4b9ef6fd3569b6c0173c237ddefb8f59308b3c8ec1ffdd1efb2b87415f18e8fe217fdbcef1ccc6c2f763ccadcb56979cb41a068cf1ae0b7f3653690106127b64 MISC metadata.xml 204 SHA256 952ab0590546361a53b9508ff73fa79f531e792e091f2ea2925d0c4be30a10c2 SHA512 123731ee05ba6ec77a736c2aa55148c0c329327a340ff9fe7b2c9ec1df5fb2f68d63495ef53710cc6b94fa4a81f831d0d40b83db6f48a2b046ae1f95fdb406af WHIRLPOOL ff9e85f6f972856b1340abffbede50056a6c6b98c36f17f43b58106dc87fefaab23f15f563c18bcd801fd6da69e9c49af92b349aa93f85ab9637f4f5ab5db3c5 diff --git a/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild index 0cc6c61..043ff52 100644 --- a/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild +++ b/app-antivirus/clamav-unofficial-sigs/clamav-unofficial-sigs-3.7.2.ebuild @@ -25,11 +25,17 @@ RDEPEND="${DEPEND} net-misc/curl" src_compile() { - # First, fix the paths contained in the configuration file. + # First, fix the paths contained in the configuration file. Eventually + # these should be moved under /run, but for now we keep them sync'ed + # with the default clamd.conf. local pid_default="/var/run/clamd.pid" - local pid_gentoo="/run/clamav/clamd.pid" - local socket_default="/var/run/clamd.socket" - local socket_gentoo="/run/clamav/clamd.sock" + local pid_gentoo="/var/run/clamav/clamd.pid" + + # clamd listens on a local socket by default. The clamd_socket + # setting needs to be uncommented in the configuration file for it + # to take effect. + local socket_default="#clamd_socket=\"/var/run/clamd.socket\"" + local socket_gentoo="clamd_socket=\"/var/run/clamav/clamd.sock\"" sed -i -e '$a\pkg_mgr="emerge"' \ -e "\$a\\pkg_rm=\"emerge -C ${PN}\"" \ @@ -42,7 +48,13 @@ src_compile() { # /var/lib/${PN}. We'll need to make this writable by the clamav # user during src_install. sed -i -e "s~/usr/unofficial-dbs~/var/lib/${PN}~" "${PN}.conf" \ - || die 'failed to update the work_dir variable' + || die "failed to update the work_dir variable in ${PN}.conf" + + # Tell the script that it's been configured. + local cfged_default='user_configuration_complete="no"' + local cfged_gentoo='user_configuration_complete="yes"' + sed -i "s/${cfged_default}/${cfged_gentoo}/" "${PN}.conf" \ + || die "failed to set user configuration completed in ${PN}.conf" } src_install() { @@ -65,14 +77,13 @@ src_install() { } pkg_postinst() { - elog "You will need to set up your /etc/${PN}.conf file." + elog '' + elog "You will need to select databases in /etc/${PN}.conf." elog "For details, please see the ${PN}(8) manual page." - elog "" - elog "Don't forget to set user_configuration_complete=\"yes\"." - elog "" - elog "An up-to-date description of the available SaneSecurity" - elog "databases is available at," - elog "" - elog " http://sanesecurity.com/usage/signatures/" - elog "" + elog '' + elog 'An up-to-date description of the available Sanesecurity' + elog 'databases is available at,' + elog '' + elog ' http://sanesecurity.com/usage/signatures/' + elog '' } -- 2.44.2