Commit Graph

56 Commits

Author SHA1 Message Date
Juan RP
a05e039cce Revert "Stop converting relative symlinks to absolute."
This reverts commit 9ae3638429.

This change is ok, but cannot be used right now because all existing
binpkgs were created with an old xbps-create(8).
2015-02-19 11:11:58 +01:00
Juan RP
9ae3638429 Stop converting relative symlinks to absolute.
There's no reason to make them absolute, simply store in the metadata
the target file as is. This vastly simplifies the code and makes all
test pass correctly.
2015-02-19 11:04:34 +01:00
Juan RP
69e3a50e75 xbps-create: handle correctly another case of relative symlinks. 2015-02-19 09:44:09 +01:00
Juan RP
3c34c300d1 xbps-create(8): record target file or relative symlinks correctly. 2015-02-18 14:55:54 +01:00
Juan RP
039a155918 xbps-create(8): fix #64 "incorrect installed-size with hardlinks" 2014-11-12 12:37:35 +01:00
Juan RP
1edd4e2ecf bin/xbps-create/main.c: CID 62678 (unchecked return value) 2014-10-05 12:33:45 +02:00
Juan RP
616af5c207 bin/xbps-create/main.c: CID 62713 (dead code) 2014-10-05 12:16:39 +02:00
Juan RP
f7441d24cf bin/xbps-create/main.c: fix CID 62686 correctly; all tests pass now. 2014-10-05 08:55:32 +02:00
Juan RP
2fe9fbe777 bin/xbps-create/main.c: Out-of-bounds write (CID 62686) 2014-10-05 08:09:42 +02:00
Juan RP
0f5ce62ba9 xbps-create: fix build introduced in previous. 2014-09-27 13:11:43 +02:00
Juan RP
72cefcfc83 Introduce xbps_mmap_file() and use it in strategic points.
Rather than using a random buffer from stack or heap, and decide
what size to use, create a private memory mapped object...

This simplifies the code in lib/verifysig.c and xbps-create.
2014-09-27 13:00:34 +02:00
Enno Boland
33032429c2 bin/xbps-create: allow to define the reverts field for a package. 2014-09-23 13:54:06 +02:00
Christian Neukirchen
cfc0e3b9d9 xbps-create: do not compress with xz -9
xz -9 is very expensive in terms of CPU and memory usage, and also
memory usage for decompression.  Thus we stick to default of -6 for
xz.  For gzip and bzip2, -9 is ok.
2014-09-19 16:38:31 +02:00
Juan RP
a28046332f Implemented support for pre-remove and post-install messages.
Close #44
2014-07-27 11:24:49 +02:00
Juan RP
b9e44009d9 xbps-create(8): new option -t, --tags to store tags/categories metadata. 2014-05-29 11:36:39 +02:00
Juan RP
6b83ec7039 xbps-create: initialize two vars to make gcc-4.9 with -fstack-protector-strong happy. 2014-05-16 09:47:35 +02:00
Juan RP
b71bda2ba4 xbps-create(8): new option (--compression) to set compression format. 2014-04-11 14:16:58 +02:00
Juan RP
6537004532 xbps-create: do not use FTW_MOUNT with nftw(3).
There's not much point in using FTW_MOUNT anyway because we don't care
if files are in another filesystem. This makes it work with musl
(which uses a different behaviour when FTW_MOUNT is set).
2014-01-08 20:16:02 +01:00
Juan RP
4057e4961c Use C99 for loop initializers.
That means that a C99 compiler is now mandatory.
2013-09-15 10:06:49 +02:00
Juan RP
24ff0472dd Use fs blksize from stat(2)ed file when reading archives. 2013-08-29 14:30:14 +02:00
Juan RP
a039330f3c Misc cleanups: use __attribute__((__unused__)); remove dead code. 2013-08-29 10:45:30 +02:00
Juan RP
09e116b7f0 xbps_api.h -> xbps.h 2013-06-20 12:31:02 +02:00
Juan RP
42c0766c00 Get rid of libfetch and proplib external dependencies.
The list of required external deps is now confuse, libarchive and openssl.

libxbps now includes a wrapper for proplib prefixed with xbps_ rather than prop_.
2013-06-20 10:26:12 +02:00
Juan RP
55af300e65 xbps-create: needs stdarg.h. 2013-06-19 11:28:51 +02:00
Juan RP
03575cecd0 xbps-create: s/size_t/unsigned int/ to iter in prop_arrays. 2013-06-15 10:29:43 +02:00
Juan RP
99be698979 Use a single file to store repository data.
This is just the starting point to extend repositories with PGP signatures.
2013-06-10 10:28:39 +02:00
Juan RP
fa9d3471d9 xbps-create: improve d6605e1b97 (sanitize destdir to resolve target files in symlinks).
Previously in d6605e1b97 if destdir had trailing '/' the behavior
of detecting target files in symlinks was changed slightly.
2013-05-27 13:03:40 +02:00
Juan RP
d6605e1b97 xbps-create(8): calculate correctly target file for relative symlinks. 2013-05-27 10:27:55 +02:00
Juan RP
8736ef6c5a xbps-create: fix issue #5 from github: initialize setlocale. 2013-04-01 10:49:25 +02:00
Juan RP
59006fe86c xbps-create: added --build-options option, mainly for xbps-src.
This expects a string with the list of used build options.
2013-03-23 08:18:06 +01:00
Juan RP
a6c26f6c12 xbps-create: also set st_{uid,gid} to 0:0 in archived files. 2013-03-15 13:14:57 +01:00
Juan RP
7491c0e584 xbps-create: set root:root if e[gu]id == st.st_e[gu]id in package files.
The rational is that packages should have proper perms to be installed
globally in a system as root, and fakeroot is useless when generating
packages with xbps-create when it's statically build.
2013-03-15 09:31:15 +01:00
Juan RP
ea2f2c7297 Silence -Wformat-nonliteral warning with clang. 2013-01-04 10:35:00 +01:00
Juan RP
492bfeb560 xbps-create: ignore 'shlib-{provides,requires}' files generated by xbps-src. 2012-12-24 11:39:10 +01:00
Juan RP
1fa3601893 xbps-create: added support for --shlib-{provides,requires} options. 2012-12-24 10:55:17 +01:00
Juan RP
e2176ec4b6 bin: no point in cleaning up resources when it's exiting... 2012-12-14 11:58:30 +01:00
Juan RP
db5da575a4 xbps-create: added support to add hardlinks. 2012-12-12 03:48:27 +01:00
Juan RP
b7b6f7f1b4 xbps-create: use the right var in chdir(2) doh. 2012-11-25 11:03:03 +01:00
Juan RP
d063e63bbb xbps-create: new option -G, --source-revisions; mainly for xbps-src use. 2012-11-20 04:21:26 +01:00
Juan RP
d6735d5685 xbps_xasprintf: do not return NULL anymore; remove checks for this. 2012-11-11 09:37:27 +01:00
Juan RP
7fa8207cf3 xbps-create: be consistent with options, minor fixes. 2012-11-02 15:03:33 +01:00
Juan RP
f8450f9bd7 xbps-create: use mmap(2). 2012-10-04 17:13:33 +02:00
Juan RP
42c21e1c3c xbps-create: if a symlink points to an unexistent file store symlink target as is.
Seen in recent builds when building the systemd binpkg:

[chroot] => Building systemd-194_1.x86_64.xbps...
xbps-create.real: main.c:219: ftw_cb: Assertion `p' failed.

Which was asserting in a symlink that was pointing to a file provided by the udev
pkg, therefore realpath(3) failed.
2012-10-04 09:40:52 +02:00
Juan RP
1d7fab2abd xbps-create: remove -d --destdir option and require this as argument. 2012-09-30 07:12:31 +02:00
Juan RP
7fa0861794 xbps-create: switch --homepage to -H, add -h/--help.
(cherry picked from commit 3a383c41f5dc77f5c08c90a9831123243ffa9109)
2012-09-29 19:12:20 +02:00
Juan RP
7714f0f6c5 bin: print usage() in stdout.
(cherry picked from commit b090e1a0bd32cabd8fe81bd756d419ee4b170ef7)
2012-09-29 19:08:03 +02:00
Juan RP
c39c1e5751 xbps-create: handle another variant of a relative symlink.
(cherry picked from commit 7d849c2a656246be808206baa0adae2da1c9132d)
2012-09-29 19:07:54 +02:00
Juan RP
e989b74c6a xbps-create: handle symlinks a bit better.
(cherry picked from commit 8a0e98485872b4ab97a3e55b453821016d89eab7)
2012-09-29 19:07:45 +02:00
Juan RP
d3bb6fe13e xbps-create: when adding entries to archive, copy data with one read().
(cherry picked from commit 1263e4555a25c4118647104563c92af9bfbe5005)
2012-09-29 19:05:54 +02:00
Juan RP
b478f6d774 xbps-create: add -q (quiet), ignore optarg if it's empty.
(cherry picked from commit 4417f7d74c0d552bba0f625b7df8adf25999000f)
2012-09-29 19:05:39 +02:00