summaryrefslogtreecommitdiff
path: root/db-functions
AgeCommit message (Collapse)Author
2016-04-17db-functions: Fix check_repo_permission checking all architecturesLuke Shumaker
It mistakenly looped over just the first element of the ARCHES array, instead of the entire array. This meant that it only checked the permissions for one architecture.
2016-04-17Add "#!/hint/bash" to the beginning of several files.Luke Shumaker
It is a method of notifying text-editors that a file is in Bash syntax without giving it a propper shebang (which would be confusing, as it would suggest that the file should be executable), as well as working across virtually all text-editors (unlike "-*- Mode: Bash -*-" or whatever).
2016-04-17Use `grep &>/dev/null` instead of `grep -q` when operating on piped stdin.Luke Shumaker
`grep -q` may exit as soon as it finds a match; this is a good optimization for when the input is a file. However, if the input is the output of another program, then that other program will receive SIGPIPE, and further writes will fail. When this happens, it might (bsdtar does) print a message about a "write error" to stderr. Which is going to confuse and alarm the user. I'll add that this is not purely hypothetical--it has happened to me while running the test suite.
2016-04-17Export TMPDIR, and use mktemp -t instead of making it part of the templateLuke Shumaker
2016-04-17Use += instead of jumping through hoops.Luke Shumaker
The += operator was introduced in Bash 3.1, and was already used in some places in dbscripts, but not everywhere. For normal strings, this isn't a big deal, but appending to an array without using += is nasty.
2016-04-16Use printf-formatters instead of string interpolation on msg, error, etc.Luke Shumaker
2016-04-16Fix quoting around variables, especially arrays.Luke Shumaker
Other than pure quoting, this involved: - swapping */@ for array access in a few places - fiddling with printf in a pipeline - replacing `$(echo ${array[@]})` with `${array[*]}` - replacing `echo $(...)` with `...` When searching for these things, I used the command: grep -Prn --exclude-dir=.git '(?<!["=]|\[\[ |\[\[ -[zn] )\$(?!{?#|\(|\? )' and ignored a bunch of false positives.
2016-02-16disallow packages not built in a chrootarchlinuxLevente Polyak
double shame! This will detect both, packages with missing .BUILDINFO (built in non updated environments) and packages that are not built in a chroot at all (indicated by non default builddir). Signed-off-by: Levente Polyak <anthraxx@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2016-02-07Remove separate creation of file databasesPierre Schmitz
With pacman 5.0 repo-add and repo-remove handle file databases by default.
2014-11-01disallow packages without a valid PACKAGERDave Reisner
Shame. Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2013-11-02Add lastupdate fileFlorian Pritz
This allows for faster checking if an update might be needed and helps to let reporead run when something changed. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2013-11-02sourceballs: fix ACL issues on nymeriaJan Alexander Steffens (heftig)
ACLs from the WORKDIR were used, leading to problems as these weren't world-readable. Fix follows ftpdir-cleanup. Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-11-04Grant the SVNUSER access to the working directoryPierre Schmitz
2012-10-27Add the possibility to run all svn commands with a different userPierre Schmitz
* A SVNUSER can be configured in the config file * This user needs to be able to call svn without a password
2012-10-03Use pacman-key to check signatures as it now uses a correct exit valuePierre Schmitz
2012-08-05grep has been moved to /usrPierre Schmitz
2012-06-10Remove support for packages that are not in the package poolPierre Schmitz
2012-04-29Respect TMPDIR config when creating the working directoryPierre Schmitz
2012-03-26Use gpg status-file instead of status-fdPierre Schmitz
2011-12-19Avoid calls to basenamePierre Schmitz
2011-12-18Validate package signatures on db-updatePierre Schmitz
2011-04-02Add simple checks for handling signed packagesPierre Schmitz
In addition to this dbscripts wont accept unsigned pacakges when REQUIRE_SIGNATURE is set to true. Note: At this point no signature verification is performed at all.
2011-03-26Use repo-add to create the files database for each repoPierre Schmitz
2011-03-23Add support for packages which use the epoch variablePierre Schmitz
2011-01-15Move repo manipulation code into common functionsPierre Schmitz
repo-add and repo-remove is now indirectly called by arch_repo_add/remove. This simplifies future extensions like incremental file list creations. See FS#11302
2010-12-09repo_lock: check if repo is locked by repo-add or repo-removePierre Schmitz
2010-12-02db-update: Fail if a set of split packages is incompletePierre Schmitz
2010-11-23Rewrite sourceballs to increase performance and reliabilityPierre Schmitz
* Decrease file stats as much as possible * Create a list of all packages and meta data only once * Create a list of available source packages only once * Create a list of expected packages only once * Combine all three scripts into one to share data and code * Use as much information from the db files as possible and avoid using svn * Avoid attempting to create the same source package twice Logic works as follows: 1) create a list of all packages 2) Check for each package if we need a src package and create one 3) During this process create a list of all src packages that should be there 4) Diff both lists for the cleanup
2010-11-22Set CARCH as needed by some PKGBUILDsPierre Schmitz
PKGBUILDs expect CARCH to be set. This is needed when sourcing them directly.
2010-09-12_grep_pkginfo: use a more specific formatPierre Schmitz
2010-09-12check_pkgsvn: Don't assume the same PKGBUILD for all architecturesPierre Schmitz
2010-09-12check_pkgsvn: check if pkgname is in sync with svnPierre Schmitz
In addition to pkgver and pkgrel it is checked if pkgname is defined in the PKGBUILD.
2010-09-11Fix check_pkgreposPierre Schmitz
Don't use globing as this will match a package of the same version but another arch. We can be more specific here as there are no longer packages without $arch extension.
2010-09-11Use local config instead of guessing by hostnamePierre Schmitz
Using the hostname to decide which repos to use is not releiable and hard to test. Instead use config.local to configure these. config files for sigurd and gerolde were added which can be copied or symlinked to config.local on the specific host.
2010-09-11Fix check_repo_permissionPierre Schmitz
2010-09-05Check if package exists in any other repository on updatePierre Schmitz
This also checks if the sam package exists within the old package layout (without package pool)
2010-09-05Fix updating of same package into different repositories at aoncePierre Schmitz
See FS#20745
2010-09-02Set correct group after touching the db filePierre Schmitz
* When writing the db file ensure that it has write permission of the group which owns the parent directory. * This should make the adjust-permissions cron job obsolete.
2010-09-01Simplify repo configurationPierre Schmitz
* Repositories can now be defined in the config file for each host * added community-staging, gnome-unstable and kde-unstable * Exception is the adjust-permission cron-job; but we might want to use acls in future anyway Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2010-08-22add makepkg.conf for [multilib]Pierre Schmitz
2010-08-17Add additional checks when reading PKGBUILDsPierre Schmitz
If reading from a PKGBUILD fails stop immediatly. Also put out more usefull error messages.
2010-08-17Add [staging] repositoryPierre Schmitz
2010-08-15Lock repos before checkingPierre Schmitz
2010-08-15Use common names for reposPierre Schmitz
2010-08-14Add common function to check for correct repo and archPierre Schmitz
2010-08-14Rewrite of db-updatePierre Schmitz
* db-update now updates all repos with packages in its staging dirs * sanity checks are performed before any repo is touched * improved performance * less code; easier to maintain
2010-08-13Use common functions to print messages, warnings and errorsPierre Schmitz
These functions are copied from makepkg
2010-08-13Check permission before any actionPierre Schmitz
Added a function to check if user has permission to alter the repos and db files.
2010-08-10Use more consitent naming for package poolPierre Schmitz
There are no longer architecture-specific subdirs and the structure was switch to this: ftp └── pool ├── community └── packages packages contains all packages from core, extra and testing; this naming is in sync with the svn repo naming: svn-packages and svn-community
2010-08-08Fix typoPierre Schmitz