Commit 195cc48c authored by Philip Müller's avatar Philip Müller

[pkg-upd] 5.1.0-2

- this includes pacman-contrib 1.0.0
parents
From 842bdfbb622db0673d4952812a490e10f61fa3bd Mon Sep 17 00:00:00 2001
Message-Id: <842bdfbb622db0673d4952812a490e10f61fa3bd.1527784094.git.jan.steffens@gmail.com>
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Thu, 31 May 2018 17:01:16 +0200
Subject: [PATCH 1/2] makepkg: Clear ERR trap before trying to restore it
$restoretrap is empty if the trap was not set. This caused the trap
handler to remain and override later exit codes.
---
scripts/makepkg.sh.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index e9080a70..d67fd853 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -432,6 +432,7 @@ run_function_safe() {
run_function "$1"
+ trap - ERR
eval "$restoretrap"
eval "$restoreset"
eval "$restoreshopt"
--
2.17.0
From bd164585f1a815a9f57b0c5bd2365d251500bc9f Mon Sep 17 00:00:00 2001
Message-Id: <bd164585f1a815a9f57b0c5bd2365d251500bc9f.1527784094.git.jan.steffens@gmail.com>
In-Reply-To: <842bdfbb622db0673d4952812a490e10f61fa3bd.1527784094.git.jan.steffens@gmail.com>
References: <842bdfbb622db0673d4952812a490e10f61fa3bd.1527784094.git.jan.steffens@gmail.com>
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Thu, 31 May 2018 17:46:51 +0200
Subject: [PATCH 2/2] makepkg: Don't use parameterless return
It's especially dangerous in trap handlers since the return value of the
function becomes the return value of the last command before the trap,
not the last command in the current function. This applies to any
function executed in a trap handler, nested functions included.
In one case, install_packages failed (via return 14), which was inside a
conditional that then ran exit 14, which triggered the EXIT handler,
which called clean_up, which called remove_deps, which had !RMDEPS and
thus returned. The return value of remove_deps became the return value
of install_packages, triggering the ERR handler, which (due to another
problem) was still the user function handler, which then printed a
misleading error message and overrode the exit code with 4.
---
scripts/makepkg.sh.in | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index d67fd853..15524dc0 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -133,7 +133,7 @@ clean_up() {
if (( INFAKEROOT )); then
# Don't clean up when leaving fakeroot, we're not done yet.
- return
+ return 0
fi
if (( (EXIT_CODE == E_OK || EXIT_CODE == E_INSTALL_FAILED) && CLEANUP )); then
@@ -313,7 +313,7 @@ resolve_deps() {
}
remove_deps() {
- (( ! RMDEPS )) && return
+ (( ! RMDEPS )) && return 0
# check for packages removed during dependency install (e.g. due to conflicts)
# removing all installed packages is risky in this case
@@ -519,7 +519,7 @@ find_libdepends() {
if (( sodepends == 0 )); then
(( ${#depends[@]} )) && printf '%s\n' "${depends[@]}"
- return;
+ return 0;
fi
local libdeps filename soarch sofile soname soversion;
@@ -721,7 +721,7 @@ list_package_files() {
}
create_package() {
- (( NOARCHIVE )) && return
+ (( NOARCHIVE )) && return 0
if [[ ! -d $pkgdir ]]; then
error "$(gettext "Missing %s directory.")" "\$pkgdir/"
@@ -784,14 +784,14 @@ create_package() {
create_debug_package() {
# check if a debug package was requested
if ! check_option "debug" "y" || ! check_option "strip" "y"; then
- return
+ return 0
fi
pkgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@"
# check if we have any debug symbols to package
if dir_is_empty "$pkgdir/usr/lib/debug"; then
- return
+ return 0
fi
unset groups depends optdepends provides conflicts replaces backup install changelog
@@ -875,7 +875,7 @@ create_srcpackage() {
}
install_package() {
- (( ! INSTALL )) && return
+ (( ! INSTALL )) && return 0
if (( ! SPLITPKG )); then
msg "$(gettext "Installing package %s with %s...")" "$pkgname" "$PACMAN -U"
--
2.17.0
# Based on the file created for Arch Linux by:
# Dan McGee <dan@archlinux.org>
# Dave Reisner <dreisner@archlinux.org>
# Maintainer: Philip Müller <philm@manjaro.org>
# Maintainer: Guinux <guillaume@manjaro.org>
# Note: since we include pacman-contrib with this package we have to build pacman twice
# Example: pacsort: error while loading shared libraries
pkgname=pacman
pkgver=5.1.0
_pkgver=1.0.0
pkgrel=2
pkgdesc="A library-based package manager with dependency support"
arch=('i686' 'x86_64')
url="http://www.archlinux.org/pacman/"
license=('GPL')
groups=('base' 'base-devel')
depends=('bash>=4.2.042-2' 'glibc>=2.17-2' 'libarchive>=3.1.2' 'curl>=7.39.0'
'gpgme' 'archlinux-keyring' 'manjaro-keyring' 'pacman-mirrors>=4.1.0')
checkdepends=('python2' 'fakechroot')
makedepends=('asciidoc' 'pacman>=5.1')
optdepends=('haveged: for pacman-init.service')
provides=('pacman-contrib' 'pacman-init')
conflicts=('pacman-contrib' 'pacman-init')
replaces=('pacman-contrib' 'pacman-init')
backup=(etc/pacman.conf etc/makepkg.conf)
install=pacman.install
options=('strip' 'debug')
validpgpkeys=('6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae <allan@archlinux.org>
'B8151B117037781095514CA7BBDFFC92306B1121' # Andrew Gregory (pacman) <andrew@archlinux.org>
'5134EF9EAF65F95B6BB1608E50FB9B273A9D0BB5') # Johannes Löthberg <johannes@kyriasis.com>
source=(https://sources.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz{,.sig}
https://sources.archlinux.org/other/community/pacman-contrib/pacman-contrib-$_pkgver.tar.gz{,.asc}
pacman.conf.i686
pacman.conf.x86_64
makepkg.conf
0001-makepkg-Clear-ERR-trap-before-trying-to-restore-it.patch
0002-makepkg-Don-t-use-parameterless-return.patch
pacman-sync-first-option.patch
etc-pacman.d-gnupg.mount
pacman-init.service)
prepare() {
cd $srcdir/$pkgname-$pkgver
# Fix install_packages failure exit code, required by makechrootpkg
patch -Np1 -i $srcdir/0001-makepkg-Clear-ERR-trap-before-trying-to-restore-it.patch
patch -Np1 -i $srcdir/0002-makepkg-Don-t-use-parameterless-return.patch
# Manjaro patches
patch -p1 -i $srcdir/pacman-sync-first-option.patch
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --enable-doc \
--with-scriptlet-shell=/usr/bin/bash \
--with-ldconfig=/usr/bin/ldconfig
}
build() {
cd $srcdir/$pkgname-$pkgver
make V=1
cd $srcdir/pacman-contrib-$_pkgver
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
make
}
check() {
make -C "$pkgname-$pkgver" check
make -C pacman-contrib-$_pkgver check
}
package() {
cd $srcdir/$pkgname-$pkgver
make DESTDIR=$pkgdir install
# install Arch specific stuff
install -dm755 $pkgdir/etc
install -m644 $srcdir/pacman.conf.$CARCH $pkgdir/etc/pacman.conf
case "$CARCH" in
i686)
mycarch="i686"
mychost="i686-pc-linux-gnu"
myflags="-march=i686"
;;
x86_64)
mycarch="x86_64"
mychost="x86_64-pc-linux-gnu"
myflags="-march=x86-64"
;;
esac
install -m644 $srcdir/makepkg.conf $pkgdir/etc/
# set things correctly in the default conf file
sed -i $pkgdir/etc/makepkg.conf \
-e "s|@CARCH[@]|$mycarch|g" \
-e "s|@CHOST[@]|$mychost|g" \
-e "s|@CARCHFLAGS[@]|$myflags|g"
# put bash_completion in the right location
install -dm755 ${pkgdir}/usr/share/bash-completion/completions
mv ${pkgdir}/etc/bash_completion.d/pacman \
${pkgdir}/usr/share/bash-completion/completions
rmdir ${pkgdir}/etc/bash_completion.d
for f in makepkg pacman-key; do
ln -s pacman "$pkgdir/usr/share/bash-completion/completions/$f"
done
# install pacman-init
install -dm755 $pkgdir/usr/lib/systemd/system/
install -m644 $srcdir/etc-pacman.d-gnupg.mount $pkgdir/usr/lib/systemd/system/etc-pacman.d-gnupg.mount
install -m644 $srcdir/pacman-init.service $pkgdir/usr/lib/systemd/system/pacman-init.service
cd $srcdir/pacman-contrib-$_pkgver
make DESTDIR="$pkgdir" install
# replace rankmirrors
rm "$pkgdir/usr/bin/rankmirrors"
ln -sfv "/usr/bin/pacman-mirrors" "$pkgdir/usr/bin/rankmirrors"
}
sha256sums=('9f5993fc8923530713742f15df284677f297b3eca15ed7a24758c98ac7399bd3'
'SKIP'
'0fb95514bd16a316d4cce920d34edc88b0d0618c484e2d7588746869d2339795'
'SKIP'
'b2ebeb47dd78e9df277f5d363daa079c82850a0ee65d2017689497b340b92e80'
'01aa62ecd3e3d37bf800cd3ab0bf55121d3dd1d51a5070175c67216167a846de'
'eec71e0b23f2ac1f06ad6ec5890d9de62effe0883ffd16573eed2153d0c87475'
'9b2304141582a421e812c76760a74f360a3cbd780472cbb60cf023a34d6fcb3d'
'2a31d4db5f6e19e0148d4892de14317514f2b2dfb5369c7972a641ca8be89e5a'
'd3a77bf8ea916c24a73b2a2dc4162d2b81f993394850e0f2c331a8f8893c1a0b'
'b6d14727ec465bb66d0a0358163b1bbfafcb4eaed55a0f57c30aabafae7eed68'
'65d8bdccdcccb64ae05160b5d1e7f3e45e1887baf89dda36c1bd44c62442f91b')
[Unit]
Description=Temporary /etc/pacman.d/gnupg directory
[Mount]
What=tmpfs
Where=/etc/pacman.d/gnupg
Type=tmpfs
Options=mode=0755
#
# /etc/makepkg.conf
#
#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')
# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget
#-- The package required by makepkg to download VCS sources
# Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
'git::git'
'hg::mercurial'
'svn::subversion')
#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="@CARCH@"
CHOST="@CHOST@"
#-- Compiler and Linker Flags
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="@CARCHFLAGS@ -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"
CXXFLAGS="@CARCHFLAGS@ -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
#-- Debugging flags
DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(!distcc color !ccache check !sign)
# A negated environment option will do the opposite of the comments below.
#
#-- distcc: Use the Distributed C/C++/ObjC compiler
#-- color: Colorize output messages
#-- ccache: Use ccache to cache compilation
#-- check: Run the check() function if present in the PKGBUILD
#-- sign: Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg
#########################################################################
# GLOBAL PACKAGE OPTIONS
# These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug)
# A negated option will do the opposite of the comments below.
#
#-- strip: Strip symbols from binaries/libraries
#-- docs: Save doc directories specified by DOC_DIRS
#-- libtool: Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs: Leave empty directories in packages
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge: Remove files specified by PURGE_TARGETS
#-- debug: Add debugging flags as specified in DEBUG_* variables
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)
#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"
#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"
#-- Specify a key to use for package signing
#GPGKEY=""
#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
# WARNING: Do NOT modify these variables unless you know what you are
# doing.
#
PKGEXT='.pkg.tar.xz'
SRCEXT='.src.tar.gz'
[Unit]
Description=Initialize Pacman keyring
Wants=haveged.service
After=haveged.service
Requires=etc-pacman.d-gnupg.mount
After=etc-pacman.d-gnupg.mount
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/pacman-key --init
ExecStart=/usr/bin/pacman-key --populate archlinux manjaro
[Install]
WantedBy=multi-user.target
diff -Nur a/etc/pacman.conf.in b/etc/pacman.conf.in
--- a/etc/pacman.conf.in 2013-04-30 13:05:45.000000000 +0200
+++ b/etc/pacman.conf.in 2014-12-23 11:43:38.039141449 +0100
@@ -15,6 +15,8 @@
#LogFile = @localstatedir@/log/pacman.log
#GPGDir = @sysconfdir@/pacman.d/gnupg/
HoldPkg = pacman glibc
+# If upgrades are available for these packages they will be asked for first
+SyncFirst = pacman
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
diff -Nur a/src/pacman/conf.c b/src/pacman/conf.c
--- a/src/pacman/conf.c 2014-12-19 04:48:00.000000000 +0100
+++ b/src/pacman/conf.c 2014-12-23 11:45:05.435334649 +0100
@@ -132,6 +132,7 @@
alpm_list_free(oldconfig->explicit_removes);
FREELIST(oldconfig->holdpkg);
+ FREELIST(oldconfig->syncfirst);
FREELIST(oldconfig->ignorepkg);
FREELIST(oldconfig->ignoregrp);
FREELIST(oldconfig->assumeinstalled);
@@ -513,6 +514,8 @@
setrepeatingoption(value, "IgnoreGroup", &(config->ignoregrp));
} else if(strcmp(key, "HoldPkg") == 0) {
setrepeatingoption(value, "HoldPkg", &(config->holdpkg));
+ } else if(strcmp(key, "SyncFirst") == 0) {
+ setrepeatingoption(value, "SyncFirst", &(config->syncfirst));
} else if(strcmp(key, "CacheDir") == 0) {
setrepeatingoption(value, "CacheDir", &(config->cachedirs));
} else if(strcmp(key, "Architecture") == 0) {
diff -Nur a/src/pacman/conf.h b/src/pacman/conf.h
--- a/src/pacman/conf.h 2014-10-14 02:44:20.000000000 +0200
+++ b/src/pacman/conf.h 2014-12-23 11:45:38.021824780 +0100
@@ -99,6 +99,7 @@
/* select -Sc behavior */
unsigned short cleanmethod;
alpm_list_t *holdpkg;
+ alpm_list_t *syncfirst;
alpm_list_t *ignorepkg;
alpm_list_t *ignoregrp;
alpm_list_t *assumeinstalled;
diff -Nur a/src/pacman/sync.c b/src/pacman/sync.c
--- a/src/pacman/sync.c 2014-12-19 04:48:00.000000000 +0100
+++ b/src/pacman/sync.c 2014-12-23 11:51:26.049939350 +0100
@@ -548,6 +548,26 @@
return ret;
}
+static alpm_list_t *syncfirst(void) {
+ alpm_list_t *i, *res = NULL;
+ alpm_db_t *db_local = alpm_get_localdb(config->handle);
+ alpm_list_t *syncdbs = alpm_get_syncdbs(config->handle);
+
+ for(i = config->syncfirst; i; i = alpm_list_next(i)) {
+ const char *pkgname = i->data;
+ alpm_pkg_t *pkg = alpm_db_get_pkg(db_local, pkgname);
+ if(pkg == NULL) {
+ continue;
+ }
+
+ if(alpm_sync_newversion(pkg, syncdbs)) {
+ res = alpm_list_add(res, strdup(pkgname));
+ }
+ }
+
+ return res;
+}
+
static alpm_db_t *get_db(const char *dbname)
{
alpm_list_t *i;
@@ -959,6 +979,53 @@
}
}
+ /* check for syncfirsts */
+ if(!config->op_s_downloadonly && !config->print) {
+ /* check for newer versions of packages to be upgraded first */
+ alpm_list_t *i, *j, *syncfirsts = syncfirst();
+ if(syncfirsts) {
+ /* Do not ask user if all the -S targets are SyncFirst packages, see FS#15810 */
+ alpm_list_t *targets_diff = alpm_list_diff(targets, syncfirsts, (alpm_list_fn_cmp)strcmp);
+ if(config->op_s_upgrade || targets_diff) {
+ int syncfirst_ret = 1;
+ colon_printf(_("Some packages should be upgraded first...\n"));
+ if(trans_init(0, 1) == 0) {
+ for(i = syncfirsts; i; i = alpm_list_next(i)) {
+ syncfirst_ret = process_targname(alpm_get_syncdbs(config->handle), i->data, 0);
+ if (syncfirst_ret == 1) {
+ break;
+ }
+ }
+ }
+ if (syncfirst_ret == 0) {
+ syncfirst_ret = sync_prepare_execute();
+ } else {
+ trans_release();
+ }
+ if (syncfirst_ret == 0) {
+ /* reinitialize handle to take care of changes */
+ parseconfig(config->configfile);
+ /* remove syncfirsts from targets */
+ alpm_list_t *i = targets;
+ while(i) {
+ for(j = syncfirsts; j; j = alpm_list_next(j)) {
+ if(strcmp(i->data, j->data) == 0) {
+ targets = alpm_list_remove_item(targets, i);
+ break;
+ }
+ }
+ i = i->next;
+ }
+ }
+ printf("\n");
+ } else {
+ pm_printf(ALPM_LOG_DEBUG, "skipping SyncFirst\n");
+ }
+ alpm_list_free(targets_diff);
+ FREELIST(syncfirsts);
+ }
+ }
+
return sync_trans(targets);
}
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc manjaro-system
# If upgrades are available for these packages they will be asked for first
SyncFirst = manjaro-system archlinux-keyring manjaro-keyring
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta = 0.7
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
#Color
#TotalDownload
CheckSpace
#VerbosePkgLists
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Manjaro Linux
# packagers with `pacman-key --populate archlinux manjaro`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc manjaro-system
# If upgrades are available for these packages they will be asked for first
SyncFirst = manjaro-system archlinux-keyring manjaro-keyring
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta = 0.7
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
#Color
#TotalDownload
CheckSpace
#VerbosePkgLists
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Manjaro Linux
# packagers with `pacman-key --populate archlinux manjaro`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.
[multilib]
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
#!/bin/sh
msg() {
ALL_OFF="\e[1;0m"
BOLD="\e[1;1m"
GREEN="${BOLD}\e[1;32m"
local mesg=$1; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
PACMAN_OLD="$(date +%m%d%M%S)"
# one time stuff for md5sum issue with older pacman versions
if [ "$(vercmp $2 3.0.2)" -lt 0 ]; then
_resetbackups
fi
if [ ! -f "/etc/pacman.d/gnupg/pubring.gpg" ] || [ "$(vercmp $2 4.0.3-3)" -lt 0 ]; then
_check_pubring
fi
if [ "$(vercmp $2 4.1.0-2)" -lt 0 ]; then
if [ -f "/etc/pacman.conf.pacnew" ]; then
msg "You had an old pacman.conf. We updated it for you."
msg "You can find your old pacman.conf saved as \`/etc/pacman-old-${PACMAN_OLD}.conf\`"
mv /etc/pacman.conf /etc/pacman-old-${PACMAN_OLD}.conf
mv /etc/pacman.conf.pacnew /etc/pacman.conf
fi
if [ ! -f "usr/bin/pacman-mirrors" ]; then
msg "Your current mirrorlist was saved as \`/etc/pacman.d/mirrorlist-old-${PACMAN_OLD}\`"
msg "A generic mirrorlist, set to our default server, was generated!"
msg "Use \`pacman-mirrors\` to generate and update your pacman mirrorlist."
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist-old-${PACMAN_OLD}