Compare commits
6 Commits
c749f5c595
...
2aea62227c
Author | SHA1 | Date | |
---|---|---|---|
|
2aea62227c | ||
|
1ef86cb3ec | ||
|
750e998c93 | ||
|
0a61682b93 | ||
|
e9ba2b5909 | ||
|
dfe2a87820 |
@ -32,7 +32,7 @@ if [ -d "$REPOSITORY/.git" ]; then
|
|||||||
cd "$REPOSITORY"
|
cd "$REPOSITORY"
|
||||||
git checkout -q "$BRANCH"
|
git checkout -q "$BRANCH"
|
||||||
git fetch -q
|
git fetch -q
|
||||||
git diff --pretty=format: --name-status "$BRANCH" origin/"$BRANCH" | sed "s/M\t/ Edit /g; s/A\t/ Checkout /g; s/D\t/ Delete /g" | sort
|
git diff --pretty=format: --name-status "$BRANCH" origin/"$BRANCH" | sed "s/M\t/ Edit /g; s/A\t/ Checkout /g; s/D\t/ Delete /g; s/R[0-9]\{3\}\t/ Rename /g" | sort
|
||||||
# git-checkout(1) should ensure the existence of an exclude file,
|
# git-checkout(1) should ensure the existence of an exclude file,
|
||||||
# whose length needs to be saved to make this driver idempotent.
|
# whose length needs to be saved to make this driver idempotent.
|
||||||
IGNORE_DEFAULT=$(wc -l .git/info/exclude | cut -d " " -f 1)
|
IGNORE_DEFAULT=$(wc -l .git/info/exclude | cut -d " " -f 1)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
######################## main routine ################################
|
######################## main routine ################################
|
||||||
local pkg_dir src_dir work _local_ here url u pkg_utd f DIR TARGET
|
local N pkg_dir src_dir work _local_ here url u pkg_utd f DIR TARGET
|
||||||
local errDL=0; local errUZ=0; local BSDTAR="/usr/bin/bsdtar --format=gnutar"
|
local errDL=0; local errUZ=0; local BSDTAR="/usr/bin/bsdtar --format=gnutar"
|
||||||
declare -A ZFLAG=([xz]="-J" [bz2]="-j" [gz]="-z" [lz4]="--lz4" [zstd]="--zstd")
|
declare -A ZFLAG=([xz]="-J" [bz2]="-j" [gz]="-z" [lz4]="--lz4" [zstd]="--zstd")
|
||||||
parse_options "$@"
|
parse_options "$@"
|
||||||
@ -149,15 +149,17 @@ if [ "$pkg_utd" = 0 ] || [[ "$PKGMK_FORCE $PKGMK_EXTRACT_ONLY" =~ yes ]]; then
|
|||||||
|| { error "Unsuccessful build!"; cleanup_work; exit "$E_BUILD"; }
|
|| { error "Unsuccessful build!"; cleanup_work; exit "$E_BUILD"; }
|
||||||
|
|
||||||
# Strip binaries
|
# Strip binaries
|
||||||
|
N=$(nproc)
|
||||||
[ -n "$ns_filter" ] || [ ! -f "$PKGMK_ROOT/.nostrip" ] \
|
[ -n "$ns_filter" ] || [ ! -f "$PKGMK_ROOT/.nostrip" ] \
|
||||||
|| ns_filter="| grep -v -f $PKGMK_ROOT/.nostrip"
|
|| ns_filter="| grep -v -f $PKGMK_ROOT/.nostrip"
|
||||||
{ while read -r f; do
|
ns_filter+="| xargs -r -L10 -P$N file --no-buffer --separator '>'"
|
||||||
case $(file -b "$f") in
|
ns_filter+=" -e apptype -e text -e encoding -e cdf -e compress -e tar"
|
||||||
*ELF*executable*not\ stripped*) strip --strip-all "$f" ;;
|
|
||||||
*ELF*shared\ object*not\ stripped*) strip --strip-unneeded "$f" ;;
|
< <(eval find pkg -type f -printf "%P\n" $ns_filter) awk 'BEGIN { FS=">[ ]+" }
|
||||||
current\ ar\ archive) strip --strip-debug "$f" ;;
|
$0 ~ /ELF.*executable.*not stripped/ { print "--strip-all \"" $1 "\"" }
|
||||||
esac
|
$0 ~ /ELF.*shared object.*not stripped/ { print "--strip-unneeded \"" $1 "\"" }
|
||||||
done } < <(eval find pkg -type f $ns_filter)
|
$2 == "current ar archive" { print "--strip-debug \"" $1 "\"" }' \
|
||||||
|
| xargs -r -L1 -P$N strip
|
||||||
|
|
||||||
# Compress anything under /man that does not appear to be gzipped
|
# Compress anything under /man that does not appear to be gzipped
|
||||||
find pkg -type f -path "*/man/man*/*" \! -iname '*.gz' \
|
find pkg -type f -path "*/man/man*/*" \! -iname '*.gz' \
|
||||||
|
@ -307,6 +307,9 @@ sub sync {
|
|||||||
push @drivers, $d;
|
push @drivers, $d;
|
||||||
}
|
}
|
||||||
closedir($drv);
|
closedir($drv);
|
||||||
|
if ($#drivers < 0) {
|
||||||
|
print("No valid ports drivers. Aborting sync.\n"); return;
|
||||||
|
}
|
||||||
if ($#OPT_COLLECTIONS >= 0) { # Update selected collections
|
if ($#OPT_COLLECTIONS >= 0) { # Update selected collections
|
||||||
foreach my $coll (@OPT_COLLECTIONS) {
|
foreach my $coll (@OPT_COLLECTIONS) {
|
||||||
if (! glob("$sup_path/$coll.*")) {
|
if (! glob("$sup_path/$coll.*")) {
|
||||||
@ -482,7 +485,7 @@ sub get_pkgfile_fields {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$Dependencies =~ s/,(| )/ /g;
|
$Dependencies =~ s/,(| )/ /g;
|
||||||
$SoftDeps =~ s/,(| )/ /g;
|
$SoftDeps =~ s/,(| )/ /g; $SoftDeps =~ s/(\051|\050)//g;
|
||||||
if (shift) {
|
if (shift) {
|
||||||
return $Name, $portpath, $Version, $Release, $descrip, $Dependencies,
|
return $Name, $portpath, $Version, $Release, $descrip, $Dependencies,
|
||||||
$url, $SoftDeps, $maintainer, $readme, $preInstall, $postInstall;
|
$url, $SoftDeps, $maintainer, $readme, $preInstall, $postInstall;
|
||||||
@ -760,6 +763,7 @@ sub deporder { # returns a sorted list of packages required.
|
|||||||
print "Dependency cycle found: ";
|
print "Dependency cycle found: ";
|
||||||
foreach (@treewalk) { print "$_ => "; }
|
foreach (@treewalk) { print "$_ => "; }
|
||||||
print "$s\n";
|
print "$s\n";
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
push(@treewalk, $s); $imark{$s}=1;
|
push(@treewalk, $s); $imark{$s}=1;
|
||||||
|
@ -77,26 +77,25 @@ fi
|
|||||||
if [ ! -s Pkgfile ]; then
|
if [ ! -s Pkgfile ]; then
|
||||||
error "no Pkgfile found or Pkgfile empty!"
|
error "no Pkgfile found or Pkgfile empty!"
|
||||||
fi
|
fi
|
||||||
desc="$(<Pkgfile awk '/^# Description:/ {print gensub(/# Description:[[:blank:]]*(.*)/,"\\1","g",$0)}')"
|
|
||||||
if [ "$desc" = "" ]; then
|
|
||||||
error "no Description in Pkgfile!"
|
|
||||||
fi
|
|
||||||
url="$(<Pkgfile awk '/^# URL:/ {print gensub(/# URL:[[:blank:]]*(.*)/,"\\1","g",$0)}')"
|
|
||||||
if [ "$url" = "" ]; then
|
|
||||||
error "no URL in Pkgfile!"
|
|
||||||
fi
|
|
||||||
maintainer="$(<Pkgfile awk '/^# Maintainer:/ {print gensub(/# Maintainer:[[:blank:]]*(.*)/,"\\1","g",$0)}')"
|
|
||||||
if [ "$maintainer" = "" ]; then
|
|
||||||
error "no Maintainer in Pkgfile!"
|
|
||||||
fi
|
|
||||||
depends="$(<Pkgfile awk '/^# Depends on:/ {print gensub(/# Depends on:[[:blank:]]*(.*)/,"\\1","g",$0)}')"
|
depends="$(<Pkgfile awk '/^# Depends on:/ {print gensub(/# Depends on:[[:blank:]]*(.*)/,"\\1","g",$0)}')"
|
||||||
if [ "$depends" = "" ]; then
|
if [ "$depends" = "" ]; then
|
||||||
warn "no dependencies, please check!"
|
warn "no dependencies, please check!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
desc="$(<Pkgfile awk '/^# Description:/ {print gensub(/# Description:[[:blank:]]*(.*)/,"\\1","g",$0)}')"
|
||||||
|
url="$(<Pkgfile awk '/^# URL:/ {print gensub(/# URL:[[:blank:]]*(.*)/,"\\1","g",$0)}')"
|
||||||
|
maintainer="$(<Pkgfile awk '/^# Maintainer:/ {print gensub(/# Maintainer:[[:blank:]]*(.*)/,"\\1","g",$0)}')"
|
||||||
|
|
||||||
|
[ -n "$desc" ] || nullvars+=" Description"
|
||||||
|
[ -n "$url" ] || nullvars+=" URL"
|
||||||
|
[ -n "$maintainer" ] || nullvars+=" Maintainer"
|
||||||
|
|
||||||
|
[ -z "$nullvars" ] || error "Pkgfile is missing the field(s):$nullvars"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Checking .signature
|
# Checking .signature
|
||||||
#
|
#
|
||||||
|
[ -s .signature ] || error "no signature file!"
|
||||||
. Pkgfile
|
. Pkgfile
|
||||||
(( unsigned=0 ))
|
(( unsigned=0 ))
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# $Id: prtrej,v 1.4 2004/02/06 11:30:00 opel Exp $
|
# $Id: prtrej,v 1.4 2023/12/21 01:30:00 jmq Exp $
|
||||||
# (c) 2003,2004 by Martin Opel <mo@obbl-net.de>
|
|
||||||
# (c) 2002 by Markus Ackermann <maol@symlink.ch>
|
# (c) 2002 by Markus Ackermann <maol@symlink.ch>
|
||||||
|
# (c) 2003,2004 by Martin Opel <mo@obbl-net.de>
|
||||||
|
# (c) 2023 by John McQuah
|
||||||
#
|
#
|
||||||
# may be redistributed and modified under the terms of the GPL
|
# may be redistributed and modified under the terms of the GPL
|
||||||
# only usable with CRUX Linux, version 0.9.2 or higher
|
# only usable with CRUX Linux, version 0.9.2 or higher
|
||||||
@ -57,7 +58,7 @@ for reject in "${REJECTS[@]}"; do
|
|||||||
# This cleanup could be incorporated directly into pkgrm, but until that
|
# This cleanup could be incorporated directly into pkgrm, but until that
|
||||||
# happens we might as well do the cleanup here.
|
# happens we might as well do the cleanup here.
|
||||||
#
|
#
|
||||||
if [ ! -e "$real" ] || diff "$real" "$reject" >/dev/null; then
|
if [ ! -e "$real" ] || cmp -s "$real" "$reject"; then
|
||||||
rm "$reject"
|
rm "$reject"
|
||||||
count=$(( count + 1 ))
|
count=$(( count + 1 ))
|
||||||
else
|
else
|
||||||
|
@ -127,6 +127,9 @@ sub parse_pkgfile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(PIPE);
|
close(PIPE);
|
||||||
|
# thanks GazL for the reminder to escape any metacharacters
|
||||||
|
$name =~ s/[.+]/\\$&/g;
|
||||||
|
$version =~ s/[.+]/\\$&/g;
|
||||||
return \$name, \$version, \$release, \@source, \@renames;
|
return \$name, \$version, \$release, \@source, \@renames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user