From 839953f1113c70d13560bfd05c5e52139c7f562f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 6 Apr 2012 23:37:32 +0200 Subject: pkgdelta: implement requirments for delta generation Big deltas or deltas for very small packages are not needed so we should check that and not generate any. Signed-off-by: Florian Pritz Signed-off-by: Dan McGee --- doc/pkgdelta.8.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/pkgdelta.8.txt b/doc/pkgdelta.8.txt index 3804c5d9..5913dba6 100644 --- a/doc/pkgdelta.8.txt +++ b/doc/pkgdelta.8.txt @@ -11,7 +11,7 @@ pkgdelta - package delta generation utility Synopsis -------- -'pkgdelta' [-q] +'pkgdelta' [options] Description @@ -27,6 +27,16 @@ significantly. Options ------- +*--max-delta-size *:: + Only create delta files if the delta is smaller than ratio * package_size. + Possible values: 0.0 to 2.0. + Recommended values: 0.2 to 0.9. + Default value: 0.7 + +*--min-pkg-size *:: + Minimal size of the package file in bytes to be considered for delta creation. + Default value: 1048576 bytes = 1MiB + *-q, \--quiet*:: Be quiet. Do not output anything but warnings and errors. -- cgit v1.2.3-54-g00ecf From 5f71570ec48588bf24bfe786f40b500216084d07 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 13 Apr 2012 15:40:30 -0400 Subject: makepkg: restrict allowed characters in pkgname Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- doc/PKGBUILD.5.txt | 5 +++-- scripts/makepkg.sh.in | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index fad93e5c..ffbb69bd 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -40,8 +40,9 @@ similar to `$_basekernver`. *pkgname (array)*:: Either the name of the package or an array of names for split packages. - Because it will be used in the package filename, this has to be unix-friendly. - Members of the array are not allowed to start with hyphens. + Valid characters for members of this array are alphanumerics, and any of + the following characters: ```@ . _ + -`''. Additionally, names are not + allowed to start with hyphens. *pkgver*:: The version of the software as released from the author (e.g., '2.7.1'). diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index eeb7ede1..6990572b 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1454,6 +1454,11 @@ check_sanity() { error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgname" ret=1 fi + if [[ $i = *[^[:alnum:]+_.@-]* ]]; then + error "$(gettext "%s contains invalid characters: '%s'")" \ + 'pkgname' "${pkgname//[[:alnum:]+_.@-]}" + ret=1 + fi done if [[ ${pkgbase:0:1} = "-" ]]; then -- cgit v1.2.3-54-g00ecf