From: Michael Tremer Date: Tue, 19 Feb 2013 22:31:21 +0000 (+0100) Subject: pakfire: Import latest patches from upstream. X-Git-Tag: pango~310^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=91d1c8a9207f9c436611e019f6fb6bb40e2ea3b4;p=people%2Fstevee%2Fipfire-3.x.git pakfire: Import latest patches from upstream. This comes with a number of random changes all over the field. --- diff --git a/pakfire/pakfire.nm b/pakfire/pakfire.nm index 9eebd23ec..4e2c6a5db 100644 --- a/pakfire/pakfire.nm +++ b/pakfire/pakfire.nm @@ -5,7 +5,7 @@ name = pakfire version = 0.9.24 -release = 2 +release = 3 maintainer = Michael Tremer groups = System/Packaging diff --git a/pakfire/patches/0001-A-new-try-to-get-the-parallelism-straight.patch b/pakfire/patches/0001-A-new-try-to-get-the-parallelism-straight.patch index cae4b7501..aa22e1944 100644 --- a/pakfire/patches/0001-A-new-try-to-get-the-parallelism-straight.patch +++ b/pakfire/patches/0001-A-new-try-to-get-the-parallelism-straight.patch @@ -1,7 +1,7 @@ From 369ac3b365091ba1a26fb266a94d97adb3719cbc Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 24 Jan 2013 01:51:29 +0100 -Subject: [PATCH 1/4] A new try to get the parallelism straight. +Subject: [PATCH 01/17] A new try to get the parallelism straight. Getting back to CPU cores * 2. --- @@ -30,5 +30,5 @@ index a9154de..6f67d31 100644 # Create an instance of this class to only keep it once in memory. -- -1.7.11.7 +1.8.1.2 diff --git a/pakfire/patches/0002-Remove-some-test-code.patch b/pakfire/patches/0002-Remove-some-test-code.patch new file mode 100644 index 000000000..50e5c9f3e --- /dev/null +++ b/pakfire/patches/0002-Remove-some-test-code.patch @@ -0,0 +1,73 @@ +From 2ee28ea5d213ce4726dd1527b6465059c9b0fa4b Mon Sep 17 00:00:00 2001 +From: Michael Tremer +Date: Thu, 24 Jan 2013 02:35:11 +0100 +Subject: [PATCH 02/17] Remove some test code. + +--- + python/pakfire/client/test.py | 54 ------------------------------------------- + 1 file changed, 54 deletions(-) + delete mode 100644 python/pakfire/client/test.py + +diff --git a/python/pakfire/client/test.py b/python/pakfire/client/test.py +deleted file mode 100644 +index 8bf5fd4..0000000 +--- a/python/pakfire/client/test.py ++++ /dev/null +@@ -1,54 +0,0 @@ +-#!/usr/bin/python +- +-import random +-import sys +-import time +- +-def fork_builder(*args, **kwargs): +- cb = ClientBuilder(*args, **kwargs) +- +- try: +- cb() +- except Exception, e: +- print e +- sys.exit(1) +- +-class ClientBuilder(object): +- def __init__(self, id): +- self.id = id +- +- def __call__(self, *args): +- print "Running", self.id, args +- +- time.sleep(2) +- +- if random.choice((False, False, False, True)): +- raise Exception, "Process died" +- +- +-import multiprocessing +- +- +-processes = [] +- +-while True: +- # Check if there are at least 2 processes running. +- if len(processes) < 2: +- process = multiprocessing.Process(target=fork_builder, args=(len(processes),)) +- +- process.daemon = True +- process.start() +- +- processes.append(process) +- +- print len(processes), "in process list:", processes +- +- for process in processes: +- time.sleep(0.5) +- +- print process.name, "is alive?", process.is_alive() +- +- if not process.is_alive(): +- print "Removing process", process +- print " Exitcode:", process.exitcode +- processes.remove(process) +-- +1.8.1.2 + diff --git a/pakfire/patches/0003-Replace-pychecker-by-pylint.patch b/pakfire/patches/0003-Replace-pychecker-by-pylint.patch new file mode 100644 index 000000000..16c7b2380 --- /dev/null +++ b/pakfire/patches/0003-Replace-pychecker-by-pylint.patch @@ -0,0 +1,43 @@ +From b09a8e635bd5c77241828abb124b65a49c867fc7 Mon Sep 17 00:00:00 2001 +From: Michael Tremer +Date: Thu, 24 Jan 2013 02:35:45 +0100 +Subject: [PATCH 03/17] Replace pychecker by pylint. + +--- + Makefile | 4 ++-- + runpychecker.sh | 8 -------- + 2 files changed, 2 insertions(+), 10 deletions(-) + delete mode 100755 runpychecker.sh + +diff --git a/Makefile b/Makefile +index 581332c..c873463 100644 +--- a/Makefile ++++ b/Makefile +@@ -39,8 +39,8 @@ install: build + done + + .PHONY: check +-check: +- ./runpychecker.sh ++check: all ++ PYTHONPATH=python/src/ pylint -E python/pakfire + + .PHONY: po + po: +diff --git a/runpychecker.sh b/runpychecker.sh +deleted file mode 100755 +index 383be9f..0000000 +--- a/runpychecker.sh ++++ /dev/null +@@ -1,8 +0,0 @@ +-#!/bin/bash +- +-pychecker --only --limit 1000 \ +- --maxlines 500 --maxargs 20 --maxbranches 80 --maxlocals 60 --maxreturns 20 \ +- --no-callinit --no-local --no-shadow --no-shadowbuiltin \ +- --no-import --no-miximport --no-pkgimport --no-reimport \ +- --no-argsused --no-varargsused --no-override \ +- $(find pakfire -name "*.py" ) +-- +1.8.1.2 + diff --git a/pakfire/patches/0004-Make-a-variable-that-contains-all-python-files.patch b/pakfire/patches/0004-Make-a-variable-that-contains-all-python-files.patch new file mode 100644 index 000000000..62e8091a0 --- /dev/null +++ b/pakfire/patches/0004-Make-a-variable-that-contains-all-python-files.patch @@ -0,0 +1,32 @@ +From 8be83109b81fde156138afc7de9fb248095cca35 Mon Sep 17 00:00:00 2001 +From: Michael Tremer +Date: Thu, 24 Jan 2013 02:36:10 +0100 +Subject: [PATCH 04/17] Make a variable that contains all python files. + +--- + Makeconfig | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makeconfig b/Makeconfig +index 0c67353..e717238 100644 +--- a/Makeconfig ++++ b/Makeconfig +@@ -39,6 +39,8 @@ ifeq "$(DEBIAN)" "1" + else + PYTHON_DIR = $(LIBDIR)/python$(PYTHON_VERSION)/site-packages + endif ++PYTHON_FILES = $(addsuffix /*.py,$(addprefix python/,$(PYTHON_MODULES))) ++PYTHON_FILES += tools/pakfire-multicall.py + + # The place, where all internally used scripts and bins are copied. + SCRIPT_DIR = $(PREFIX)/lib/$(PACKAGE_NAME) +@@ -47,5 +49,4 @@ TOP := $(dir $(lastword $(MAKEFILE_LIST))) + + # A list of all files that contain translations and need to + # be indexed. +-TRANS_FILES = $(addsuffix /*.py,$(addprefix python/,$(PYTHON_MODULES))) +-TRANS_FILES += python/src/*.c tools/pakfire-multicall.py ++TRANS_FILES = $(PYTHON_FILES) python/src/*.c +-- +1.8.1.2 + diff --git a/pakfire/patches/0005-pakfire.packages.solv-Remove-duplicate-method-uuid.patch b/pakfire/patches/0005-pakfire.packages.solv-Remove-duplicate-method-uuid.patch new file mode 100644 index 000000000..93b0043bd --- /dev/null +++ b/pakfire/patches/0005-pakfire.packages.solv-Remove-duplicate-method-uuid.patch @@ -0,0 +1,27 @@ +From a4104146edcbc0d646f5e68c366735e514ad295e Mon Sep 17 00:00:00 2001 +From: Michael Tremer +Date: Thu, 24 Jan 2013 02:37:27 +0100 +Subject: [PATCH 05/17] pakfire.packages.solv: Remove duplicate method "uuid". + +--- + python/pakfire/packages/solv.py | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/python/pakfire/packages/solv.py b/python/pakfire/packages/solv.py +index 85bf487..af2c947 100644 +--- a/python/pakfire/packages/solv.py ++++ b/python/pakfire/packages/solv.py +@@ -135,10 +135,6 @@ class SolvPackage(base.Package): + return vendor + + @property +- def uuid(self): +- return self.solvable.get_uuid() +- +- @property + def build_host(self): + return self.solvable.get_buildhost() + +-- +1.8.1.2 + diff --git a/pakfire/patches/0006-Create-all-hash-objects-with-hashlib-s-new-function.patch b/pakfire/patches/0006-Create-all-hash-objects-with-hashlib-s-new-function.patch new file mode 100644 index 000000000..62228fd04 --- /dev/null +++ b/pakfire/patches/0006-Create-all-hash-objects-with-hashlib-s-new-function.patch @@ -0,0 +1,91 @@ +From e3bcfd234622e951d22fbfab631173e7c2a57a6b Mon Sep 17 00:00:00 2001 +From: Michael Tremer +Date: Thu, 24 Jan 2013 02:41:26 +0100 +Subject: [PATCH 06/17] Create all hash objects with hashlib's "new" function. + +--- + python/pakfire/client/builder.py | 2 +- + python/pakfire/packages/file.py | 2 +- + python/pakfire/packages/packager.py | 4 ++-- + python/pakfire/server.py | 3 ++- + python/pakfire/util.py | 2 +- + 5 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/python/pakfire/client/builder.py b/python/pakfire/client/builder.py +index 9798cc4..9aefa1c 100644 +--- a/python/pakfire/client/builder.py ++++ b/python/pakfire/client/builder.py +@@ -408,7 +408,7 @@ class ClientBuilder(object): + + # Check if the download checksum matches (if provided). + if self.build_source_hash512: +- h = hashlib.sha512() ++ h = hashlib.new("sha512") + f = open(tmpfile, "rb") + while True: + buf = f.read(BUFFER_SIZE) +diff --git a/python/pakfire/packages/file.py b/python/pakfire/packages/file.py +index 55f9694..990f6f7 100644 +--- a/python/pakfire/packages/file.py ++++ b/python/pakfire/packages/file.py +@@ -211,7 +211,7 @@ class FilePackage(base.Package): + continue + + # Calc hash of the current configuration file. +- config_hash1 = hashlib.sha512() ++ config_hash1 = hashlib.new("sha512") + f = open(target) + while True: + buf = f.read(BUFFER_SIZE) +diff --git a/python/pakfire/packages/packager.py b/python/pakfire/packages/packager.py +index a456602..c8e1c78 100644 +--- a/python/pakfire/packages/packager.py ++++ b/python/pakfire/packages/packager.py +@@ -104,7 +104,7 @@ class Packager(object): + # Calculating the hash sum of the added file + # and store it in the chksums file. + f = open(filename) +- h = hashlib.sha512() ++ h = hashlib.new("sha512") + while True: + buf = f.read(BUFFER_SIZE) + if not buf: +@@ -164,7 +164,7 @@ class Packager(object): + # Calculate SHA512 hash of regular files. + if m.isreg(): + mobj = datafile.extractfile(m) +- h = hashlib.sha512() ++ h = hashlib.new("sha512") + + while True: + buf = mobj.read(BUFFER_SIZE) +diff --git a/python/pakfire/server.py b/python/pakfire/server.py +index 64e3dd5..edc070f 100644 +--- a/python/pakfire/server.py ++++ b/python/pakfire/server.py +@@ -82,7 +82,8 @@ class Source(object): + + @property + def path(self): +- h = hashlib.sha1(self.url) ++ h = hashlib.new("sha1") ++ h.update(self.url) + + # XXX path is to be changed + return "/var/cache/pakfire/sources/%s" % h.hexdigest() +diff --git a/python/pakfire/util.py b/python/pakfire/util.py +index 9fa011a..84128cd 100644 +--- a/python/pakfire/util.py ++++ b/python/pakfire/util.py +@@ -197,7 +197,7 @@ def format_speed(s): + return "%sB/s" % format_size(s) + + def calc_hash1(filename=None, data=None): +- h = hashlib.sha1() ++ h = hashlib.new("sha1") + + if filename: + f = open(filename) +-- +1.8.1.2 + diff --git a/pakfire/patches/0007-Fix-wrong-variable-name.patch b/pakfire/patches/0007-Fix-wrong-variable-name.patch new file mode 100644 index 000000000..d7b4f2b8e --- /dev/null +++ b/pakfire/patches/0007-Fix-wrong-variable-name.patch @@ -0,0 +1,26 @@ +From c844646a49e8d30db91f75d115b28886b4775a94 Mon Sep 17 00:00:00 2001 +From: Michael Tremer +Date: Thu, 24 Jan 2013 02:43:54 +0100 +Subject: [PATCH 07/17] Fix wrong variable name. + +--- + python/pakfire/packages/file.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/python/pakfire/packages/file.py b/python/pakfire/packages/file.py +index 990f6f7..039103e 100644 +--- a/python/pakfire/packages/file.py ++++ b/python/pakfire/packages/file.py +@@ -132,7 +132,8 @@ class FilePackage(base.Package): + payload_archive = tar.InnerTarFile.open(fileobj=payload) + + else: +- raise Exception, "Unhandled payload compression type: %s" % payload_compression ++ raise Exception, "Unhandled payload compression type: %s" % \ ++ self.payload_compression + + return payload_archive + +-- +1.8.1.2 + diff --git a/pakfire/patches/0008-FilePackage-Initialize-_type.patch b/pakfire/patches/0008-FilePackage-Initialize-_type.patch new file mode 100644 index 000000000..c445b1a72 --- /dev/null +++ b/pakfire/patches/0008-FilePackage-Initialize-_type.patch @@ -0,0 +1,25 @@ +From 9accbba591014c8b2b0cb1c0b7c4fbf914caba8e Mon Sep 17 00:00:00 2001 +From: Michael Tremer +Date: Thu, 24 Jan 2013 02:44:53 +0100 +Subject: [PATCH 08/17] FilePackage: Initialize _type. + +--- + python/pakfire/packages/file.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/python/pakfire/packages/file.py b/python/pakfire/packages/file.py +index 039103e..7cf3630 100644 +--- a/python/pakfire/packages/file.py ++++ b/python/pakfire/packages/file.py +@@ -46,6 +46,8 @@ class FilePackage(base.Package): + This class is a wrapper that reads package data from the (outer) + tarball and should never be used solely. + """ ++ _type = None ++ + def __init__(self, pakfire, repo, filename): + base.Package.__init__(self, pakfire, repo) + self.filename = os.path.abspath(filename) +-- +1.8.1.2 + diff --git a/pakfire/patches/0002-builder-Remove-pids-from-list-of-running-jobs-when-j.patch b/pakfire/patches/0009-builder-Remove-pids-from-list-of-running-jobs-when-j.patch similarity index 93% rename from pakfire/patches/0002-builder-Remove-pids-from-list-of-running-jobs-when-j.patch rename to pakfire/patches/0009-builder-Remove-pids-from-list-of-running-jobs-when-j.patch index 53ca0088c..af74f2cff 100644 --- a/pakfire/patches/0002-builder-Remove-pids-from-list-of-running-jobs-when-j.patch +++ b/pakfire/patches/0009-builder-Remove-pids-from-list-of-running-jobs-when-j.patch @@ -1,7 +1,7 @@ From c3319c905d03176308e01175f344cf33bd926113 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 3 Feb 2013 21:36:00 +0100 -Subject: [PATCH 2/4] builder: Remove pids from list of running jobs when job +Subject: [PATCH 09/17] builder: Remove pids from list of running jobs when job has finished. --- @@ -39,5 +39,5 @@ index 9798cc4..2d6280c 100644 return True -- -1.7.11.7 +1.8.1.2 diff --git a/pakfire/patches/0003-Revert-A-new-try-to-get-the-parallelism-straight.patch b/pakfire/patches/0010-Revert-A-new-try-to-get-the-parallelism-straight.patch similarity index 92% rename from pakfire/patches/0003-Revert-A-new-try-to-get-the-parallelism-straight.patch rename to pakfire/patches/0010-Revert-A-new-try-to-get-the-parallelism-straight.patch index 7db604a1c..6ad6b41f5 100644 --- a/pakfire/patches/0003-Revert-A-new-try-to-get-the-parallelism-straight.patch +++ b/pakfire/patches/0010-Revert-A-new-try-to-get-the-parallelism-straight.patch @@ -1,7 +1,7 @@ From 879abfa1d86f820326bd8edab5e7d5c8991cc9f0 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 3 Feb 2013 21:36:30 +0100 -Subject: [PATCH 3/4] Revert "A new try to get the parallelism straight." +Subject: [PATCH 10/17] Revert "A new try to get the parallelism straight." This reverts commit 369ac3b365091ba1a26fb266a94d97adb3719cbc and obviously this is not a solution either. @@ -31,5 +31,5 @@ index 6f67d31..a9154de 100644 # Create an instance of this class to only keep it once in memory. -- -1.7.11.7 +1.8.1.2 diff --git a/pakfire/patches/0004-build-parallelism-New-way-to-figure-that-out.patch b/pakfire/patches/0011-build-parallelism-New-way-to-figure-that-out.patch similarity index 94% rename from pakfire/patches/0004-build-parallelism-New-way-to-figure-that-out.patch rename to pakfire/patches/0011-build-parallelism-New-way-to-figure-that-out.patch index f4621fc45..7e1eb5878 100644 --- a/pakfire/patches/0004-build-parallelism-New-way-to-figure-that-out.patch +++ b/pakfire/patches/0011-build-parallelism-New-way-to-figure-that-out.patch @@ -1,7 +1,7 @@ From f7a632ab069e3439f312023fc599dc659c197568 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 3 Feb 2013 21:40:16 +0100 -Subject: [PATCH 4/4] build parallelism: New way to figure that out. +Subject: [PATCH 11/17] build parallelism: New way to figure that out. The system will now use either the old formula, CPU cores * 2 + 1 or the amount of memory in megabytes devided @@ -36,5 +36,5 @@ index a9154de..6d54d5f 100644 # Create an instance of this class to only keep it once in memory. -- -1.7.11.7 +1.8.1.2 diff --git a/pakfire/patches/0012-Revert-builder-Remove-pids-from-list-of-running-jobs.patch b/pakfire/patches/0012-Revert-builder-Remove-pids-from-list-of-running-jobs.patch new file mode 100644 index 000000000..bee9f1e53 --- /dev/null +++ b/pakfire/patches/0012-Revert-builder-Remove-pids-from-list-of-running-jobs.patch @@ -0,0 +1,44 @@ +From 2121826fbbca5ab407bafcd570e668b6c9afd49e Mon Sep 17 00:00:00 2001 +From: Michael Tremer +Date: Tue, 5 Feb 2013 22:06:51 +0100 +Subject: [PATCH 12/17] Revert "builder: Remove pids from list of running jobs + when job has finished." + +This reverts commit c3319c905d03176308e01175f344cf33bd926113. +--- + python/pakfire/client/builder.py | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/python/pakfire/client/builder.py b/python/pakfire/client/builder.py +index 2d6280c..9798cc4 100644 +--- a/python/pakfire/client/builder.py ++++ b/python/pakfire/client/builder.py +@@ -251,8 +251,6 @@ class PakfireDaemon(object): + + # Finally, remove the process from the process list. + self.processes.remove(process) +- if self.pid2jobid.has_key(process.id): +- del self.pid2jobid[process.id] + + return ret + +@@ -276,6 +274,7 @@ class PakfireDaemon(object): + for process in self.processes[:]: + job_id = self.pid2jobid.get(process.pid, None) + if job_id and job_id in aborted_jobs: ++ + # Kill the process. + log.info("Killing process %s which was aborted by the user." \ + % process.pid) +@@ -284,8 +283,6 @@ class PakfireDaemon(object): + # Remove the process from the process list to avoid + # that is will be cleaned up in the normal way. + self.processes.remove(process) +- if self.pid2jobid.has_key(process.id): +- del self.pid2jobid[process.id] + + return True + +-- +1.8.1.2 + diff --git a/pakfire/patches/0013-Enhance-perl-cleanup.patch b/pakfire/patches/0013-Enhance-perl-cleanup.patch new file mode 100644 index 000000000..751166288 --- /dev/null +++ b/pakfire/patches/0013-Enhance-perl-cleanup.patch @@ -0,0 +1,72 @@ +From 9cbc043da8bcbd52ab3ef9b710abcbcd3a72fb84 Mon Sep 17 00:00:00 2001 +From: Michael Tremer +Date: Sun, 10 Feb 2013 15:34:02 +0100 +Subject: [PATCH 13/17] Enhance perl cleanup. + +.bs files with size == 0 get removed. +--- + macros/build.macro | 13 +++---------- + macros/perl.macro | 19 +++++++++++++++++++ + 2 files changed, 22 insertions(+), 10 deletions(-) + +diff --git a/macros/build.macro b/macros/build.macro +index 4e4d830..0979653 100644 +--- a/macros/build.macro ++++ b/macros/build.macro +@@ -59,15 +59,6 @@ def MACRO_PYTHON_COMPILE + fi + end + +-MACRO_PERL_CLEANUP +- # Remove perllocal.pod. +- rm -f %{BUILDROOT}/usr/lib*/perl*/perllocal.pod +- +- # Remove all .packlist files. +- find %{BUILDROOT}/usr/{lib,share}/perl* -name ".packlist" 2>/dev/null | \ +- xargs --no-run-if-empty rm -f +-end +- + MACRO_PATCHES = /usr/lib/pakfire/patch --search-path=%{DIR_PATCHES} "%{patches}" + + # Pre-defined build scripts. +@@ -145,7 +136,9 @@ build + + %{MACRO_INSTALL_FILES} + %{MACRO_PYTHON_COMPILE} +- %{MACRO_PERL_CLEANUP} ++ ++ # Cleanup perl modules. ++ %{perl_cleanup} + + %{install_post} + +diff --git a/macros/perl.macro b/macros/perl.macro +index c1be59f..b29e028 100644 +--- a/macros/perl.macro ++++ b/macros/perl.macro +@@ -7,3 +7,22 @@ perl_vendorarch = %(eval "$(%{perl} -V:installvendorarch)"; echo ${installvendor + perl_vendorlib = %(eval "$(%{perl} -V:installvendorlib)"; echo ${installvendorlib}) + perl_archlib = %(eval "$(%{perl} -V:installarchlib)"; echo ${installarchlib}) + perl_privlib = %(eval "$(%{perl} -V:installprivlib)"; echo ${installprivlib}) ++ ++perl_all_paths = {%{perl_vendorarch},%{perl_vendorlib},%{perl_archlib},%{perl_privlib}} ++ ++# perl_cleanup: Removes unwanted perl files. ++perl_cleanup ++ # Remove perllocal.pod. ++ rm -f %{BUILDROOT}%{perl_all_paths}/perllocal.pod ++ ++ # Remove all .packlist files. ++ find %{BUILDROOT}%{perl_all_paths} -name ".packlist" 2>/dev/null | \ ++ xargs --no-run-if-empty rm -f ++ ++ # Remove all empty .bs files. ++ find %{BUILDROOT}%{perl_all_paths} -name ".bs" -type f -empty 2>/dev/null | \ ++ xargs --no-run-if-empty rm -f ++ ++ # Run user-defined stuff. ++ %{perl_cleanup_cmds} ++end +-- +1.8.1.2 + diff --git a/pakfire/patches/0014-Explicitely-add-hardening-CFLAGS.patch b/pakfire/patches/0014-Explicitely-add-hardening-CFLAGS.patch new file mode 100644 index 000000000..3afaca9ff --- /dev/null +++ b/pakfire/patches/0014-Explicitely-add-hardening-CFLAGS.patch @@ -0,0 +1,25 @@ +From 6216f7249be57583516131398d98eadc2ca1a08d Mon Sep 17 00:00:00 2001 +From: Michael Tremer +Date: Tue, 12 Feb 2013 20:36:30 +0100 +Subject: [PATCH 14/17] Explicitely add hardening CFLAGS. + +--- + macros/cflags.macro | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/macros/cflags.macro b/macros/cflags.macro +index 5dee6f8..a2c583c 100644 +--- a/macros/cflags.macro ++++ b/macros/cflags.macro +@@ -1,6 +1,7 @@ + + # Export CFLAGS + CXXFLAGS +-GLOBAL_CFLAGS = -O2 -g -pipe -Wall -fexceptions --param=ssp-buffer-size=4 ++GLOBAL_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fPIC ++GLOBAL_CFLAGS += -fstack-protector-all --param=ssp-buffer-size=4 + + CFLAGS_i686 = -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables + CFLAGS_x86_64 = -m64 -mtune=generic +-- +1.8.1.2 + diff --git a/pakfire/patches/0015-Add-gir-files-for-gobject-introspection-to-the-DEVEL.patch b/pakfire/patches/0015-Add-gir-files-for-gobject-introspection-to-the-DEVEL.patch new file mode 100644 index 000000000..bbeb7e503 --- /dev/null +++ b/pakfire/patches/0015-Add-gir-files-for-gobject-introspection-to-the-DEVEL.patch @@ -0,0 +1,27 @@ +From 227c1b70277adfeb6e7b3449c44517a42f1fad45 Mon Sep 17 00:00:00 2001 +From: Stefan Schantl +Date: Tue, 12 Feb 2013 20:22:31 +0100 +Subject: [PATCH 15/17] Add gir files for gobject-introspection to the DEVEL + template. + +With this changes all %{datadir}/gir*/ folders (with current gobject-introspection "gir-1.0") automatically will be put into +into the devel packages. +--- + macros/templates.macro | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/macros/templates.macro b/macros/templates.macro +index a2388b9..693fa12 100644 +--- a/macros/templates.macro ++++ b/macros/templates.macro +@@ -55,6 +55,7 @@ packages + %{datadir}/cmake + %{mandir}/man2 + %{mandir}/man3 ++ %{datadir}/gir*/ + %{datadir}/pkgconfig + %{datadir}/vala + end +-- +1.8.1.2 + diff --git a/pakfire/patches/0016-Quality-Agent-Replace-env-ruby.patch b/pakfire/patches/0016-Quality-Agent-Replace-env-ruby.patch new file mode 100644 index 000000000..d1cf13f83 --- /dev/null +++ b/pakfire/patches/0016-Quality-Agent-Replace-env-ruby.patch @@ -0,0 +1,27 @@ +From 0f41600f3e2e38352f87b0a2d130e12b0da26ee3 Mon Sep 17 00:00:00 2001 +From: Stefan Schantl +Date: Tue, 12 Feb 2013 20:26:41 +0100 +Subject: [PATCH 16/17] Quality Agent: Replace "env ruby". + +This commit adds a rule to replace "env ruby" with the correct run command "/usr/bin/ruby". +--- + tools/quality-agent.d/050-invalid-interpreters | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/tools/quality-agent.d/050-invalid-interpreters b/tools/quality-agent.d/050-invalid-interpreters +index deac7a3..63847c7 100755 +--- a/tools/quality-agent.d/050-invalid-interpreters ++++ b/tools/quality-agent.d/050-invalid-interpreters +@@ -28,7 +28,8 @@ check() { + sed -i ${file} \ + -e "s,/usr/bin/env python\(.*\),/usr/bin/python\1," \ + -e "s,/usr/bin/env python,/usr/bin/python," \ +- -e "s,/usr/bin/env perl,/usr/bin/perl," ++ -e "s,/usr/bin/env perl,/usr/bin/perl," \ ++ -e "s,/usr/bin/env ruby,/usr/bin/ruby," + + # If we could not fix it, raise an error + if [ "${interpreter}" = "$(file_get_interpreter ${file})" ]; then +-- +1.8.1.2 + diff --git a/pakfire/patches/0017-Template-macros-Remove-trailing-slash.patch b/pakfire/patches/0017-Template-macros-Remove-trailing-slash.patch new file mode 100644 index 000000000..0ca4f572d --- /dev/null +++ b/pakfire/patches/0017-Template-macros-Remove-trailing-slash.patch @@ -0,0 +1,25 @@ +From 326e179e6cb035b9f789e2b62e193369b3f30d00 Mon Sep 17 00:00:00 2001 +From: Michael Tremer +Date: Tue, 19 Feb 2013 23:27:14 +0100 +Subject: [PATCH 17/17] Template macros: Remove trailing slash. + +--- + macros/templates.macro | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/macros/templates.macro b/macros/templates.macro +index 693fa12..c4cda8c 100644 +--- a/macros/templates.macro ++++ b/macros/templates.macro +@@ -55,7 +55,7 @@ packages + %{datadir}/cmake + %{mandir}/man2 + %{mandir}/man3 +- %{datadir}/gir*/ ++ %{datadir}/gir* + %{datadir}/pkgconfig + %{datadir}/vala + end +-- +1.8.1.2 +