This defines _FILE_OFFSET_BITS == 64, which makes stat calls transparently
use stat64, etc. This allows us to support large files, such as packages
over 1 GB in size. libarchive was already correctly compiled with this macro.
Signed-off-by: Dan McGee <dan@archlinux.org>
Changed the exit code for missing deps from 1 to 127 because 1 is used
for other errors. makepkg breaks if pacman exits with 1 for any reason
other than a missing dep.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Include manpages when we ship a package tarball, and allow them to be
generated by the end user if they want by using the --enable-asciidoc option
to ./configure. This will allow us to maintain manpages in an easier to modify
format while still keeping the make dependencies to a minimum.
Signed-off-by: Dan McGee <dan@archlinux.org>
We still need some work here- we should have a repo-remove manpage link
to this one, and we should not have to struggle with asciidoc formatting
to get it to work like any other multiple-command manpage works.
Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix up the target so we rebuild the manpages when we edit the corresponding
text file.
* Add vim modelines to all of the asciidoc files ensureing the right syntax
highlighting is used and we have expandtabs turned off.
* Start making a few small changes to PKGBUILD.5 to make it pretty in both
HTML and manpage format output.
* Fix the manlink macro to include the manpage section in the link.
Signed-off-by: Dan McGee <dan@archlinux.org>
Add some asciidoc generation stuff to the doc/ Makefile.am so we can get
some manpages up and working. Add necessary stuff to gitignore, and check
in the asciidoc.conf file along with the footer for all of the manpages.
Signed-off-by: Dan McGee <dan@archlinux.org>
We shouldn't translate log messages to pacman.log so it is consistant and
can be parsed by other tools. Remove all gettext _() around these strings.
Signed-off-by: Dan McGee <dan@archlinux.org>
It is much easier for translators to deal with paragraphs as strings rather
than by lines. Take all usage and version information and convert it to this
format.
Signed-off-by: Dan McGee <dan@archlinux.org>
If we move the scripts from *.in to *.sh.in and *.py.in, gettext can pull the
required strings to translate a whole lot easier. Do this.
Signed-off-by: Dan McGee <dan@archlinux.org>
Move the translations from src/pacman/po to just po/ so we can include the
scripts gettext translations in the same message catalog as that of the
pacman frontend. The libalpm message catalog, for now, will remain a separate
existence.
Signed-off-by: Dan McGee <dan@archlinux.org>
I ran flawfinder and sparse over the pacman source code and found a few
things that were worth fixing (and were quick fixes).
Signed-off-by: Dan McGee <dan@archlinux.org>
pactest was sleeping for 3 seconds, which is unnecessary. Reduce it to 1.5
seconds and clean up the code a bit anyway.
Signed-off-by: Dan McGee <dan@archlinux.org>
Previously, the following error was displayed even after a valid
and successful query operation on all packages,
like -Q , -Ql, -Qi, -Qil :
no targets specified (use -h for help)
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
The -Ql operation is supposed to print all files but directories.
stat was used for detecting directories. However, when stat failed,
(because the file doesn't exist or is not readable), the files
were still displayed just like the others.
Now, these files are printed on stderr, with the corresponding error message.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Adds the ARCHIVE_EXTRACT_NO_OVERWRITE libarchive flags
for extracting files and directories.
This will prevent symlinks for being overwritten by directories.
All other files that need to be extracted should already have
been deleted previously by pacman.
This flag is not used for extracting files in backup array
to /tmp/alpm_XXXX, because this file is created by mkstemp first,
and so needs to be overwritten by the file from the archive.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Add the ability to check the permissions and type of a file within the
framework of pactest. Two new rules can be used:
self.addrule("FILE_TYPE=bin/foo|file")
self.addrule("FILE_MODE=bin/bar|644")
TODO: add the ability to add different types of files (eg links) via the test
package building framework, and add the ability to change the modes on files.
Signed-off-by: Dan McGee <dan@archlinux.org>
With libarchive 2.2.3 (previously 1.3.1), archive_read_extract now returns ARCHIVE_WARN
when a package is extracted as user, because for example, UID=0 or SUID bit can't be set.
This patch makes pacman not treating these warnings as errors anymore,
but simply ignoring them.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
I previously introduced some patches to make just about every path in
pacman/libalpm configurable; doing this with the lockfile seemed a bit too
far and we really should just place the lockfile where it belongs- with the
DB that needs locking.
More details in this thread:
http://archlinux.org/pipermail/pacman-dev/2007-June/008499.html
Signed-off-by: Dan McGee <dan@archlinux.org>
The scriptlet calling had some unneeded complexity for the time being
which we aren't using here. Let's get rid of it until we find a good way
to implement it correctly.
Signed-off-by: Dan McGee <dan@archlinux.org>
When looking for old packages to create a delta from used bsdtar to read the
packages .PKGINFO to check it's name and arch instead of depending on the
filename of th package.
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
First reported here:
http://bbs.archlinux.org/viewtopic.php?pid=261861
Newly created files were done with the standard umask, so those that are
extracted seperately and copied to a .pacnew extension will have the wrong
permissions. This should hopefully fix this.
Signed-off-by: Dan McGee <dan@archlinux.org>
The alpm_splitdep function formerly overwrote the input string, causing
a few issues. Fix this.
Signed-off-by: Nagy Gabor <ngaba@petra.hos.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
For future possibilities, don't extract any files that start with '.'.
This will allow us to add features such as the ChangeLog viewing without
having to wait to include these files in packages, because older versions
of pacman will be forward compatable with 'hidden' files at the root level
of the package.
Signed-off-by: Dan McGee <dan@archlinux.org>