Commit Graph

101 Commits

Author SHA1 Message Date
bc9ddcfcc8 lib/initend.c: rename a var to make gcc-4.6.x happy. 2014-10-04 22:02:56 +02:00
df93e790a6 xbps_init: performance: do not chdir() unnecessarily for each conf file. 2014-08-01 15:30:43 +02:00
f8d8f91a08 Implement support to "preserve" existent on-disk files.
See NEWS for more information. Fix #51
2014-08-01 15:09:51 +02:00
fa960c2425 xbps_init: print XBPS_RELVER in debug output. 2014-08-01 10:16:33 +02:00
ae2fefeced xbps_init: remove redundant dbg printf if xbps.conf cannot be read. 2014-06-04 10:49:39 +02:00
6bb61adb0e Enable syslog logging by default; updated API to use xbps_handle::flags. 2014-06-04 09:39:02 +02:00
7f4753f50e Process conf files in sys/conf foo.d dirs alphabetically. 2014-06-04 08:05:18 +02:00
776865b548 Added support for system/config virtualpkg.d directories.
The system virtualpkg directory set to <rootdir>/usr/share/xbps/virtualpkg.d contains
virtualpkg configuration files (.conf/.vpkg) that can be overrided by the admin
in <rootdir>/etc/xbps/virtualpkg.d bearing the same file name.

This obsoletes the "virtualpkgdir" keyword support from the xbps configuration file.
2014-05-31 07:05:57 +02:00
387987b146 Make system/config repo.d paths always relative to rootdir. 2014-05-31 06:44:07 +02:00
23fef46e9e Implemented GH #39
The system repository directory set to <prefix>/share/xbps/repo.d contains
system repository configuration files (.conf) that can be overrided by the admin
in <sysconfdir>/xbps/repo.d bearing the same file name.
2014-05-30 11:48:10 +02:00
399a99753d lib/initend.c: do not crash if the include keyword resolves to unexistent files. 2014-05-29 09:30:58 +02:00
f7d1ed6ae3 lib/initend.c: fix clang warning; no need to initialize partially glob_t. 2014-05-15 17:00:29 +02:00
7485659687 libxbps: use strlcpy instead of strncpy 2014-05-13 11:58:51 +02:00
295cfcea76 libxbps: insert space after conditionals 2014-05-13 11:44:49 +02:00
152ec0354f libxbps: file including in xbps.conf supports relative paths. 2014-05-13 11:37:09 +02:00
1e273bf575 lib/initend.c: move prototype to the correct place. 2014-05-06 10:21:44 +02:00
42a569b05c lib/initend.c: add Enno Boland to copyright. 2014-05-06 09:29:26 +02:00
e5d64d6319 lib/initend.c: include now supports file globbing. 2014-05-05 23:10:18 +02:00
dacbb2f22f Fixed some warnings reported by clang. 2014-04-20 10:02:54 +02:00
51bdbe41ac lib/initend.c: ignore -Wformat-nonliteral with clang. 2014-03-11 09:28:50 +01:00
0416b067d0 Use a POSIX lock for pkgdb and only issue pkgdb writes in exact points.
- Rather than using a POSIX named semaphore use a POSIX lock (lockf(3))
for pkgdb for writers. Writers that cannot acquire the pkgdb lock will
get EAGAIN rather then being blocked.

- Due to using a file lock we cannot write the pkgdb every time a package
is being unpacked, configured or removed. Instead pkgdb is only written
at the end of a specific point in the transaction (unpack, configure, remove)
or via xbps_pkgdb_unlock().
2014-03-04 14:37:10 +01:00
f74bf1c1c8 New custom configuration file format that does not need confuse. 2014-02-25 16:42:52 +01:00
804a39c63b Added XBPS_ARCH environment var to override uname(2) machine result. 2014-01-09 11:41:25 +01:00
ae81cd1ea9 lib/initend.c: define _BSD_SOURCE for strlcpy() with musl. 2014-01-07 21:20:42 +01:00
ec0d38c469 Implement per pkg RSA signatures and on-demand repository access. 2013-12-24 10:43:55 +01:00
2a21354a1c Make some reorganization in struct xbps_handle.
The variables to set cachedir, rootdir and metadir have been
changed to "array of chars", this way there are no extra allocations.

Update clients accordingly and bump API version.
2013-12-16 11:46:39 +01:00
4403caa434 Add repos set in xbps_handle::repositories to the top of the list.
That means that now xbps-install(8) and xbps-query(8) --repository
option does not override the repository list of a configuration file.
2013-12-04 16:59:15 +01:00
8882b0215f Redo how the repository keys are stored.
- Repository keys are now stored in a new directory on metadir (/var/db/xbps):

	<metadir>/key>

- Repository keys are stored with the hex fingerprint of its RSA
  public key in a plist dictionary:

	<metadir>/keys/xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.plist

- Drop xbps-rkeys(8) and merge its functionality into xbps-install(8) and
  xbps-query(8).

- xbps-query(8) -vL now shows some more details of remote repositories:

 3134 http://localhost:8000 (RSA signed, verified)
      Signed-by: Void Linux
      4096 60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d
   16 http://localhost:8000/nonfree (RSA signed, verified)
      Signed-by: Void Linux
      4096 60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d

Bump XBPS_API_VERSION.
2013-11-18 16:05:46 +01:00
a5ecaa493f New utility: xbps-rkeys(8) to manage RSA public keys. 2013-10-09 10:13:07 +02:00
5e1432f418 Added support to specify multiple repositories via cmdline (close #17). 2013-09-18 16:45:05 +02:00
4057e4961c Use C99 for loop initializers.
That means that a C99 compiler is now mandatory.
2013-09-15 10:06:49 +02:00
776b94e6bc Remove PackagesOnHold from xbps.conf; use xbps-pkgdb -m hold|unhold instead.
To put a package on hold mode:
	$ xbps-pkgdb -m hold foo

To unhold the package:
	$ xbps-pkgdb -m unhold foo

To list packages on hold mode:
	$ xbps-query -H

This also close #12 from github.
2013-08-12 14:46:54 +02:00
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
2c03e1c9a8 Read virtual pkg config files only when it's necessary. 2013-06-14 10:00:33 +02:00
5fd7565e6c xbps-install(8): -R now overrides the repository list set in a configuration file.
Now -R can be used independently if a configuration file exists or not.
2013-04-18 18:17:14 +02:00
dc900353e4 lib/initend.c: xbps_end: remove bogus assignment. 2013-04-04 10:07:19 +02:00
5eddf04898 Ignore executing install/remove scripts if XBPS_TARGET_ARCH is set.
Instead a two stage approach is necessary when packages for target arch
are installed:

	- XBPS_TARGET_ARCH=arch xbps-install foo <- only unpack
	- xbps-reconfigure -a <- configure natively or via an emulator
2013-03-07 18:08:12 +01:00
6c96fe32cc lib/initend.c: print dbg msg about successful vpkg conf files read. 2013-02-05 09:32:43 +01:00
90cde72283 Add support to switch arch via XBPS_TARGET_ARCH env var. 2013-02-03 09:45:03 +01:00
9cf104498e lib/initend.c: convert a noisy printf to dbg_printf. 2013-01-31 09:42:22 +01:00
71430b1566 lib/initend.c: print to stderr a meaningfull msg on error. 2013-01-15 13:14:06 +01:00
ea2f2c7297 Silence -Wformat-nonliteral warning with clang. 2013-01-04 10:35:00 +01:00
22adf99e40 Faster generation of dynamic reverse dependencies and do this exactly once. 2012-12-15 07:33:49 +01:00
63c1883201 Major API/ABI cleanup bringing performance improvements and fixes.
These are the core interfaces in the new API:

rpool - Interface to interact with the repository pool.
rindex - Interface to interact with repository indexes.
pkgdb - Interface to interact with local packages.
transaction - Interface to interact with a transaction.

This also brings new repository index format, making the index file
per architecture and being incompatible with previous versions.

The transaction frequency flush option has been removed, and due to
the nature of package states it was causing more harm than good.

More changes coming soon, but the API shall remain stable from now on.
2012-11-30 07:11:51 +01:00
7f577e005c metadir: replace uthash simply with a dictionary. 2012-11-21 23:07:38 +01:00
a311294f0a libxbps: added support to "inject" vpkg config files at initialization time. 2012-11-19 15:42:24 +01:00
bf2d97a067 xbps_init: simplify previous and use xbps_xasprintf(). 2012-11-19 12:15:32 +01:00
b894a5eca3 Accept relative rootdir via xbps_handle::rootdir (found by pancake). 2012-11-19 12:12:38 +01:00
46f7a808b4 xbps_metadir: use an hash table (via uthash): 15s vs 1m10s. 2012-11-18 02:38:24 +01:00
b0fab7a3ee Implemented a cache to get pkg dicts from metadir.
This improves xbps-pkgdb -a marginally, but still seems to be a bit slow.
2012-11-16 21:50:52 +01:00