Commit Graph

55 Commits

Author SHA1 Message Date
8d1ed3fe6d Replaced egrep call, bumped to version 5.40.10 2023-02-03 10:32:32 -06:00
Matt Housh
1a32b7f940 pkgmk: added '--format=gnutar' to bsdtar call in build_package() to deal with some locale issues 2022-04-13 18:07:08 -05:00
55b485f202 pkgmk: use curl as the default download program 2022-01-13 13:47:06 +01:00
c2ebd044e0 pkgmk: set LC_ALL to C.UTF-8 2021-12-18 15:43:00 +01:00
bd31e5150b adjust copyright year 2021-10-05 10:52:37 +02:00
65b585fe25 pkgmk: call signify with absolute path 2021-10-05 10:41:04 +02:00
5dc730000e pkgmk: add possibility to change the name of downloaded tarballs 2021-10-05 09:57:07 +02:00
Fredrik Rinnestam
9ca0da6512 readd bz2 support - don't commit while drunk 2018-11-17 21:11:16 +01:00
Fun
ece7f90bf8 faster strip_files() function
Tested with a port with 5500 output files, from which 53 candidates
for stripping. The timing was:
	- 30  secs (old code)
	- 0.2 secs (new code - current patch)
	- 1.4 secs (new code with proper quoting - not commited)

Most of the time is spent in getting the output from the file program.

The old code started the file program for every file.

The new/present code starts N=$(nproc) processes in parallel with 10 input
files for each 'file' process. The output of the file program is feed
to an awk process which filters-out only the candidates for stripping.
This process runs in parallel too (but with one file per strip process).

The --no-buffer options is used because it sounds good (the strip should
start as soon as one of the file processes has a verdict for one of
their 10 files), but I didn't measure it.

The "xargs -r -L10 -P$N" command will miss the files with spaces.
For a file named "a b" it will spawn:
	file "a" "b"
A slower version, with proper quoting, "xargs -r -L1 -P$N -I{} file ... '{}'",
will spawn:
	file "a b"

* xargs will force -L1 if -I{} is used

Given that the file process doesn't return error codes for non-existing
files, and that there is a very low probability that we have ports with
filenames constaining spaces that are worth stripping them, I choose to
keep the faster (non perfect) version.
2018-03-25 03:06:43 +02:00
Fredrik Rinnestam
ae5df6094b pkgmk: dropped bzip2 support, added support for lzip 2018-02-07 18:22:25 +01:00
Fredrik Rinnestam
a3865f21a9 pkgmk: use --compression=none for wget by default. 2017-11-30 17:28:09 +01:00
just_fun
35b56a38e0 pkgmk: fix the up-to-date option (avoid unnecesarry rebuilds)
build_needed() function returns true/yes if a source is missing,
even when the target/package exists and is up-to-date. This
behaviour triggers unnecesarry rebuilds.

Because only the remote sources can be missing and
we don't want to rebuild a port just because we've deleted
some of its remote sources, this patch changes that condition
from:
    ( the source is missing OR  is newer than the target/package )
to
    ( the source exists     AND is newer than the target/package )
2017-09-20 17:49:07 +02:00
Fredrik Rinnestam
99ded8b59c pkgmk: dont export PKG, SRC FS#1367 2017-09-20 17:48:46 +02:00
Predrag Ivanovic
62e416b52c pkgmk.in: Add 7z to unpack_source function
Libarchive(bsdtar) can extract 7-Zip archives since 3.0, so
add them as supported source

Ref:
https://github.com/libarchive/libarchive/wiki/LibarchiveFormats
2017-09-19 20:11:19 +02:00
just_fun
858ea9a42b pkgmk: update .md5sum if present (even when the port was signed) 2017-04-19 18:17:12 +02:00
Fredrik Rinnestam
08ac3d2cb1 pkgmk: ignore md5sums unless signatures are missing 2017-04-05 21:58:09 +02:00
cc3c4ec779 pkgmk: Remove check for empty $source in check_signature(), patch by just_fun 2017-02-28 20:02:26 +01:00
Fredrik Rinnestam
dcb8845eaf pkgmk: Removed checking for in make_signature()
this is an artifact from make_md5sum() and NOT needed for make_signature().
In fact, this check breaks make_signature() because now packages that don't
have a $source don't get any .signature at all, even though it can
(and should) create a sha256 for the footprint and Pkgfile.

Patch by Camille (onodera).
2017-02-23 18:29:10 +01:00
Fredrik Rinnestam
e5c99f7b1a Fixed various style errors and some typos. Patch by Camille (onodera). 2017-02-23 18:24:27 +01:00
Fredrik Rinnestam
8db4bc01e2 pkgmk: don't assume file will print a ',' with future releases 2017-02-18 20:02:32 +01:00
Fredrik Rinnestam
8a13560ef8 pkgmk: Actually strip executables and objects. Patch by Roman Oreshnikov
FS#1378
2017-02-18 18:04:59 +01:00
Fredrik Rinnestam
66f664ffb7 updated copyright to 2017 2017-02-07 21:01:46 +01:00
Thomas Penteker
ca8de90525 pkgmk.in: fix typo in the help text 2016-11-30 23:18:12 +01:00
06c526de4e update copyright year 2016-10-05 11:26:26 +02:00
9033d1650c pkgmk: extract archives with tar.lz extension 2016-10-04 15:31:41 +02:00
Thomas Penteker
e3999adb34 document new command-line switches in pkgmk.8 2016-04-21 00:04:40 +02:00
Thomas Penteker
b60717c3bc clean ups and -cs now checks the signature even if the binary package is already present 2016-04-08 01:06:13 +02:00
Thomas Penteker
430a36bfa2 fix indentation even more 2016-04-07 22:48:26 +02:00
Thomas Penteker
1286051d5a implement proper fallback with/without PKGMK_IGNORE_MD5SUM and PKGMK_IGNORE_SIGNATURE 2016-04-02 23:11:47 +02:00
Thomas Penteker
b33658886e fix indentation, remove --insecure and no-check-certificate from curl and wget options 2016-04-02 22:11:09 +02:00
Thomas Penteker
7e6d31a01d strip -x from shebang 2016-03-28 13:34:21 +02:00
Thomas Penteker
8dad69f52d implement signature handling; yes indenting is broken 2016-03-28 02:48:20 +02:00
Alan Mizrahi
3d1855e7d2 pkgmk: add support for curl
See FS#1060, https://crux.nu/bugs/index.php?do=details&task_id=1060

New variables in /etc/pkgmk.conf:

PKGMK_DOWNLOAD_PROG="" (curl or wget)
PKGMK_CURL_OPTS="" (parameters for curl, when using curl)
2015-07-25 12:23:49 +02:00
d804a38feb update copyright year to 2013 2013-01-21 16:14:45 +01:00
a455d5533e pkgmk: add support for plain tar, FS#603 2012-11-28 13:23:58 +01:00
Matt Housh
6d244ad0c0 pkgmk, pkgmk.conf: updates for multilib 2012-11-27 10:17:18 -06:00
50689e8a22 Updated copyright notices to 2010. 2010-05-29 16:30:15 +02:00
Johannes Winkelmann
56b9b9dab2 Bug #221: added error codes. 2010-05-27 21:18:34 +02:00
Johannes Winkelmann
163aacb1ff Bug #221: pkgmk optionally now only warns about new files in a footprint. 2010-05-23 17:38:31 +02:00
37c478ef8b Bug #581: Users may choose from gz/bz2/xz for the compression mode now. 2010-05-21 20:03:48 +02:00
Andrew Brouwers
5228efc2d6 Added support for *.tbz2 and *.txz source entries in pkgmk. 2010-03-27 17:30:02 +01:00
Andrew Brouwers
e74ba08d64 Added support for *.rpm source entries in pkgmk. 2010-03-27 17:29:04 +01:00
Tilman Sauerbeck
e6c32c41e9 Also accept *.tar.lzma source archives. 2009-07-21 19:29:43 +02:00
698c42e2a0 Preserve file permissions and ownership when extracting distfiles. 2009-07-16 20:53:41 +02:00
de428c293b Bug #360: Check whether files are writable early. 2009-07-15 20:01:53 +02:00
Tilman Sauerbeck
7b8b79b9c2 Use bsdtar instead of GNU tar to extract all handled archive formats. 2009-06-20 15:28:33 +02:00
7b3f9929cb Bug #336: Only accept http/https/ftp/file protocols in sources. 2008-11-01 18:17:44 +01:00
51c534c2bd Bug #347: wget options are configurable now. 2008-11-01 18:09:20 +01:00
Johannes Winkelmann
92dbaab6a7 pkgmk: add "extract only" functionality, previously suggested by Lucas Hazel and Danny Rawlins 2008-09-30 20:59:37 +02:00
Brett Goulder
765b5014db Bug #241: Don't check SSL certificates.
pkgmk's mechanism to check file integrity is .md5sum, so relying on
proper SSL certificates for https connections isn't critical. This fixes
transfers from https servers whose SSL certificates are self signed only.

Original patch by Jose V Beneyto <sepen@users.sourceforge.net>.
2008-04-11 18:48:57 +02:00