This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via 507e51748a0431055410f2f584d82ed0aba4f233 (commit) via 22c28b88414a3c2bd53d2186c72937cb9cd1a34c (commit) via e2c1801f3ee5352eed5d14a182e5858f480154bd (commit) via a7e2a658c3912760a90f9dc632178be4845b0cf2 (commit) via 91e031b951814fe6fc54cf1e5bf8451c3def723f (commit) via 66be9e1897dcaa921c55ee0515ae077531c850a2 (commit) via 9c548696cdd01d8ac3a569b4be69e67a639e455c (commit) via 465dedff9210d3ea02fbf8bd84822e5d37c51562 (commit) via f94cfa1c687197a44bd5dfcbfc3d91e84c9e56cd (commit) via 5acc816c332fed7f131dcfaa411bf360a06653ac (commit) via 28ffaa854a24ee88e075c4e4f072d377a4ab450f (commit) via ff8e792bd1de123836f046a4ba563b53ba3ebf61 (commit) via ee151208a44a884f47162313543a6a191e6ce2f3 (commit) via 228407eff51cb99d5b48e510aeaf2687471e215d (commit) via 4c8e2fc43ab3f70fcb764d460f0bfb50ade798d1 (commit) via 7bb93a27d92cfd4bee1e32293bad4a6e6a58be74 (commit) via 694283d4809ec8ae919b9b274af091ff72767965 (commit) from 7f6177099661e865f3098752b7b7b1b8c7bf9a31 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 507e51748a0431055410f2f584d82ed0aba4f233 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 21:55:11 2010 +0100
naoki: Change on terminal: Only build one package at once.
commit 22c28b88414a3c2bd53d2186c72937cb9cd1a34c Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 21:37:26 2010 +0100
QA: Remove empty directories in right order.
commit e2c1801f3ee5352eed5d14a182e5858f480154bd Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 21:30:09 2010 +0100
git: New package.
commit a7e2a658c3912760a90f9dc632178be4845b0cf2 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 21:29:47 2010 +0100
gmp: Requires gcc-c++ to build.
commit 91e031b951814fe6fc54cf1e5bf8451c3def723f Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 21:28:22 2010 +0100
QA: Silently drop messages when find prints an error.
commit 66be9e1897dcaa921c55ee0515ae077531c850a2 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 21:06:55 2010 +0100
naoki: Refactor logging.
commit 9c548696cdd01d8ac3a569b4be69e67a639e455c Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 19:01:56 2010 +0100
packager: Change syntax of python-api requirement.
commit 465dedff9210d3ea02fbf8bd84822e5d37c51562 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 18:58:09 2010 +0100
Remove a bunch of scripts that are not needed any more.
commit f94cfa1c687197a44bd5dfcbfc3d91e84c9e56cd Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 18:56:15 2010 +0100
QA: Add check for compressed man pages.
We do not want them because they are kinda ugly.
commit 5acc816c332fed7f131dcfaa411bf360a06653ac Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 18:52:18 2010 +0100
naoki: Fix logging in Environment class.
commit 28ffaa854a24ee88e075c4e4f072d377a4ab450f Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 18:46:15 2010 +0100
naoki: Log build time.
commit ff8e792bd1de123836f046a4ba563b53ba3ebf61 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 18:22:49 2010 +0100
naoki: Reimplement logging for packages.
Creating a subdirectory in logs and one log file per release.
commit ee151208a44a884f47162313543a6a191e6ce2f3 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 02:11:58 2010 +0100
libgcrypt: Fix dependencies of development headers.
commit 228407eff51cb99d5b48e510aeaf2687471e215d Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 02:04:20 2010 +0100
ncurses: Fix build.
commit 4c8e2fc43ab3f70fcb764d460f0bfb50ade798d1 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 01:56:44 2010 +0100
flex: Remove unneeded library.
(gcc-c++ was added for testsuite.)
commit 7bb93a27d92cfd4bee1e32293bad4a6e6a58be74 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 12 01:39:11 2010 +0100
dracut: Don't delete selinux module.
commit 694283d4809ec8ae919b9b274af091ff72767965 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Nov 11 20:18:37 2010 +0100
naoki: Remove automatic detection of development dependencies.
This causes lots of unneeded dependencies.
-----------------------------------------------------------------------
Summary of changes: config/logging.ini | 83 -------------------------- make.sh | 4 +- naoki/__init__.py | 44 +++++++------- naoki/build.py | 35 ----------- naoki/constants.py | 1 - naoki/environ.py | 40 ++++++++++--- naoki/logger.py | 69 ++++++---------------- naoki/terminal.py | 8 +-- pkgs/Templates | 3 +- pkgs/core/dracut/dracut.nm | 9 +-- pkgs/core/flex/flex.nm | 8 +- pkgs/core/{netplug/netplug.nm => git/git.nm} | 44 ++++++++----- pkgs/core/gmp/gmp.nm | 2 +- pkgs/core/libgcrypt/libgcrypt.nm | 3 +- pkgs/core/ncurses/ncurses.nm | 8 +-- src/scripts/checkrelro | 41 ------------- src/scripts/edit-kernel-config | 11 ---- src/scripts/py-extract-egg | 16 ----- src/scripts/readhash | 22 ------- src/scripts/vpn-watch | 68 --------------------- tools/functions-packager-find | 4 +- tools/quality-agent.d/090-man-pages | 17 +++++ tools/quality-agent.d/090-remove-empty-dirs | 2 +- 23 files changed, 138 insertions(+), 404 deletions(-) delete mode 100644 config/logging.ini copy pkgs/core/{netplug/netplug.nm => git/git.nm} (59%) delete mode 100755 src/scripts/checkrelro delete mode 100644 src/scripts/edit-kernel-config delete mode 100755 src/scripts/py-extract-egg delete mode 100644 src/scripts/readhash delete mode 100644 src/scripts/vpn-watch create mode 100755 tools/quality-agent.d/090-man-pages
Difference in files: diff --git a/config/logging.ini b/config/logging.ini deleted file mode 100644 index 20c2e38..0000000 --- a/config/logging.ini +++ /dev/null @@ -1,83 +0,0 @@ -[formatters] -keys: detailed,simple,unadorned,state - -[handlers] -keys: simple_console,detailed_console,unadorned_console,simple_console_warnings_only - -[loggers] -keys: root,build,state,naoki - -[formatter_state] -format: %(asctime)s - %(message)s - -[formatter_unadorned] -format: %(message)s - -[formatter_simple] -format: %(levelname)s: %(message)s - -;useful for debugging: -[formatter_detailed] -format: %(levelname)s %(filename)s:%(lineno)d: %(message)s - -[handler_unadorned_console] -class: StreamHandler -args: [] -formatter: unadorned -level: INFO - -[handler_simple_console] -class: StreamHandler -args: [] -formatter: simple -level: INFO - -[handler_simple_console_warnings_only] -class: StreamHandler -args: [] -formatter: simple -level: WARNING - -[handler_detailed_console] -class: StreamHandler -args: [] -formatter: detailed -level: WARNING - -; usually dont want to set a level for loggers -; this way all handlers get all messages, and messages can be filtered -; at the handler level -; -; all these loggers default to a console output handler -; -[logger_root] -level: NOTSET -handlers: simple_console - -; naoki logger normally has no output -; catches stuff like naoki.trace_decorator and naoki.util -; dont normally want to propagate to root logger, either -[logger_naoki] -level: NOTSET -handlers: -qualname: naoki -propagate: 1 - -[logger_state] -level: NOTSET -; unadorned_console only outputs INFO or above -handlers: unadorned_console -qualname: naoki.Root.state -propagate: 0 - -[logger_build] -level: NOTSET -handlers: simple_console_warnings_only -qualname: naoki.Root.build -propagate: 0 - -; the following is a list naoki logger qualnames used within the code: -; -; qualname: naoki.util -; qualname: naoki.uid -; qualname: naoki.trace_decorator diff --git a/make.sh b/make.sh index 46b3ae0..0dab425 100755 --- a/make.sh +++ b/make.sh @@ -1,6 +1,8 @@ #!/usr/bin/python
+import logging import sys + import naoki
# silence Python 2.6 buggy warnings about Exception.message @@ -24,6 +26,6 @@ except (SystemExit,):
except (KeyboardInterrupt,): exitStatus = 7 - n.log.error("Exiting on user interrupt, <CTRL>-C") + logging.error("Exiting on user interrupt, <CTRL>-C")
sys.exit(exitStatus) diff --git a/naoki/__init__.py b/naoki/__init__.py index 4ad6ae1..11f0cd8 100644 --- a/naoki/__init__.py +++ b/naoki/__init__.py @@ -2,6 +2,7 @@
import ConfigParser import fcntl +import logging import os.path import random import sys @@ -20,18 +21,27 @@ import util
from constants import *
+# Initialize logging +log = logger.Logging() + class Naoki(object): def __init__(self): - # First, setup the logging - self.logging = logger.Logging(self) - self.log = self.logging.log - # Second, parse the command line options self.cli = terminal.Commandline(self)
- self.log.debug("Successfully initialized naoki instance") + logging.debug("Successfully initialized naoki instance") for k, v in config.items(): - self.log.debug(" %s: %s" % (k, v)) + logging.debug(" %s: %s" % (k, v)) + + def debug(self, state): + """ + Enable or disable debugging mode. + """ + + # Set logging to debug mode + log.debug(state) + + config.debug = state
def run(self): args = self.cli.args @@ -66,25 +76,17 @@ class Naoki(object): # Source repository repo = self._get_source_repos()
- # Initialize job queue - jobs = build.Jobs() - config["shell_on_failure"] = args.shell
- if args.all: - raise Exception, "XXX to be implemented" - else: - for name in args.packages: - p = repo.find_package_by_name(name) - if not p: - raise Exception, "Could not find package: %s" % name + package = repo.find_package_by_name(args.package) + if not package: + raise Exception, "Could not find package: %s" % name
- p = build.Build(p, ignore_dependency_errors=args.ignore_dependency_errors) - jobs.add(p) + # We found a package... build it: + b = build.Build(package, + ignore_dependency_errors=args.ignore_dependency_errors)
- #return builder.run(ignore_dependency_errors=args.ignore_dependency_errors) - while jobs.has_jobs: - jobs.process_next() + b.build()
def call_package(self, args): if not args.has_key("action"): diff --git a/naoki/build.py b/naoki/build.py index 259d6a0..81ffac5 100644 --- a/naoki/build.py +++ b/naoki/build.py @@ -70,41 +70,6 @@ class Build(object): e.build()
-class Jobs(object): - def __init__(self): - self.__jobs = [] - self.__error_jobs = [] - - logging.debug("Initialized jobs queue") - - def __len__(self): - return len(self.__jobs) - - def add(self, job): - assert isinstance(job, Build) - - self.__jobs.append(job) - - @property - def all(self): - return self.__jobs[:] - - @property - def has_jobs(self): - return self.__jobs != [] - - def process_next(self): - if not self.__jobs: - return - - job = self.__jobs[0] - - try: - job.build() - finally: - self.__jobs.remove(job) - - class PackageShell(Build): def __init__(self, *args, **kwargs): Build.__init__(self, *args, **kwargs) diff --git a/naoki/constants.py b/naoki/constants.py index f19b8e9..72af9aa 100644 --- a/naoki/constants.py +++ b/naoki/constants.py @@ -96,7 +96,6 @@ class Config(object): "disto_vendor" : "unknown", # # Logging - "log_config_file" : os.path.join(CONFIGDIR, "logging.ini"), "log_file" : os.path.join(LOGDIR, "naoki.log"), # # Reporting diff --git a/naoki/environ.py b/naoki/environ.py index 801212d..8f2ecbc 100644 --- a/naoki/environ.py +++ b/naoki/environ.py @@ -4,6 +4,7 @@ import grp import logging import os import stat +import time
import logger import mail @@ -38,7 +39,7 @@ class _Environment(object): } self._settings.update(settings)
- logging.debug("Successfully initialized %s" % self) + self.logger.debug("Successfully initialized %s" % self)
# XXX check if already locked self.prepare() @@ -47,14 +48,14 @@ class _Environment(object): raise NotImplementedError
def clean(self): - logging.debug("Cleaning environment %s" % self) + self.logger.debug("Cleaning environment %s" % self) if os.path.exists(self.chrootPath()): util.rm(self.chrootPath()) def prepare(self): self.clean()
- logging.debug("Preparing environment %s" % self) + self.logger.debug("Preparing environment %s" % self)
dirs = ( CACHEDIR, @@ -154,20 +155,20 @@ class _Environment(object): nameservers.append(line.split(" ")[-1].strip()) f.close()
- logging.debug("Using nameservers: %s" % nameservers) + self.logger.debug("Using nameservers: %s" % nameservers)
f = open(self.chrootPath("etc", "resolv.conf"), "w") for nameserver in nameservers: f.write("nameserver %s" % nameserver) f.close()
- logging.debug("Creating record for localhost") + self.logger.debug("Creating record for localhost") f = open(self.chrootPath("etc", "hosts"), "w") f.write("127.0.0.1 localhost\n") f.close()
def extract(self, package, *args): - logging.info("Extracting %s" % package) + self.logger.info("Extracting %s" % package)
package.extract(self.chrootPath(*args))
@@ -221,12 +222,12 @@ class _Environment(object): return ret
def _mountall(self): - logging.debug("Mounting environment") + self.logger.debug("Mounting environment") for cmd in self.mountCmds: util.do(cmd, shell=True)
def _umountall(self): - logging.debug("Umounting environment") + self.logger.debug("Umounting environment") for cmd in self.umountCmds: util.do(cmd, raiseExc=0, shell=True)
@@ -284,7 +285,22 @@ class Build(_Environment):
@property def logger(self): - return logging.getLogger() # XXX just for now + if not hasattr(self, "_logger"): + logfile = os.path.join(LOGDIR, self.package.repository.name, + self.package.name, self.package.id + ".log") + + # Ensure that logging directory exists + util.mkdir(os.path.dirname(logfile)) + + self._logger = logging.getLogger(self.package.id) + + fh = logging.FileHandler(logfile) + fh.setFormatter(logging.Formatter("%(message)s")) + fh.setLevel(logging.NOTSET) + + self._logger.addHandler(fh) + + return self._logger
def chrootPath(self, *args): return os.path.join(BUILDDIR, "environments", self.package.id, *args) @@ -305,6 +321,9 @@ class Build(_Environment): return v
def build(self, *args, **kwargs): + # Save starting time + time_start = time.time() + try: self.make("package") except: @@ -319,6 +338,9 @@ class Build(_Environment): mail.report_error(self.package) raise
+ # Log time that was needed to build the package + self.logger.info("Build time: %.2fs" % (time.time() - time_start)) + if config["cleanup_on_success"]: self.clean()
diff --git a/naoki/logger.py b/naoki/logger.py index 5ecf0ce..17a409e 100644 --- a/naoki/logger.py +++ b/naoki/logger.py @@ -2,7 +2,6 @@
import curses import logging -import logging.config import logging.handlers import sys import time @@ -13,77 +12,45 @@ logging.raiseExceptions = 0 from constants import *
class Logging(object): - def __init__(self, naoki): - self.naoki = naoki - - self.setup() - - def setup(self): + def __init__(self): self.log = logging.getLogger() + self.log.setLevel(logging.NOTSET)
- log_ini = config["log_config_file"] - if os.path.exists(log_ini): - logging.config.fileConfig(log_ini) + # Initialize console + ch = self.console + ch.setLevel(logging.INFO)
if sys.stderr.isatty(): curses.setupterm() - self.log.handlers[0].setFormatter(_ColorLogFormatter()) - - # Set default configuration - self.quiet(config["quiet"]) - - self.log.handlers[0].setLevel(logging.DEBUG) - logging.getLogger("naoki").propagate = 1 + ch.setFormatter(_ColorLogFormatter()) + else: + ch.setFormatter(logging.Formatter("[%(levelname)s] %(message)s")) + self.log.addHandler(ch)
+ # Initialize log file if not os.path.isdir(LOGDIR): os.makedirs(LOGDIR) fh = logging.handlers.RotatingFileHandler(config["log_file"], maxBytes=10*1024**2, backupCount=6) fh.setFormatter(logging.Formatter("[%(levelname)s] %(message)s")) - fh.setLevel(logging.NOTSET) + fh.setLevel(logging.DEBUG) self.log.addHandler(fh)
- def quiet(self, val): - if val: - self.log.debug("Enabled quiet logging mode") - self.log.handlers[0].setLevel(logging.WARNING) - else: - #self.log.debug("Enabled verbose logging mode") - self.log.handlers[0].setLevel(logging.INFO) - def debug(self, val): if val: - self.log.handlers[0].setLevel(logging.DEBUG) + self.console.setLevel(logging.DEBUG) self.log.debug("Enabled debug logging mode") else: self.log.debug("Disabled debug logging mode") - self.log.handlers[0].setLevel(logging.INFO) - - def _setupBuildLogger(self, logger, package): - logger.setLevel(logging.DEBUG) - logger.parent = self.log - logger.propagate = 1 - - logfile = package.logfile - logdir = os.path.dirname(logfile) - - if not os.path.exists(logdir): - os.makedirs(logdir) - - handler = logging.handlers.RotatingFileHandler(logfile, - maxBytes=10*1024**2, backupCount=5) - - formatter = logging.Formatter("[BUILD] %(message)s") - handler.setFormatter(formatter) + self.console.setLevel(logging.INFO)
- logger.addHandler(handler) + @property + def console(self): + console = self.log.handlers[0]
- def getBuildLogger(self, package): - logger = logging.getLogger(package.id) - if not logger.handlers: - self._setupBuildLogger(logger, package) + assert isinstance(console, logging.StreamHandler)
- return logger + return console
# defaults to module verbose log diff --git a/naoki/terminal.py b/naoki/terminal.py index 039f8a9..7d9f1fa 100644 --- a/naoki/terminal.py +++ b/naoki/terminal.py @@ -257,12 +257,8 @@ class Commandline(object): self.__process_global(self.args)
def __process_global(self, args): - # Set quiet mode - self.naoki.logging.quiet(args.quiet) - # Set debugging mode - config.debug = args.debug - self.naoki.logging.debug(args.debug) + self.naoki.debug(args.debug)
# Set architecture arches.set_default(args.arch) @@ -286,7 +282,7 @@ class Commandline(object): Option("ignore_dependency_errors", ["-i", "--ignore-dependency-errors"], help="Ignore dependency errors."), Option("shell", ["-s", "--shell"], help="Enter a shell after unsuccessfull build."), - List("packages", help="Give a list of packages to build."), + Argument("package", help="Name of a package to build."), ]),
# Package diff --git a/pkgs/Templates b/pkgs/Templates index f1cba10..e1196ad 100644 --- a/pkgs/Templates +++ b/pkgs/Templates @@ -21,8 +21,7 @@ PKG_FILES = / PKG_DESCRIPTION-$(PKG_NAME_REAL)-devel = Development files of $(THISAPP). PKG_SUMMARY-$(PKG_NAME_REAL)-devel = $(PKG_DESCRIPTION-$(PKG_NAME_REAL)-devel)
-PKG_DEPS-$(PKG_NAME_REAL)-devel = $(PKG_NAME_REAL)=$(THISVER) \ - $(foreach dep,$(PKG_BUILD_DEPS),$(if $(findstring -devel,$(dep)),$(dep))) +PKG_DEPS-$(PKG_NAME_REAL)-devel = $(PKG_NAME_REAL)=$(THISVER)
define PKG_FILES-$(PKG_NAME_REAL)-devel /usr/bin/*-config diff --git a/pkgs/core/dracut/dracut.nm b/pkgs/core/dracut/dracut.nm index e467063..6d80a04 100644 --- a/pkgs/core/dracut/dracut.nm +++ b/pkgs/core/dracut/dracut.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include
PKG_NAME = dracut PKG_VER = 007 -PKG_REL = 1 +PKG_REL = 2
PKG_MAINTAINER = PKG_GROUP = System/Boot @@ -35,8 +35,8 @@ PKG_LICENSE = GPLv2+ PKG_SUMMARY = Initramfs generator using udev.
PKG_DEPS += bash bzip2 cpio coreutils dmraid e2fsprogs eject gzip \ - iproute2 iputils kbd less lvm2 mdadm multipath-tools sysvinit udev \ - util-linux-ng which + iproute2 iputils kbd less libselinux lvm2 mdadm multipath-tools \ + sysvinit udev util-linux-ng which
define PKG_DESCRIPTION dracut is a new, event-driven initramfs infrastructure based around udev. @@ -62,7 +62,4 @@ endef define STAGE_INSTALL cd $(DIR_APP) && make install DESTDIR=$(BUILDROOT) WITH_SWITCH_ROOT=1 \ sbindir=/sbin sysconfdir=/etc mandir=/usr/share/man - - # Remove unneeded modules - rm -rfv $(BUILDROOT)/usr/share/dracut/modules.d/*selinux endef diff --git a/pkgs/core/flex/flex.nm b/pkgs/core/flex/flex.nm index 90e953b..0dd33fb 100644 --- a/pkgs/core/flex/flex.nm +++ b/pkgs/core/flex/flex.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include
PKG_NAME = flex PKG_VER = 2.5.35 -PKG_REL = 0 +PKG_REL = 1
PKG_MAINTAINER = PKG_GROUP = Development/Tools @@ -34,11 +34,9 @@ PKG_URL = http://flex.sourceforge.net/ PKG_LICENSE = BSD PKG_SUMMARY = A tool for creating scanners (text pattern recognizers).
-PKG_BUILD_DEPS+= bison m4 +PKG_BUILD_DEPS+= bison gcc-c++ m4 PKG_DEPS += m4
-# XXX possibly we can remove libfl_pic and things in /usr/include - define PKG_DESCRIPTION The flex program generates scanners. Scanners are programs which can \ recognize lexical patterns in text. Flex takes pairs of regular \ @@ -64,4 +62,6 @@ define STAGE_INSTALL_CMDS echo "#!/bin/sh" > $(BUILDROOT)/usr/bin/lex echo "exec /usr/bin/flex -l "$$@"" >> $(BUILDROOT)/usr/bin/lex chmod 755 $(BUILDROOT)/usr/bin/lex + + rm -rvf $(BUILDROOT)/usr/{include,lib} endef diff --git a/pkgs/core/git/git.nm b/pkgs/core/git/git.nm new file mode 100644 index 0000000..ded2da2 --- /dev/null +++ b/pkgs/core/git/git.nm @@ -0,0 +1,69 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program 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 program 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 program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = git +PKG_VER = 1.7.3.2 +PKG_REL = 0 + +PKG_MAINTAINER = +PKG_GROUP = Development/Tools +PKG_URL = http://git-scm.com/ +PKG_LICENSE = GPLv2 +PKG_SUMMARY = Fast Version Control System. + +PKG_BUILD_DEPS+= expat-devel gettext libcurl-devel openssl-devel zlib-devel +PKG_DEPS += less openssh-clients rsync /usr/bin/vi + +define PKG_DESCRIPTION + Git is a fast, scalable, distributed revision control system with an \ + unusually rich command set that provides both high-level operations \ + and full access to internals. +endef + +PKG_TARBALL = $(THISAPP).tar.bz2 + +define STAGE_PREPARE_CMDS + echo "CFLAGS = $(CFLAGS)" > $(DIR_APP)/config.mak + echo "BLK_SHA1 = 1" >> $(DIR_APP)/config.mak + echo "NEEDS_CRYPTO_WITH_SSL = 1" >> $(DIR_APP)/config.mak + echo "NO_PERL = 1" >> $(DIR_APP)/config.mak + echo "NO_PYTHON = 1" >> $(DIR_APP)/config.mak + echo "NO_TCLTK = 1" >> $(DIR_APP)/config.mak + echo "ETC_GITCONFIG = /etc/gitconfig" >> $(DIR_APP)/config.mak + echo "DESTDIR = $(BUILDROOT)" >> $(DIR_APP)/config.mak + echo "INSTALL = install -p" >> $(DIR_APP)/config.mak + echo "GITWEB_PROJECTROOT = /var/lib/git" >> $(DIR_APP)/config.mak + echo "htmldir = /usr/share/doc/$(THISAPP)" >> $(DIR_APP)/config.mak + echo "prefix = /usr" >> $(DIR_APP)/config.mak + echo "gitwebdir = /var/www/git" >> $(DIR_APP)/config.mak + echo "gitexecdir = lib/git-core" >> $(DIR_APP)/config.mak +endef + +define STAGE_BUILD + cd $(DIR_APP) && make $(PARALLELISMFLAGS) +endef + +STAGE_INSTALL_TARGETS += INSTALLDIRS=vendor diff --git a/pkgs/core/gmp/gmp.nm b/pkgs/core/gmp/gmp.nm index f2fe601..9084e7a 100644 --- a/pkgs/core/gmp/gmp.nm +++ b/pkgs/core/gmp/gmp.nm @@ -46,7 +46,7 @@ endef
PKG_TARBALL = $(THISAPP).tar.bz2
-PKG_BUILD_DEPS+= m4 +PKG_BUILD_DEPS+= gcc-c++ m4
PKG_PACKAGES += $(PKG_NAME_REAL)-devel
diff --git a/pkgs/core/libgcrypt/libgcrypt.nm b/pkgs/core/libgcrypt/libgcrypt.nm index 6c50144..080b244 100644 --- a/pkgs/core/libgcrypt/libgcrypt.nm +++ b/pkgs/core/libgcrypt/libgcrypt.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include
PKG_NAME = libgcrypt PKG_VER = 1.4.6 -PKG_REL = 1 +PKG_REL = 2
PKG_MAINTAINER = PKG_GROUP = System/Libraries @@ -35,6 +35,7 @@ PKG_LICENSE = LGPLv2.1+ PKG_SUMMARY = A general-purpose cryptography library.
PKG_BUILD_DEPS+= gcc-c++ libgpg-error-devel +PKG_DEPS-$(PKG_NAME_REAL)-devel += libgpg-error-devel
define PKG_DESCRIPTION Libgcrypt is a general purpose crypto library based on the code used \ diff --git a/pkgs/core/ncurses/ncurses.nm b/pkgs/core/ncurses/ncurses.nm index 10d00db..251a8f1 100644 --- a/pkgs/core/ncurses/ncurses.nm +++ b/pkgs/core/ncurses/ncurses.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include
PKG_NAME = ncurses PKG_VER = 5.7 -PKG_REL = 0 +PKG_REL = 1
PKG_MAINTAINER = PKG_GROUP = System/Base @@ -34,7 +34,7 @@ PKG_URL = http://invisible-island.net/ncurses/ncurses.html PKG_LICENSE = MIT PKG_SUMMARY = Ncurses support utilities.
-PKG_PACKAGES += $(PKG_NAME_REAL)-devel +PKG_BUILD_DEPS+= gcc-c++
define PKG_DESCRIPTION The curses library routines are a terminal-independent method of \ @@ -45,9 +45,7 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
-############################################################################### -# Installation Details -############################################################################### +PKG_PACKAGES += $(PKG_NAME_REAL)-devel
define STAGE_BUILD cd $(DIR_APP) && \ diff --git a/src/scripts/checkrelro b/src/scripts/checkrelro deleted file mode 100755 index 8bec63f..0000000 --- a/src/scripts/checkrelro +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -function message() { - printf "%-40s - %s\n" "${file}" "$@" -} - -function verbose() { - [ "${verbose}" = "1" ] -} - -files= -for arg in $@; do - case "${arg}" in - --verbose|-v) - verbose=1 - continue - ;; - esac - if [ -d "${arg}" ]; then - files="${files} $(find ${arg} -type f)" - else - files="${files} ${arg}" - fi -done - -for file in ${files}; do - if [ -L "${file}" ] || \ - (file ${file} | grep -vq "shared object"); then - continue - fi - - if readelf -l ${file} 2>/dev/null | grep -q "GNU_RELRO"; then - if readelf -d ${file} 2>/dev/null | grep -q "BIND_NOW"; then - verbose && message "full RELRO" - else - message "partial RELRO" - fi - else - message "no RELRO" - fi -done diff --git a/src/scripts/edit-kernel-config b/src/scripts/edit-kernel-config deleted file mode 100644 index f8bb6a4..0000000 --- a/src/scripts/edit-kernel-config +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -cd /usr/src/linux* - -cp -f /usr/src/src/kernel/kernel.config .config - -make menuconfig - -if [ "$?" -eq "0" ]; then - cp -f .config /usr/src/src/kernel/kernel.config -fi diff --git a/src/scripts/py-extract-egg b/src/scripts/py-extract-egg deleted file mode 100755 index fe01713..0000000 --- a/src/scripts/py-extract-egg +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Extract python eggs - -EGG=${1} - -if [ -z "${EGG}" ] || [ ! -e "${EGG}" ]; then - echo "$0: No egg given or file does not exist." >&2 - exit 1 -fi - -cd $(dirname ${EGG}) - -unzip -o ${EGG} || exit 1 - -rm -rf EGG-INFO #${EGG} diff --git a/src/scripts/readhash b/src/scripts/readhash deleted file mode 100644 index 63a3e0f..0000000 --- a/src/scripts/readhash +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# This script reads in variables from a config file, and produces a list of -# commands to run to set these as shell environment variables, it is -# intended to be used as follows: -# -# eval $(readhash /var/ipfire/main/settings) -# - -# shell variables must consist of alphanumeric characters and underscores, -# and begin with an alphabetic character or underscore. -VARNAME='[A-Za-z_][A-zA-z0-9_]*' - -# For the assigned value we only accept a limited number of characters - none -# of which are shell metachars -VARCHARS='A-Za-z0-9=/,._@#+-' -VARVAL="[${VARCHARS}]*" - -sed -ne "s/(${VARNAME})=(${VARVAL})$/\1=\2/p" $1 - -# Accept space only if it's quoted -sed -ne "s/(${VARNAME})=('[ ${VARCHARS}]*')$/\1=\2/p" $1 diff --git a/src/scripts/vpn-watch b/src/scripts/vpn-watch deleted file mode 100644 index 74a4dc5..0000000 --- a/src/scripts/vpn-watch +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -################################################## -##### VPN-Watch.pl Version 0.4 ##### -################################################## -# # -# VPN-Watch is part of the IPFire Firewall # -# # -################################################## - -use strict; - -require '/var/ipfire/general-functions.pl'; -my @vpnsettings; -my $i = 0; -my $file = "/var/run/vpn-watch.pid"; -my $debug = 0; - -if ( -e $file ){ - logger("There my be another vpn-watch runnning because $file exists, vpn-watch will try kill the process."); - open(FILE, "<$file"); - my $PID = <FILE>; - close(FILE); - system("kill -9 $PID"); - } - -system("echo $$ > $file"); - -while ( $i == 0){ - if ($debug){logger("We will wait 300 seconds before next action.");} - sleep(300); - - if (open(FILE, "<${General::swroot}/vpn/config")) { - @vpnsettings = <FILE>; - close(FILE); - unless(@vpnsettings) {exit 1;} - } - -foreach (@vpnsettings){ - my @settings = split(/,/,$_); - - if ($settings[27] ne 'RED'){next;} - if ($settings[4] ne 'net'){next;} - if ($settings[1] ne 'on'){next;}chomp($settings[29]); - if ($settings[29] ne 'on'){next;} - - my $remotehostname = $settings[11]; - - if ($debug){logger("Checking connection to $remotehostname.");} - - my $remoteip = `/usr/bin/ping -c 1 $remotehostname 2>/dev/null | head -n1 | awk '{print $3}' | tr -d '()' | tr -d ':'`;chomp($remoteip); - if ($remoteip eq ""){next;if ($debug){logger("Unable to resolve $remotehostname.");}} - my $connected= `ipsec whack --status | grep $remoteip`; - my $established= `ipsec whack --status | grep '$settings[2]' | grep 'IPsec SA established'`; - - if ( $established eq '' || $connected eq '' ){ - logger("Remote IP for host $remotehostname has changed or no connection is established, restarting connection to $remoteip."); - system("/usr/local/bin/ipsecctrl S $settings[0]"); - next; - } - if ($debug){logger("All connections may be fine nothing was done.");} - } -} - -sub logger { - my $log = shift; - system("logger -t vpnwatch "$log""); -} - diff --git a/tools/functions-packager-find b/tools/functions-packager-find index 7c2ec67..bc97483 100644 --- a/tools/functions-packager-find +++ b/tools/functions-packager-find @@ -132,7 +132,7 @@ function find_python_provides() { file=${file#python}
if [ -n "${file}" ]; then - echo "python-api-${file}" + echo "python-api=${file}" fi done } @@ -148,7 +148,7 @@ function find_python_requires() { file=${file#python}
if [ -n "${file}" ]; then - echo "python-api-${file}" + echo "python-api=${file}" fi fi done diff --git a/tools/quality-agent.d/090-man-pages b/tools/quality-agent.d/090-man-pages new file mode 100755 index 0000000..0720d10 --- /dev/null +++ b/tools/quality-agent.d/090-man-pages @@ -0,0 +1,17 @@ +#!/bin/bash + +. $(dirname ${0})/qa-include + +DESC="Decompressing man-pages..." + +function check() { + for file in $(find ${BUILDROOT}/usr/share/man -type f 2>/dev/null); do + log DEBUG " Processing: ${file}" + if [[ ${file} =~ .gz$ ]]; then + gzip -d ${file} + fi + done +} + +run + diff --git a/tools/quality-agent.d/090-remove-empty-dirs b/tools/quality-agent.d/090-remove-empty-dirs index f8a39fd..d1d61a1 100755 --- a/tools/quality-agent.d/090-remove-empty-dirs +++ b/tools/quality-agent.d/090-remove-empty-dirs @@ -5,7 +5,7 @@ DESC="Remove unwanted files."
function check() { - for dir in {,/usr}/{{,s}bin,lib{,exec}} /usr/share/man{,/man{0,1,2,3,4,5,6,7,8,9}}; do + for dir in $(sort_by_length {,/usr}/{{,s}bin,lib{,exec}} /usr/share/man{,/man{0,1,2,3,4,5,6,7,8,9}}); do dir="${BUILDROOT}/${dir}" if [ -d "${dir}" ] && [ "$(ls -1A ${dir} | wc -l)" = "0" ]; then log DEBUG " Removing ${dir}"
hooks/post-receive -- IPFire 3.x development tree