diff --git a/configure.ac b/configure.ac index 30a4716..0b70046 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,7 @@ AC_CONFIG_SRCDIR([src/main.c]) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE([-Wall -Werror foreign parallel-tests]) +AM_SILENT_RULES([yes]) # Check for rst utilities AC_ARG_WITH([rst2man], diff --git a/debian/copyright b/debian/copyright index 0d81a96..3240f1c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,8 +1,148 @@ -Copyright: +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Contact: Kristian Lyngstol +Source: https://github.com/varnish/vagent2 - Copyright 2013 Varnish Software AS +Files: include/pidfile.h +Copyright: 1996 Peter Wemm , + 2002 Networks Associates Technology, Inc. +License: BSD -License: +Files: src/foreign/base64.c +Copyright: 2011,2013 Varnish Software AS +License: BSD-2 -Copyright (c) 2013 Varnish Software AS -BSD License +Files: src/foreign/pidfile.c +Copyright: 2005 Pawel Jakub Dawidek , + 2006 Robert Millan, + 2007 Dag-Erling Coïdan Smørgrav, + 2010-2012 Guillem Jover +License: BSD-2 + +Files: src/foreign/vsb.c + include/vsb.h +Copyright: 2000-2008 Poul-Henning Kamp, + Dag-Erling Coïdan Smørgrav +License: BSD-2 + +Files: src/foreign/vss.c + src/modules/vlog.c + src/modules/vstat.c +Copyright: 2006 Verdens Gang AS, + 2006-2013 Varnish Software AS +License: BSD-2 + +License: BSD-2 + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: html/jquery.js +Copyright: 2013 jQuery Foundation +License: MIT + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + . + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + +Files: html/bootstrap/js/bootstrap.js + html/bootstrap/js/bootstrap.min.js + html/bootstrap/css/bootstrap.min.css + html/bootstrap/css/bootstrap-responsive.css + html/bootstrap/css/bootstrap.css + html/bootstrap/css/bootstrap-responsive.min.css + html/bootstrap/img/glyphicons-halflings-white.png + html/bootstrap/img/glyphicons-halflings.png +Copyright: 2012 Twitter, Inc. +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the complete text of the Apache-2.0 + License can be found in `/usr/share/common-licenses/Apache-2.0'. + +Files: * +Copyright: 2013 Varnish Software AS +License: BSD + +License: BSD + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of pysolr nor the names of its contributors may be used + to endorse or promote products derived from this software without + specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: debian/* +Copyright: (C) 2013 Ulises Vitulli , + Kristian Lyngstol +License: GPL-3 + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL-3'. diff --git a/src/modules/vcl.c b/src/modules/vcl.c index b6aeb37..7bbd3aa 100644 --- a/src/modules/vcl.c +++ b/src/modules/vcl.c @@ -87,25 +87,25 @@ static void mk_help(struct agent_core_t *core, struct vcl_priv_t *vcl) */ static int vcl_persist(int logfd, const char *id, const char *vcl, struct agent_core_t *core) { int ret; - _cleanup_free_ char *tmpfile = NULL; + _cleanup_free_ char *tempfile = NULL; _cleanup_free_ char *target = NULL; _cleanup_close_ int fd = -1; ret = asprintf(&target, "%s/%s.auto.vcl", core->config->p_arg, id); assert(ret > 0); - ret = asprintf(&tmpfile, "%s/.tmp.%s.auto.vcl", core->config->p_arg, id); + ret = asprintf(&tempfile, "%s/.tmp.%s.auto.vcl", core->config->p_arg, id); assert(ret > 0); - ret = unlink(tmpfile); + ret = unlink(tempfile); if (ret < 0 && errno != ENOENT) { - warnlog(logfd, "Removing temporary file '%s' failed: %s", tmpfile, strerror(errno)); + warnlog(logfd, "Removing temporary file '%s' failed: %s", tempfile, strerror(errno)); return -1; } - fd = open(tmpfile, O_CREAT | O_WRONLY | O_TRUNC | O_EXCL, S_IRWXU); + fd = open(tempfile, O_CREAT | O_WRONLY | O_TRUNC | O_EXCL, S_IRWXU); if (fd < 0) { - warnlog(logfd, "Failed to open %s for writing: %s", tmpfile, strerror(errno)); + warnlog(logfd, "Failed to open %s for writing: %s", tempfile, strerror(errno)); return -1; } @@ -116,9 +116,9 @@ static int vcl_persist(int logfd, const char *id, const char *vcl, struct agent_ ret = close(fd); assert(ret >= 0); fd = -1; - ret = rename(tmpfile, target); + ret = rename(tempfile, target); if (ret) { - warnlog(logfd, "rename of %s to %s failed. Dunno quite what to do. errno: %d(%s)", tmpfile, target, errno, strerror(errno)); + warnlog(logfd, "rename of %s to %s failed. Dunno quite what to do. errno: %d(%s)", tempfile, target, errno, strerror(errno)); return -1; } return 0;