summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* makepkg: Improvements to get_filename:Gary van der Merwe2012-09-18
| | | | | | | | * For any vcs other that git, the fall through resulted in being handled by the code for std url, hence fragments were being left on. * Handle vcs urls than end in a slash correctly, eg http://example.com/project/ Signed-off-by: Gary van der Merwe <garyvdm@gmail.com>
* makepkg: check if $dir is a local clone of the right git repoMohammad Alsaleh2012-09-18
| | | | | | | | | | | | | | | | Before this patch, makepkg does not check if $dir is a local clone of the right repo. For example, git fetch would be run even if $dir is not a local bare clone of a git repo in present in source(), but a subdir of a checked-out one. That means makepkg can potentially fetch from a completely unrelated remote and update completely unrelated dirs/files. This patch adds a check to make sure we are fetching from the right remote. Signed-off-by: Mohammad Alsaleh <msal@i2pmail.org>
* makepkg: git clone instead of git fetch if $dir exists but emptyMohammad Alsaleh2012-09-18
| | | | | | | | | | | Before this patch, makepkg would only check if $dir exists as an indication that a local clone exists. And if $dir does exist, makepkg will run git fetch inside it unconditionally. After applying this patch, makepkg will check if the existent $dir is empty. And if it is, it will be used to store a local clone. Signed-off-by: Mohammad Alsaleh <msal@i2pmail.org>
* Avoid interger overflow when calculating remaining line lengthAllan McRae2012-09-18
| | | | | | | | When the len and cidx were changed to size_t in a8a1b093, it was possible to have an integer overflow when a line ended right at the edge of the terminal width. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix typo in documentationAllan McRae2012-09-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix warnings with --noextractAllan McRae2012-09-18
| | | | | | | | | Three warnings after someone deliberately typed --noextract is a tad excessive... Also, an empty $srcdir is perfectly valid when the source array is empty, although using --noextact then is wasteful. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: implement dir_is_empty for dir content checksDave Reisner2012-09-18
| | | | | | | Rather than calling upon ls for this, use a proper shell function which uses globbing to determine the existance of files in a directory. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* Merge branch 'maint'Dan McGee2012-09-18
|\
| * pacman.8: remove redundant sectionAllan McRae2012-09-18
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * signing.c: warn if time went backwardsFlorian Pritz2012-09-18
| | | | | | | | | | | | | | | | | | GPG signatures have a timestamp which is checked and if it's in the future, verification will fail. Dan: slight wording change. Signed-off-by: Florian Pritz <bluewind@xinu.at>
| * Document system and user specific makepkg.confAllan McRae2012-09-18
| | | | | | | | | | | | | | | | Add details of the system wide and user specific versions of makepkg.conf to the man page. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * pactest: allow running with valgrind from any directoryAllan McRae2012-09-18
| | | | | | | | | | | | | | | | | | | | | | | | When using the --valgrind flag with the pactest.py script, the path to the suppression file relies on the script being called from the source root directory. Construct the path from the scripts location to allow it to be called from directory. Dan: style cleanup. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pkgdelta: pass correct args to create_deltaDave Reisner2012-09-18
| | | | | | | | | | | | | | | | Somewhere in the arg parse refactoring, the args array went away and we simply stashed our remaining parameters as positionals. Fix this up so that pkgdelta doesn't mysteriously hang in read_pkginfo(). Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | Fix documentation typoAllan McRae2012-09-18
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | Remove incorrect documentation for unlink_fileAllan McRae2012-09-18
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | query_fileowner, mdirname: add error checksAndrew Gregory2012-09-18
| | | | | | | | | | | | Also consolidates cleanup for query_fileowner. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | query_fileowner: remove assumption that root is "/"Andrew Gregory2012-09-18
| | | | | | | | | | | | | | | | Returning "/" from mdirname removes it as a special case which allows us to test it like any other directory. This corrects a false positive when querying a file in / and root is not set to /. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | query_fileowner: remove trailing '/' from targetsAndrew Gregory2012-09-18
| | | | | | | | | | | | | | | | Trailing '/' in paths causes lstat to dereference symlinks to directories which causes it to break even though the symlink is a valid target. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | query_fileowner: resolve root earlyAndrew Gregory2012-09-18
| | | | | | | | | | | | | | | | Resolving root early prevents later calls to realpath from having to do the work of actually resolving any symlinks in root. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | query_fileowner: remove resolve_path functionAndrew Gregory2012-09-18
| | | | | | | | | | | | | | | | resolve_path is a equivalent to calling realpath(path, NULL) except that the returned string is guaranteed to be PATH_MAX long. We never append to the returned string, so this is unnecessary. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | query_fileowner: break/continue pkgfile loopAndrew Gregory2012-09-18
| | | | | | | | | | | | | | Break out of pkgfile loop on match or continue if the pkgfile path is too long. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | Move important information up in -Si outputAllan McRae2012-08-07
| | | | | | | | | | | | | | | | | | Currently, the package description is printed at the end of the -Si output. This is probably one of the more important pieces of information so should be nearer the top. Also move the package architecture up. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | PKGBUILD.vim: improve 'options' highlighting, add extra keywordsJason St. John2012-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the current syntax highlighting behavior in the 'options' array, which does *not* flag illegal options (e.g. typos, unsupported options). The shDoubleQuote and shSingleQuote options were the culprits. Now, if you enter `'!imptydurs'`, the typoed option will be flagged red. I also added syntax highlighting for the new options listed in `man 5 makepkg.conf`, which I believe were introduced around pacman 4.0.0. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Dan McGee <dan@archlinux.org>
* | removed the condition in alpm_db_set_servers since FREELIST is NULL safeBarbu Paul - Gheorghe2012-08-07
| | | | | | | | | | Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | added coding standardBarbu Paul - Gheorghe2012-08-07
| | | | | | | | Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com>
* | fixed typoBarbu Paul - Gheorghe2012-08-07
| | | | | | | | Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com>
* | Merge remote-tracking branch 'allan/working-split/vcs'Dan McGee2012-08-07
|\ \
| * | makepkg: delay checking for build package with pkgver()Allan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | If a pkgver() function is specified, delay checking the package is built until the pkgver is updated.. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: add hg url supportAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | Supported fragments are branch, revision and tag. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | doc: Add --holdver information for makepkgAllan McRae2012-08-04
| | | | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * | doc: Document using svn source urlAllan McRae2012-08-04
| | | | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * | doc: document automatically updating the pkgver variableAllan McRae2012-08-04
| | | | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * | doc: Document using VCS sources in a PKGBUILDAllan McRae2012-08-04
| | | | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: check pkgver validity after updatingAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | If a PKGBUILD has a pkgver() function, skip checking the pkgver validity until it has been updated. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: only update pkgver when all sources are availableAllan McRae2012-08-04
| | | | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: add --holdver to control VCS source updatingAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | Do not update VCS sources if --holdver is used. If the VCS checkout is not present, it will still be downloaded. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: do not download VCS sources unless neededAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | | | | VCS sources are not needed for --geninteg or --source operations. This also prevents VCS downloads outputting to stdout, which prevented piping -g output to the PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: rename myverAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | myver is a bit generic for an internal variable name. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: add support for SVN urlsAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow SVN repo sources in the form: source=("<folder>::<repo>#<fragment>") where <repo> must start with svn (e.g svn+http://) and a <fragment> can specify a revision (e.g. revision=22). Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: provide mechanism for auto-updating pkgverAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that VCS repos are provided in the source array, it becomes too complicated to have automatic updating pkgver as was the case with the old VCS PKGBUILDs (there can be multiple repos of different types in the source array, the VCS repo may not be the package primary source, etc). Instead provide an optional way for a PKGBUILD to update the pkgver value through the specifing of a pkgver() function that returns the new version string. This is run after all source files are downloaded so can access the VCS repo if needed. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: modify get_filepath to handle VCS sourcesAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | | | | With VCS sources, get_filepath should return the directory of the checkout. This allows backing up of the VCS checkout when using --allsource. Fixes FS#21098. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: modify get_filename to handle VCS sourcesAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | Modify get_filename to return the name of the folder with VCS sources. This fixes output issues in checksum checking. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: fix checksum generation with VCS sourcesAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | VCS sources should have "SKIP" for their checksum value Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: allow using GIT source URLsAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow specifing GIT sources using the following syntax source=('<folder>::<repo>#<fragment>') This will download the git repo <repo> into <folder> (into $SRCDIR if set, otherwise $startdir). <repo> must start with "git", but non-git protocols are handled using (e.g.) "git+http://...". The <fragment> can be used to specify a branch, tag, or commit to build from. e.g. branch=maint. Checksum entries for git sources should be "SKIP". Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: skip integrity checking earlyAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | If "SKIP" is provided for an integrity check, abort checking as soon as possible. Also swap fork to tr for bash4 conversion. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: generalize download_sourcesAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to treat all VCS sources as URLs, we need to be able to deal with more protocols. Rewrite download_sources to use a case statement so additional protocols are easily added. Also fix the use of scp to not pass the protocol in the URL (noticed by William J. Bowman <wjb@williamjbowman.com>) Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: add function to return download protocolAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | Extract the download protocol from a source entry. Returns "local" for local source files. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: reorder source handling functionsAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | There is no actual code change here, but these related functions were all over the place which makes this code difficult to adjust. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | makepkg: remove VCS package supportAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | | | | | The current VCS packaging support is really, really, really bad. It is best to strip it out completely before rewriting it. Signed-off-by: Allan McRae <allan@archlinux.org>
* | | Merge branch 'maint'Dan McGee2012-08-07
|\ \ \ | | |/ | |/|