Single-branch git clone in PKGBUILD
I have a github repo with several branches and I want to create a package based on the master branch. In a PKGBUILD I used "git clone https://github.com/some_account/some_repo --single-branch master" to clone only the master branch and not all the other thing. I would like to modify my PKGBUILD to use " source='git://github.com/some_account/some_repo.git' " and not directly use the above "git clone" command. How can I tell makepkg to clone olny the master branch and not all the repo in the later form?
Allan wrote:That still downloads all branches...
The only way is to manually downloads the source in the prepare function.
Yes you are right. It still downloads the whole repo.
Thanks
Last edited by nikta (2013-12-11 15:10:39)
Similar Messages
-
[WONTFIX] Having trouble with git clone for a VCS type PKGBUILD
I'm trying to update (QGIS) in the AUR to use git so that I can make use of patches as they become available.
I have
source=("$pkgname"::'git+https://github.com/qgis/QGIS/tree/release-2_4')
but this pulls a lot of data (750+ MB) and the pull or clone should only be ~80MB for that specific branch.
Changing the source to
source=("$pkgname"::'git://github.com/qgis/QGIS.git#branch=release-2_4')
it does the same thing and grabs a lot of data.
I noticed the fragment(branch) is ignored and it clones "master" instead.
From the terminal I can do
git clone -b release-2_4 --single-branch --depth 1 git://github.com/qgis/QGIS.git qgis
which works perfectly.
Is there a way to make "git clone" in the PKGBUILD use those flags like "-b release-2_4 --single-branch --depth 1"?
Last edited by saultdon (2014-06-29 02:03:54)apg wrote:https://bugs.archlinux.org/task/34677
https://bugs.archlinux.org/task/36631
https://bugs.archlinux.org/task/37747
"Reason for closing: Won't implement"
So it looks like my idea of using the old VCS pkgbuild would be the next best thing to try and if that fails, just tell users to check for latest commits since their last compile and re-download the tarball if needed (really didn't want to do that... it's much better to only have to fetch changes instead of the entire source).
Comment by Allan McRae (Allan) - Wednesday, 21 August 2013, 16:49 GMT-7
That breaks the second checkout that is done by makepkg when "extracting sources".
Just don't use the source array and manually download the source in prepare(). (i.e. basically the old style of VCS package) -
[BUNK] Alternative/faster/cheaper GIT routine for PKGBUILDs
UPDATE (12.21.09): None of this works right. go back to cloning or use a fetch without a --depth :( It was a good exercise though; git still rocks :)
UPDATE (12.15.09): Reworked/cleaned, fix bugs from comment #4 and #5
UPDATE (12.08.09): added support for remote HEAD, $_gitname is now optional
this routine enhances package libvirt-git (http://aur.archlinux.org/packages/libvi … t/PKGBUILD) from a 21.37 MiB download to 3.54 Mib. larger projects may benefit much more, e.g. x.org/etc PKGBUILDs.
after the PKGBUILD are some commands/output demonstrating the speedup.
HOW
1) git directory is kept in $startdir under a non-standard name (to hide it from normal git commands by user elsewhere on system)
2) work directory is set inside the $srcdir; this allows the src/ and pkg/ directories to be deleted without losing the git repository
3) if HEAD is used, the actual branch name is determined using git ls-remote and some trickery (to prevent redownloading in the future)
4) make sure work dir exists && link git dir to .git in work dir (standard/transparency) && change to work dir
5) if this is the first time this branch has been fetched, make it a shallow fetch
6) fetch only the exact objects you need to update/build successfully
7) hard reset work directory to $_gitrefspec
PKGBUILD
_gitroot="git://libvirt.org/libvirt.git"
#_gitname="HEAD" # optional: this could be master or any other valid ref on the remote side (HEAD/branch/tag) defaults to HEAD
#_gitrefspec=$_gitname # optional: any valid refspec for local repository state (advanced) defaults to $_gitname (dereferenced)
build() {
msg2 "Syncing with ${_gitroot}..."
g=${startdir}/${pkgname}.git; w=${srcdir}/${pkgname}
[ -n "${_gitname#HEAD}" ] || \
_gitname=$(git ls-remote $_gitroot | awk '$2~/HEAD/ {S=$1}; $1==S && $2!~/HEAD/ {sub("[a-z]+/[a-z]+/","",$2); print $2; exit}')
[ -d "${g}" ] || git --git-dir=${g} --work-tree=${w} init
mkdir -p ${w} && { [ -d "${w}/.git" ] || ln -s ${g} ${w}/.git; } && cd ${w}
git show-ref -q $_gitname || d="--depth=1"
git fetch -f -u -n $d ${_gitroot} +${_gitname}:${_gitname} || return 1
git reset --hard ${_gitrefspec:=$_gitname} || return 1
msg2 "Fetched remote ${_gitname}"
make || return 1
make DESTDIR=$pkgdir install || return 1
TARGETED FETCH
[build@PHS-001 ~]$ git init
Initialized empty Git repository in /var/abs/local/.git/
[build@PHS-001 ~]$ git fetch -u -f --depth=1 git://libvirt.org/libvirt +master:master
remote: Counting objects: 1230, done.
remote: Compressing objects: 100% (952/952), done.
remote: Total 1230 (delta 539), reused 432 (delta 246)
Receiving objects: 100% (1230/1230), 3.54 MiB | 340 KiB/s, done.
Resolving deltas: 100% (539/539), done.
From git://libvirt.org/libvirt
* [new branch] master -> master
NAIVE CLONE
[build@PHS-001 ~]$ git clone --depth=1 git://libvirt.org/libvirt
Initialized empty Git repository in /var/abs/local/libvirt/.git/
remote: Counting objects: 8671, done.
remote: Compressing objects: 100% (4858/4858), done.
remote: Total 8671 (delta 7135), reused 4548 (delta 3746)
Receiving objects: 100% (8671/8671), 21.37 MiB | 285 KiB/s, done.
Resolving deltas: 100% (7135/7135), done.
Last edited by extofme (2009-12-21 22:59:36)extofme wrote:that link you provided is for a clone not a fetch?
Right, but you can see the fetch command in the first line of the context:
cd "$_gitname" && git fetch && cd "$OLDPWD" || return 1
extofme wrote:
i created 2 stripped down, dummy PKGBUILDs. each does nothing but pull the kernel source; one uses my routine, the other uses a regular clone from PKGBUILD-git.proto. i used the same repository you did (linus kernel), and each started with nothing (no existing repo). my results are very different, and support my reasoning for a targeted fetch over a clone:
my routine) 91.64 MiB initially pulled
.proto clone) 313.29 MiB initally pulled
that's a savings of almost 350%. subsequent fetches will be even smaller than a "git pull", since only a single branch is updated. please see below for the confirming output, and the actual dummy PKGBUILDs used.
But thats only the initial clone step and I have never denied that it works better for this very first step. However, this is worth nothing when updating such repositories is not efficient.
extofme wrote:did you trying each from scratch (no initial repo)? i am pretty sure you are not as the code you've pasted does not contain "Initialized empty Git repository" .
Yes, I did but it's not included because it's not really interesting in my opinion as we already knew that the initial clone is smaller when using --depth=1 / your method. The repositories were created two days before the first (update) fetch.
Anyway, I will test your dummy pkgbuilds to make sure I did no mistake. I also attached my PKGBUILDs so you can have a look. The required files are contained in the aur tarball.
full clone
# Contributor: Mathias Burén <[email protected]>
# Maintainer: xduugu
pkgname=kernel26-git
pkgver=20091221
pkgrel=1
pkgdesc="The Linux Kernel and modules from Linus' git tree"
url="http://www.kernel.org/"
arch=(i686 x86_64)
license=('GPL2')
depends=('coreutils' 'kernel26-firmware-git' 'module-init-tools' 'mkinitcpio>=0.5.20')
makedepends=('git')
backup=(etc/mkinitcpio.d/$pkgname.preset)
install=$pkgname.install
changelog=$pkgname.changelog
source=($pkgname.preset config.{i686,x86_64} \
logo_linux_{clut224.ppm,mono.pbm,vga16.ppm})
md5sums=('7dd364c1dea0c459f3f3c76e86acbea9'
'a5549f442953feb52c3a6d03fe62e5a9'
'c195ce84a6961527e767482df492b70c'
'6a5a1925501fe20fafd04fdb3cb4f6ed'
'e8c333eaeac43f5c6a1d7b2f47af12e2'
'c120adbd9c0daa0136237a83adeabd1e')
sha256sums=('b2ffb854cc2f92e61482e48a8863407011d266cac86cede52899a875d6e448f6'
'ab0e3f3eafd22f35b544750119ec81646d408bdce84addf49643f495c8d710d7'
'af24ecaffd703e6664837f21414afdffb4fc8cb463f4b2733e72a572c1d6f267'
'4274579ccf42a9acc03283edffea2dda2c4a48e3fd734bbaeada4c16dff9d156'
'1e5bea8de1c2cc24498fb9a4fdbb313f36f38f671f2bfc46ccf7acbd7958a4b9'
'f9c7c1275313890fc12f6bab92e2c0794b5041e223d868eb0e34cd99baee3d7a')
_gitroot="git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git"
_gitname="linux-2.6.git"
# KERNEL CONFIG FILES
# This PKGBUILD searches for config files in the current directory
# and will use the first one it finds from the following
# list as base configuration:
# config.local
# config.saved.$CARCH
# config.$CARCH
# PATCHES
# This package builds the vanilla git kernel by default,
# but it is possible to patch the source without modifying
# this PKGBUILD.
# Simply create a directory 'patches' in your PKGBUILD
# directory and _any_ file (dotfiles excluded) in this
# folder will be applied to the kernel source.
# Prefixing the patch file names with dots will obviously
# excluded them from the patching process.
# CONFIGURATION
# Uncomment desired options
# Set to e.g. menuconfig, xconfig or gconfig
# For a full list of supported commands, please have a look
# at "Configuration targets" section of `make help`'s output.
# If unset or set to an empty string, the (manual) kernel
# configuration step will be skipped.
_config_cmd="menuconfig"
# The directory where the kernel should be built
# Can be useful, for example, if you want to compile on a
# tmpfs mount, which can speed up the compilation process
_build_dir="$srcdir"
# Stop build process after kernel configuration
# This option enables _save_config implicitly.
# _configure_only=1
# Append the date to the localversion
# e.g. -ARCH -> -ARCH-20090422
# _date_localversion=1
# Set the pkgver to the kernel version
# rather than the build date
# _kernel_pkgver=1
# Save the .config file to package directory
# as config.saved.$CARCH
# _save_config=1
# Make the kernel build process verbose
# _verbose=1
# where the magic happens...
build() {
# Get the latest kernel sources
msg "Fetching sources..."
cd "$startdir"
if [[ -d $_gitname ]]; then
msg2 "Updating sources..."
cd "$_gitname" && git fetch && cd "$OLDPWD" || return 1
else
msg2 "Cloning the project..."
warning "The initial clone will download approximately 300 mb"
git clone --mirror "$_gitroot" "$_gitname" || return 1
fi
msg "Creating build branch..."
rm -rf "$_build_dir/$_gitname-build"
git clone "$_gitname" "$_build_dir/$_gitname-build" || return 1
cd "$_build_dir/$_gitname-build" || return 1
# Add Arch Linux logo to the source
msg "Adding Arch Linux logo..."
cp "$srcdir/logo_linux_clut224.ppm" drivers/video/logo/ &&
cp "$srcdir/logo_linux_mono.pbm" drivers/video/logo/ &&
cp "$srcdir/logo_linux_vga16.ppm" drivers/video/logo/ || return 1
# Apply patches
if [[ -d $startdir/patches ]]; then
msg "Applying patches..."
local i
for i in "$startdir/patches/"*; do
msg2 "Applying ${i##*/}..."
patch -Np1 -i "$i" || (error "Applying ${i##*/} failed" && return 1)
done
fi
# CONFIGURATION
# Loading configuration
msg "Loading configuration..."
for i in local "saved.$CARCH" "$CARCH"; do
if [[ -e $startdir/config.$i ]]; then
msg2 "Using kernel config file config.$i..."
cp -f "$startdir/config.$i" .config || return 1
break
fi
done
[[ ! -e .config ]] &&
warning "No suitable kernel config file was found. You'll have to configure the kernel from scratch."
# Start the configuration
msg "Updating configuration..."
yes "" | make config > /dev/null
# fix lsmod path
sed -ri "s@s(bin/lsmod)@\1@" scripts/kconfig/streamline_config.pl
if [[ -n $_config_cmd ]]; then
msg2 "Running make $_config_cmd..."
make $_config_cmd || return 1
else
warning "Unknown config command: $_config_cmd"
fi
# Save the config file the package directory
if [[ -n $_save_config || -n $_configure_only ]]; then
msg "Saving configuration..."
msg2 "Saving $_build_dir/$_gitname-build/.config as $startdir/config.saved.$CARCH"
cp .config "$startdir/config.saved.$CARCH" || return 1
fi
# Stop after configuration if desired
if [[ -n $_configure_only ]]; then
rm -rf "$_build_dir/$_gitname-build"
return 1
fi
# Append date to localversion
if [[ -n $_date_localversion ]]; then
local _localversion="$(sed -rn 's/^CONFIG_LOCALVERSION="([^"]*)"$/\1/p' .config)"
[[ -n $_localversion ]] && msg2 "CONFIG_LOCALVERSION is set to: $_localversion"
# since this is a git package, the $pkgver is equal to $(date +%Y%m%d)
msg2 "Appending $pkgver to CONFIG_LOCALVERSION..."
sed -i "s/^CONFIG_LOCALVERSION=.*$/CONFIG_LOCALVERSION=\"$_localversion-$pkgver\"/" \
.config
fi
# BUILD PROCESS
# Build the kernel and modules
msg "Building kernel and modules..."
make V="$_verbose" bzImage modules || return 1
package() {
local _karch="x86"
cd "$_build_dir/$_gitname-build" || return 1
# Get kernel version
local _kernver=$(make kernelrelease)
local _basekernel=${_kernver%%-*}
# Use kernel version instead of the current date as pkgver
if [[ -n $_kernel_pkgver ]]; then
msg "Updating pkgver..."
# work around AUR parser bug
(( 1 )) && pkgver=${_kernver//-/_}
# do not silently overwrite existing packages
if (( ! FORCE )) && [[ -e $PKGDEST/$pkgname-$pkgver-$pkgrel-${CARCH}${PKGEXT} ]]; then
error "A package has already been built. (use -f to overwrite)"
return 1
fi
fi
# Provide kernel26
# (probably someone wants to use this kernel exclusively?)
provides=("${provides[@]}" kernel26{,-headers}"=${_kernver//-/_}")
# INSTALLATION
# Install the image
msg "Installing kernel image..."
install -D -m644 System.map "$pkgdir/boot/System.map26-git" &&
install -D -m644 arch/$_karch/boot/bzImage "$pkgdir/boot/vmlinuz26-git" &&
install -D -m644 .config "$pkgdir/boot/kconfig26-git" || return 1
# Install kernel modules
msg "Installing kernel modules..."
make INSTALL_MOD_PATH="$pkgdir" modules_install
# Install fake kernel source
install -D -m644 Module.symvers "$pkgdir/usr/src/linux-$_kernver/Module.symvers" &&
install -D -m644 Makefile "$pkgdir/usr/src/linux-$_kernver/Makefile" &&
install -D -m644 kernel/Makefile "$pkgdir/usr/src/linux-$_kernver/kernel/Makefile" &&
install -D -m644 .config "$pkgdir/usr/src/linux-$_kernver/.config" &&
install -D -m644 .config "$pkgdir/lib/modules/$_kernver/.config" || return 1
# Install scripts directory and fix permissions on it
cp -a scripts "$pkgdir/usr/src/linux-$_kernver" &&
chmod og-w -R "$pkgdir/usr/src/linux-$_kernver" || return 1
# Install header files
msg "Installing header files..."
# kernel headers
msg2 "kernel"
for i in acpi asm-generic config linux math-emu media net pcmcia scsi sound trace video; do
mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/$i" &&
cp -a include/$i "$pkgdir/usr/src/linux-$_kernver/include" || return 1
done
# lirc headers
msg2 "lirc"
mkdir -p "$pkgdir/usr/src/linux-$_kernver/drivers/media/video" &&
cp drivers/media/video/*.h "$pkgdir/usr/src/linux-$_kernver/drivers/media/video/" || return 1
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
mkdir -p "$pkgdir/usr/src/linux-$_kernver/drivers/media/video/$i" &&
cp -a drivers/media/video/$i/*.h "$pkgdir/usr/src/linux-$_kernver/drivers/media/video/$i" || return 1
done
# md headers
msg2 "md"
mkdir -p "$pkgdir/usr/src/linux-$_kernver/drivers/md" &&
cp -a drivers/md/*.h "$pkgdir/usr/src/linux-$_kernver/drivers/md" || return 1
# inotify.h
msg2 "inotify.h"
mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/linux" &&
cp -a include/linux/inotify.h "$pkgdir/usr/src/linux-$_kernver/include/linux/" || return 1
# CLUSTERIP file for iptables
msg2 "CLUSTERIP file for iptables"
mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/" &&
cp -a net/ipv4/netfilter/ipt_CLUSTERIP.c "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/" || return 1
# wireless headers
msg2 "wireless"
mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/mac80211/" &&
cp net/mac80211/*.h "$pkgdir/usr/src/linux-$_kernver/net/mac80211/" || return 1
# Kconfig files
msg2 "Kconfig files"
for i in $(find . -name "Kconfig*"); do
mkdir -p "$pkgdir/usr/src/linux-$_kernver/${i%/*}" &&
cp -a "$i" "$pkgdir/usr/src/linux-$_kernver/$i" || return 1
done
# Install architecture dependent files
msg "Installing architecture files..."
mkdir -p "$pkgdir/usr/src/linux-$_kernver/arch/$_karch/kernel" &&
cp -a arch/$_karch/kernel/asm-offsets.s "$pkgdir/usr/src/linux-$_kernver/arch/$_karch/kernel"
cp -a arch/$_karch/Makefile* "$pkgdir/usr/src/linux-$_kernver/arch/$_karch"
cp -a arch/$_karch/configs "$pkgdir/usr/src/linux-$_kernver/arch/$_karch"
# copy arch includes for external modules and fix the nVidia issue
mkdir -p "$pkgdir/usr/src/linux-$_kernver/arch/$_karch" &&
cp -a "arch/$_karch/include" "$pkgdir/usr/src/linux-$_kernver/arch/$_karch/" || return 1
# create a necessary symlink to the arch folder
cd "$pkgdir/usr/src/linux-$_kernver/arch" || return 1
if [[ $CARCH = "x86_64" ]]; then
ln -s $_karch x86_64 || return 1
else
ln -s $_karch i386 || return 1
fi
cd "$OLDPWD" || return 1
# Remove unneeded architecures
msg "Removing unneeded architectures..."
for i in "$pkgdir/usr/src/linux-$_kernver/arch/"*; do
[[ ${i##*/} != $_karch ]] && rm -rf "$i"
done
# Remove .gitignore files
msg "Removing .gitignore files from kernel source..."
find "$pkgdir/usr/src/linux-$_kernver/" -name ".gitignore" -delete
# Create some important symlinks
msg "Creating important symlinks..."
cd "$pkgdir/lib/modules/$_kernver" &&
rm -rf source build &&
ln -s "/usr/src/linux-$_kernver" build &&
cd "$OLDPWD" || return 1
cd "$pkgdir/usr/src" &&
ln -s "linux-$_kernver" "linux-$_basekernel-git" &&
cd "$OLDPWD" || return 1
cd "$pkgdir/lib/modules" &&
ln -s "$_kernver" "$_basekernel-git" &&
cd "$OLDPWD" || return 1
# Fix permissions
msg "Fixing permissions..."
chown -R root:root "$pkgdir/usr/src/linux-$_kernver" &&
find "$pkgdir/usr/src/linux-$_kernver" -type d -exec chmod 755 {} \; || return 1
# Install mkinitcpio files
msg "Installing preset file..."
install -D -m644 "$srcdir/kernel26-git.preset" \
"$pkgdir/etc/mkinitcpio.d/kernel26-git.preset" || return 1
msg "Generating kernel26-git.kver..."
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='$_kernver'" \
> "$pkgdir/etc/mkinitcpio.d/kernel26-git.kver" || return 1
# Remove the firmware
rm -rf "$pkgdir/lib/firmware"
# Remove build directory
rm -rf "$_build_dir/$_gitname-build"
# vim: set fenc=utf-8 ts=2 sw=2 noet:
your code
# Contributor: Mathias Burén <[email protected]>
# Maintainer: xduugu
pkgname=kernel26-git
pkgver=20091221
pkgrel=1
pkgdesc="The Linux Kernel and modules from Linus' git tree"
url="http://www.kernel.org/"
arch=(i686 x86_64)
license=('GPL2')
depends=('coreutils' 'kernel26-firmware-git' 'module-init-tools' 'mkinitcpio>=0.5.20')
makedepends=('git')
backup=(etc/mkinitcpio.d/$pkgname.preset)
install=$pkgname.install
changelog=$pkgname.changelog
source=($pkgname.preset config.{i686,x86_64} \
logo_linux_{clut224.ppm,mono.pbm,vga16.ppm})
md5sums=('7dd364c1dea0c459f3f3c76e86acbea9'
'a5549f442953feb52c3a6d03fe62e5a9'
'c195ce84a6961527e767482df492b70c'
'6a5a1925501fe20fafd04fdb3cb4f6ed'
'e8c333eaeac43f5c6a1d7b2f47af12e2'
'c120adbd9c0daa0136237a83adeabd1e')
sha256sums=('b2ffb854cc2f92e61482e48a8863407011d266cac86cede52899a875d6e448f6'
'ab0e3f3eafd22f35b544750119ec81646d408bdce84addf49643f495c8d710d7'
'af24ecaffd703e6664837f21414afdffb4fc8cb463f4b2733e72a572c1d6f267'
'4274579ccf42a9acc03283edffea2dda2c4a48e3fd734bbaeada4c16dff9d156'
'1e5bea8de1c2cc24498fb9a4fdbb313f36f38f671f2bfc46ccf7acbd7958a4b9'
'f9c7c1275313890fc12f6bab92e2c0794b5041e223d868eb0e34cd99baee3d7a')
_gitroot="git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git"
# KERNEL CONFIG FILES
# This PKGBUILD searches for config files in the current directory
# and will use the first one it finds from the following
# list as base configuration:
# config.local
# config.saved.$CARCH
# config.$CARCH
# PATCHES
# This package builds the vanilla git kernel by default,
# but it is possible to patch the source without modifying
# this PKGBUILD.
# Simply create a directory 'patches' in your PKGBUILD
# directory and _any_ file (dotfiles excluded) in this
# folder will be applied to the kernel source.
# Prefixing the patch file names with dots will obviously
# excluded them from the patching process.
# CONFIGURATION
# Uncomment desired options
# Set to e.g. menuconfig, xconfig or gconfig
# For a full list of supported commands, please have a look
# at "Configuration targets" section of `make help`'s output.
# If unset or set to an empty string, the (manual) kernel
# configuration step will be skipped.
_config_cmd="menuconfig"
# The directory where the kernel should be built
# Can be useful, for example, if you want to compile on a
# tmpfs mount, which can speed up the compilation process
_build_dir="$srcdir"
# Stop build process after kernel configuration
# This option enables _save_config implicitly.
# _configure_only=1
# Append the date to the localversion
# e.g. -ARCH -> -ARCH-20090422
# _date_localversion=1
# Set the pkgver to the kernel version
# rather than the build date
# _kernel_pkgver=1
# Save the .config file to package directory
# as config.saved.$CARCH
# _save_config=1
# Make the kernel build process verbose
# _verbose=1
# where the magic happens...
build() {
# Get the latest kernel sources
msg2 "Syncing with ${_gitroot}..."
g=${startdir}/${pkgname}.git; w=${srcdir}/${pkgname}
[ -n "${_gitname#HEAD}" ] || \
_gitname=$(git ls-remote $_gitroot | awk '$2~/HEAD/ {S=$1}; $1==S && $2!~/HEAD/ {sub("[a-z]+/[a-z]+/","",$2); print $2; exit}')
[ -d "${g}" ] || git --git-dir=${g} --work-tree=${w} init
mkdir -p ${w} && { [ -d "${w}/.git" ] || ln -s ${g} ${w}/.git; } && cd ${w}
git show-ref -q $_gitname || d="--depth=1"
git fetch -f -u -n $d ${_gitroot} +${_gitname}:${_gitname} || return 1
git reset --hard ${_gitrefspec:=$_gitname} || return 1
msg2 "Fetched remote ${_gitname}"
# Add Arch Linux logo to the source
msg "Adding Arch Linux logo..."
cp "$srcdir/logo_linux_clut224.ppm" drivers/video/logo/ &&
cp "$srcdir/logo_linux_mono.pbm" drivers/video/logo/ &&
cp "$srcdir/logo_linux_vga16.ppm" drivers/video/logo/ || return 1
# Apply patches
if [[ -d $startdir/patches ]]; then
msg "Applying patches..."
local i
for i in "$startdir/patches/"*; do
msg2 "Applying ${i##*/}..."
patch -Np1 -i "$i" || (error "Applying ${i##*/} failed" && return 1)
done
fi
# CONFIGURATION
# Loading configuration
msg "Loading configuration..."
for i in local "saved.$CARCH" "$CARCH"; do
if [[ -e $startdir/config.$i ]]; then
msg2 "Using kernel config file config.$i..."
cp -f "$startdir/config.$i" .config || return 1
break
fi
done
[[ ! -e .config ]] &&
warning "No suitable kernel config file was found. You'll have to configure the kernel from scratch."
# Start the configuration
msg "Updating configuration..."
yes "" | make config > /dev/null
# fix lsmod path
sed -ri "s@s(bin/lsmod)@\1@" scripts/kconfig/streamline_config.pl
if [[ -n $_config_cmd ]]; then
msg2 "Running make $_config_cmd..."
make $_config_cmd || return 1
else
warning "Unknown config command: $_config_cmd"
fi
# Save the config file the package directory
if [[ -n $_save_config || -n $_configure_only ]]; then
msg "Saving configuration..."
msg2 "Saving $_build_dir/$_gitname-build/.config as $startdir/config.saved.$CARCH"
cp .config "$startdir/config.saved.$CARCH" || return 1
fi
# Stop after configuration if desired
if [[ -n $_configure_only ]]; then
rm -rf "$_build_dir/$_gitname-build"
return 1
fi
# Append date to localversion
if [[ -n $_date_localversion ]]; then
local _localversion="$(sed -rn 's/^CONFIG_LOCALVERSION="([^"]*)"$/\1/p' .config)"
[[ -n $_localversion ]] && msg2 "CONFIG_LOCALVERSION is set to: $_localversion"
# since this is a git package, the $pkgver is equal to $(date +%Y%m%d)
msg2 "Appending $pkgver to CONFIG_LOCALVERSION..."
sed -i "s/^CONFIG_LOCALVERSION=.*$/CONFIG_LOCALVERSION=\"$_localversion-$pkgver\"/" \
.config
fi
# BUILD PROCESS
# Build the kernel and modules
msg "Building kernel and modules..."
make V="$_verbose" bzImage modules || return 1
package() {
local _karch="x86"
cd "$_build_dir/$_gitname-build" || return 1
# Get kernel version
local _kernver=$(make kernelrelease)
local _basekernel=${_kernver%%-*}
# Use kernel version instead of the current date as pkgver
if [[ -n $_kernel_pkgver ]]; then
msg "Updating pkgver..."
# work around AUR parser bug
(( 1 )) && pkgver=${_kernver//-/_}
# do not silently overwrite existing packages
if (( ! FORCE )) && [[ -e $PKGDEST/$pkgname-$pkgver-$pkgrel-${CARCH}${PKGEXT} ]]; then
error "A package has already been built. (use -f to overwrite)"
return 1
fi
fi
# Provide kernel26
# (probably someone wants to use this kernel exclusively?)
provides=("${provides[@]}" kernel26{,-headers}"=${_kernver//-/_}")
# INSTALLATION
# Install the image
msg "Installing kernel image..."
install -D -m644 System.map "$pkgdir/boot/System.map26-git" &&
install -D -m644 arch/$_karch/boot/bzImage "$pkgdir/boot/vmlinuz26-git" &&
install -D -m644 .config "$pkgdir/boot/kconfig26-git" || return 1
# Install kernel modules
msg "Installing kernel modules..."
make INSTALL_MOD_PATH="$pkgdir" modules_install
# Install fake kernel source
install -D -m644 Module.symvers "$pkgdir/usr/src/linux-$_kernver/Module.symvers" &&
install -D -m644 Makefile "$pkgdir/usr/src/linux-$_kernver/Makefile" &&
install -D -m644 kernel/Makefile "$pkgdir/usr/src/linux-$_kernver/kernel/Makefile" &&
install -D -m644 .config "$pkgdir/usr/src/linux-$_kernver/.config" &&
install -D -m644 .config "$pkgdir/lib/modules/$_kernver/.config" || return 1
# Install scripts directory and fix permissions on it
cp -a scripts "$pkgdir/usr/src/linux-$_kernver" &&
chmod og-w -R "$pkgdir/usr/src/linux-$_kernver" || return 1
# Install header files
msg "Installing header files..."
# kernel headers
msg2 "kernel"
for i in acpi asm-generic config linux math-emu media net pcmcia scsi sound trace video; do
mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/$i" &&
cp -a include/$i "$pkgdir/usr/src/linux-$_kernver/include" || return 1
done
# lirc headers
msg2 "lirc"
mkdir -p "$pkgdir/usr/src/linux-$_kernver/drivers/media/video" &&
cp drivers/media/video/*.h "$pkgdir/usr/src/linux-$_kernver/drivers/media/video/" || return 1
for i in bt8xx cpia2 cx25840 cx88 em28xx et61x251 pwc saa7134 sn9c102 usbvideo zc0301; do
mkdir -p "$pkgdir/usr/src/linux-$_kernver/drivers/media/video/$i" &&
cp -a drivers/media/video/$i/*.h "$pkgdir/usr/src/linux-$_kernver/drivers/media/video/$i" || return 1
done
# md headers
msg2 "md"
mkdir -p "$pkgdir/usr/src/linux-$_kernver/drivers/md" &&
cp -a drivers/md/*.h "$pkgdir/usr/src/linux-$_kernver/drivers/md" || return 1
# inotify.h
msg2 "inotify.h"
mkdir -p "$pkgdir/usr/src/linux-$_kernver/include/linux" &&
cp -a include/linux/inotify.h "$pkgdir/usr/src/linux-$_kernver/include/linux/" || return 1
# CLUSTERIP file for iptables
msg2 "CLUSTERIP file for iptables"
mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/" &&
cp -a net/ipv4/netfilter/ipt_CLUSTERIP.c "$pkgdir/usr/src/linux-$_kernver/net/ipv4/netfilter/" || return 1
# wireless headers
msg2 "wireless"
mkdir -p "$pkgdir/usr/src/linux-$_kernver/net/mac80211/" &&
cp net/mac80211/*.h "$pkgdir/usr/src/linux-$_kernver/net/mac80211/" || return 1
# Kconfig files
msg2 "Kconfig files"
for i in $(find . -name "Kconfig*"); do
mkdir -p "$pkgdir/usr/src/linux-$_kernver/${i%/*}" &&
cp -a "$i" "$pkgdir/usr/src/linux-$_kernver/$i" || return 1
done
# Install architecture dependent files
msg "Installing architecture files..."
mkdir -p "$pkgdir/usr/src/linux-$_kernver/arch/$_karch/kernel" &&
cp -a arch/$_karch/kernel/asm-offsets.s "$pkgdir/usr/src/linux-$_kernver/arch/$_karch/kernel"
cp -a arch/$_karch/Makefile* "$pkgdir/usr/src/linux-$_kernver/arch/$_karch"
cp -a arch/$_karch/configs "$pkgdir/usr/src/linux-$_kernver/arch/$_karch"
# copy arch includes for external modules and fix the nVidia issue
mkdir -p "$pkgdir/usr/src/linux-$_kernver/arch/$_karch" &&
cp -a "arch/$_karch/include" "$pkgdir/usr/src/linux-$_kernver/arch/$_karch/" || return 1
# create a necessary symlink to the arch folder
cd "$pkgdir/usr/src/linux-$_kernver/arch" || return 1
if [[ $CARCH = "x86_64" ]]; then
ln -s $_karch x86_64 || return 1
else
ln -s $_karch i386 || return 1
fi
cd "$OLDPWD" || return 1
# Remove unneeded architecures
msg "Removing unneeded architectures..."
for i in "$pkgdir/usr/src/linux-$_kernver/arch/"*; do
[[ ${i##*/} != $_karch ]] && rm -rf "$i"
done
# Remove .gitignore files
msg "Removing .gitignore files from kernel source..."
find "$pkgdir/usr/src/linux-$_kernver/" -name ".gitignore" -delete
# Create some important symlinks
msg "Creating important symlinks..."
cd "$pkgdir/lib/modules/$_kernver" &&
rm -rf source build &&
ln -s "/usr/src/linux-$_kernver" build &&
cd "$OLDPWD" || return 1
cd "$pkgdir/usr/src" &&
ln -s "linux-$_kernver" "linux-$_basekernel-git" &&
cd "$OLDPWD" || return 1
cd "$pkgdir/lib/modules" &&
ln -s "$_kernver" "$_basekernel-git" &&
cd "$OLDPWD" || return 1
# Fix permissions
msg "Fixing permissions..."
chown -R root:root "$pkgdir/usr/src/linux-$_kernver" &&
find "$pkgdir/usr/src/linux-$_kernver" -type d -exec chmod 755 {} \; || return 1
# Install mkinitcpio files
msg "Installing preset file..."
install -D -m644 "$srcdir/kernel26-git.preset" \
"$pkgdir/etc/mkinitcpio.d/kernel26-git.preset" || return 1
msg "Generating kernel26-git.kver..."
echo -e "# DO NOT EDIT THIS FILE\nALL_kver='$_kernver'" \
> "$pkgdir/etc/mkinitcpio.d/kernel26-git.kver" || return 1
# Remove the firmware
rm -rf "$pkgdir/lib/firmware"
# Remove build directory
rm -rf "$_build_dir/$_gitname-build"
# vim: set fenc=utf-8 ts=2 sw=2 noet: -
[SOLVED] makepkg git clone fails (firewalled), how to use https
At my new employer git(hub) traffic has been blocked so I am unable to clone a repo with "git clone git://someurl/..." but I can clone via https "git clone https://someurl/..."
However, makepkg uses the former and fails with the following error:
Cloning into bare repository '/tmp/cower-git/cower' ...
fatal: unable to connect to github.com:
github.com[0: 192.30.252.130]: errno=Connection refused
Can I configure makepkg to use https cloning? I can edit makepkg itself, but this seems far from ideal.
For the time being, I just cd'ed into 'src' and manually cloned via https, then backed out and used 'makepkg -ei'. So I now have cower up and running, but this is a bit tedius to do for all git packages.Change it how? I tried changing it to "https://github..." but then makepkg didn't treat it as a git repo and just downloaded the webpage.
EDIT: nevermind, I'm an idiot:
source=("git+https://github/...")
I know I had done this before, but I wasn't finding it when I needed it. Thanks.
- Trilby: Moderator and Noob! -
Looping a single branch in User Decision Step
Hi All,
Can anyone tell me is looping possible for a single branch in user decision step in a workflow?
If yes, How?
I want like to loop the step cancel and keep workitem inbox.
Whenever the user clicks cancel and keep workitem in inbox in a user decision and again executes the WI i would like the workflow to start execution from the step just above the user decision step, i.e; Display PR.
This is my requirement. Tell me how can i implement it?
Thanks,
RajHi,
instead of doing so, you could try to enter that method as "secondary method" or "before method" within the tab-strip "Methods".
If you used your own coding for a decision, you could enable the exception 8015 of the method's result, which is the cancel-button. If you did so, you can enable that outcome in the workflow-activity's definition.
Best wishes,
Florin -
Hi
I'd like to specify the location where the git repository is to be cloned.
I tried using "absolute folder location", but in that case it looks like
Oomph expects to find an already cloned repository there (and by the
way, if that's not the case, there's no error feedback, simply the
workspace stays empty and only if I try to run the setup tasks from the
workspace I get the error).
So what's the correct way to specify "please clone the git repository in
this specific path"?
thanks in advance
Lorenzo
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/bookLorenzo,
That's because you need to specify the entire folder name for this rule,
including the name of the folder for the git clone. You've specified a
folder that isn't empty and isn't an existing clone, so no clone can be
created there.
On 06/07/2015 6:13 PM, Lorenzo Bettini wrote:
> On 06/07/2015 12:17, Eike Stepper wrote:
>> Am 06.07.2015 um 11:49 schrieb Lorenzo Bettini:
>>> Apparently, it works only if I choose another option like
>>>
>>> ${git.container.root/}${@id.remoteURI|gitRepository/}
>>>
>>> and set the root git-container folder accordingly.
>>>
>>> But I found it misleading that choosing an absolute path has a different
>>> semantics, i.e., "the repository must have already been cloned" :)
>> At the time the GitCloneTask is performed it already has an absolute
>> path, no matter how this was computed (e.g. what attribute rule you
>> picked and what what rule-specific properties you've entered). Can you
>> please outline the exacts steps needed to reproduce the problem?
>>
> Hi Eike
>
> here are the steps:
>
> - select any project, e.g., Oomph itself
> - in the variables dialog select from the dropdown box "located in the
> specified absolute folder location"
> - then specify an absolute path in the text field of an existing
> directory, e.g., "/home/myuser/tmp/git" (where "git" exists but it's empty)
>
> the IDE is installed and started and then no other feedback is given (no
> animated icon is shown in the status bar). Now try to run the setup
> tasks manually and a dialog is shown with this exception (so it looks
> like when an absolute path is specified then it expects the repository
> has already been cloned):
>
> java.lang.Exception:
> org.eclipse.jgit.errors.RepositoryNotFoundException: repository not
> found: /home/bettini/tmp/git
> at
> org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.isNeeded(GitCloneTaskImpl.java:660)
> at
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.initNeededSetupTasks(SetupTaskPerformer.java:1496)
> at
> org.eclipse.oomph.setup.ui.wizards.ConfirmationPage.initNeededSetupTasks(ConfirmationPage.java:325)
> at
> org.eclipse.oomph.setup.ui.wizards.ConfirmationPage.enterPage(ConfirmationPage.java:229)
> at
> org.eclipse.oomph.setup.ui.wizards.SetupWizard.pageChanged(SetupWizard.java:404)
> at org.eclipse.jface.wizard.WizardDialog$9.run(WizardDialog.java:1505)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
> at
> org.eclipse.jface.wizard.WizardDialog.firePageChanged(WizardDialog.java:1502)
> at org.eclipse.jface.wizard.WizardDialog.update(WizardDialog.java:1308)
> at
> org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1234)
> at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1208)
> at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1197)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1194)
> at
> org.eclipse.oomph.setup.ui.wizards.SetupWizardPage.advanceToNextPage(SetupWizardPage.java:153)
> at
> org.eclipse.oomph.setup.ui.wizards.VariablePage$5.run(VariablePage.java:556)
> at org.eclipse.oomph.ui.UIUtil$5.run(UIUtil.java:539)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3794)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3433)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
> at org.eclipse.jface.window.Window.open(Window.java:803)
> at
> org.eclipse.oomph.setup.ui.wizards.SetupWizard.openDialog(SetupWizard.java:487)
> at
> org.eclipse.oomph.setup.ui.wizards.SetupWizard$Updater.openDialog(SetupWizard.java:1239)
> at
> org.eclipse.oomph.setup.presentation.handlers.PerformHandler.run(PerformHandler.java:45)
> at
> org.eclipse.oomph.setup.presentation.handlers.AbstractDropdownItemHandler.execute(AbstractDropdownItemHandler.java:50)
> at
> org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
> at
> org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
> at
> org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
> at org.eclipse.core.commands.Command.executeWithChecks(Command.java:493)
> at
> org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:799)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:675)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:659)
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:592)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1327)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
> Caused by: org.eclipse.jgit.errors.RepositoryNotFoundException:
> repository not found: /home/bettini/tmp/git
> at
> org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:581)
> at org.eclipse.jgit.api.Git.open(Git.java:116)
> at org.eclipse.jgit.api.Git.open(Git.java:99)
> at
> org.eclipse.oomph.setup.git.impl.GitCloneTaskImpl.isNeeded(GitCloneTaskImpl.java:619)
> ... 73 more
>
>
> -
Use older git commit in pkgbuild
Hello,
I am trying to build wine version 1.18 and I am using the pkgbuild from the aur wine-git https://aur.archlinux.org/packages/wine-git/.
I am running x86_64. Where/How do I have to modify the pkgbuild file to checkout the correct branch?
I am very new to the whole pkgbuilding and I would be very grateful if someone could hold my hand.
Here is the pkgbuild:
(I want to use the commit e8cfb0e5b049e68da9df34ec4e6c6a329de0c1f8)
# Maintainer: sxe <[email protected]>
# Based on the wine package in the community repository
pkgname=wine-git
_gitname="wine"
pkgver=1.7.11.r206.g82b3813
pkgrel=1
pkgdesc="A compatibility layer for running Windows programs. Latest GIT version."
url="http://www.winehq.com"
arch=('i686' 'x86_64')
license='LGPL'
install='wine-git.install'
source=('wine-git::git://source.winehq.org/git/wine.git'
'30-win32-aliases.conf')
md5sums=('SKIP'
'1ff4e467f59409272088d92173a0f801')
_depends=(
fontconfig lib32-fontconfig
libxcursor lib32-libxcursor
libxrandr lib32-libxrandr
libxdamage lib32-libxdamage
libxi lib32-libxi
gettext lib32-gettext
freetype2 lib32-freetype2
glu lib32-glu
libsm lib32-libsm
gcc-libs lib32-gcc-libs
desktop-file-utils
makedepends=(autoconf ncurses bison perl fontforge flex prelink
'gcc>=4.5.0-2' 'gcc-multilib>=4.5.0-2'
giflib lib32-giflib
libpng lib32-libpng
gnutls lib32-gnutls
libxinerama lib32-libxinerama
libxcomposite lib32-libxcomposite
libxmu lib32-libxmu
libxxf86vm lib32-libxxf86vm
libxml2 lib32-libxml2
libldap lib32-libldap
lcms lib32-lcms
mpg123 lib32-mpg123
openal lib32-openal
v4l-utils lib32-v4l-utils
alsa-lib lib32-alsa-lib
libxcomposite lib32-libxcomposite
mesa lib32-mesa
samba
git
optdepends=(
giflib lib32-giflib
libpng lib32-libpng
libldap lib32-libldap
gnutls lib32-gnutls
lcms lib32-lcms
libxml2 lib32-libxml2
mpg123 lib32-mpg123
openal lib32-openal
v4l-utils lib32-v4l-utils
libpulse lib32-libpulse
alsa-plugins lib32-alsa-plugins
alsa-lib lib32-alsa-lib
libjpeg-turbo lib32-libjpeg-turbo
libxcomposite lib32-libxcomposite
libxinerama lib32-libxinerama
ncurses lib32-ncurses
libcl lib32-libcl
cups
samba dosbox
# Check if libowfat is installed.
# It has to be removed because WINE cannot be build if installed.
# Thanks to haagch
if [ -f /usr/lib/libowfat.a ]; then
msg2 "Error: libowfat.a detected. Please remove the libowfat package. WINE cannot be build if installed."
exit 0;
fi
if [[ $CARCH == i686 ]]; then
# Strip lib32 etc. on i686
_depends=(${_depends[@]/*32-*/})
makedepends=(${makedepends[@]/*32-*/} ${_depends[@]})
makedepends=(${makedepends[@]/*-multilib*/})
optdepends=(${optdepends[@]/*32-*/})
conflicts=('wine')
else
makedepends=(${makedepends[@]} ${_depends[@]})
provides=('bin32-wine' 'wine-wow64' 'wine' )
conflicts=('bin32-wine' 'wine-wow64' 'wine')
replaces=('bin32-wine')
fi
pkgver() {
#date +%Y%m%d
cd "$srcdir/$pkgname"
git describe --always --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g;s/^wine.//'
build() {
cd "$srcdir"
# ncurses fix
sed -i 's|libncurses|libncursesw|g' "$srcdir/$pkgname/configure"
sed -i 's|lncurses|lncursesw|g' "$srcdir/$pkgname/configure"
# Get rid of old build dirs
rm -rf $pkgname-{32,64}-build
mkdir $pkgname-32-build
# These additional CPPFLAGS solve FS#27662 and FS#34195
export CPPFLAGS="${CPPFLAGS/-D_FORTIFY_SOURCE=2/} -D_FORTIFY_SOURCE=0"
if [[ $CARCH == x86_64 ]]; then
msg2 "Building Wine-64..."
mkdir $pkgname-64-build
cd "$srcdir/$pkgname-64-build"
../$pkgname/configure \
--prefix=/usr \
--libdir=/usr/lib \
--with-x \
--without-gstreamer \
--enable-win64
# Gstreamer was disabled for FS#33655
make
_wine32opts=(
--libdir=/usr/lib32
--with-wine64="$srcdir/$pkgname-64-build"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
fi
msg2 "Building Wine-32..."
cd "$srcdir/$pkgname-32-build"
../$pkgname/configure \
--prefix=/usr \
--with-x \
--without-gstreamer \
"${_wine32opts[@]}"
# These additional flags solve FS#23277
make CFLAGS+="-mstackrealign -mincoming-stack-boundary=2" CXXFLAGS+="-mstackrealign -mincoming-stack-boundary=2"
package() {
depends=(${_depends[@]})
msg2 "Packaging Wine-32..."
cd "$srcdir/$pkgname-32-build"
if [[ $CARCH == i686 ]]; then
make prefix="$pkgdir/usr" install
else
make prefix="$pkgdir/usr" \
libdir="$pkgdir/usr/lib32" \
dlldir="$pkgdir/usr/lib32/wine" install
msg2 "Packaging Wine-64..."
cd "$srcdir/$pkgname-64-build"
make prefix="$pkgdir/usr" \
libdir="$pkgdir/usr/lib" \
dlldir="$pkgdir/usr/lib/wine" install
fi
# Font aliasing settings for Win32 applications
install -d "$pkgdir"/etc/fonts/conf.{avail,d}
install -m644 "$srcdir/30-win32-aliases.conf" "$pkgdir/etc/fonts/conf.avail"
ln -s ../conf.avail/30-win32-aliases.conf "$pkgdir/etc/fonts/conf.d/30-win32-aliases.conf"
Thank you very much!This wiki page explains that you should put #fragment at the end of source, and to consult man PKGBUILD for more on fragments. That's left to you.
Last edited by Neven (2014-08-19 19:33:33) -
ACI to read/write a single BRANCH ...
Hello gurus !
My situation is a tree like this:
o=entry
+ou=one
+ou=two
+ou=three
+ou=four
I would like to create a user able to modify/read/etc.etc. ONLY ou=four contents...
I've placed a uid=fouradmin, ou=four,o=entry and I've created an ACI to let it do everything under ou=four.
Now, if I create a new ACI in ou=four to EXCLUDE access to ANYONE, this ACI became the stronger and I'm not able to do nothing with uid=fouradmin......
How can I bypass this situation and allow ONLY to uid=fouradmin complete access to ou=four and subsequential ?
Thanks,
silvio
I forgot to say that o=entry ( and subsequentials ) has the standard read only accett to all users...
Thanks,
silvio
Message was edited by:
infocamereAccess is denied unless there is an ACI that specifically grant access...
You should consider not using the DENY acis at all.
If what you want is that only fouradmin to have access to ou=four, do it so:
- Aci in ou=four grants all rights to fouradmin.
- Aci in o=entry (top) should use (target != "*ou=four,o=entry) grant access to anyone.
Ludovic. -
[SOLVED] sbcl-git PKGBUILD
I'm trying to write a sbcl-git PKGBUILD so people can circumvent some sbcl bugs and install stumpwm-git, here's my attempt thus far which fails miserably.
Edit: solved, big thanks to acieroid who provided the pkgbuild:
http://aur.archlinux.org/packages.php?ID=45922
Last edited by drot (2011-01-30 20:39:05)It currently looks like this:
# Maintainer: Gerardo Marset <[email protected]>
pkgname=lci-git
pkgver=20110413
pkgrel=1
pkgdesc="A simple and fast 1.2 lolcode interpreter written in C."
arch=('i686' 'x86_64')
url="http://icanhaslolcode.org/"
license=('GPL3')
makedepends=('git')
provides=('lci')
conflicts=('lci')
_gitroot="https://github.com/justinmeza/lci.git"
_gitname="lci"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [ -d $_gitname ] ; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
git clone $_gitroot $_gitname
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
make
make check
install -Dm755 lci ${pkgdir}/usr/bin/lci -
[SOLVED] AUR blackbox-git: cannot clone git repo
Hi
I'm trying to install blackbox-git package from aur.
When I do "makepkg -s" inside unpacked blackbox-git repository I receive the following error message:
==> Making package: blackbox-git 0.70.2-1 (Tue Feb 4 18:19:42 CET 2014)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Cloning blackboxwm git repo...
Cloning into bare repository '/home/jaro/blackbox-git/blackboxwm'...
fatal: unable to connect to github.com:
github.com[0: 192.30.252.129]: errno=Connection timed out
In PKGBUILD (https://aur.archlinux.org/packages/bl/b … t/PKGBUILD) I can see
see that it clones a package from:
http://github.com/bbidulock/blackboxwm
When I do the following manually the repo gets cloned perfectly:
git clone http://github.com/bbidulock/blackboxwm
I cannot just install blackbox from community repo since it does not contain "bt" library required by bbkeys.
Please help me
Last edited by jaro (2014-02-05 16:52:12)jaro wrote:Works great. Thanks
[SOLVED]
Please remember to actually add [Solved] to the beginning of your thread title.
All the best,
-HG -
PKGBUILD for transmission-remote-gtk new since move to git - help?
Transmission-remote-gtk just moved to git from svn and I made a new PKGBUILD for it;
# Maintainer: Aleksey Frolov <[email protected]> [ru]
# Contributor: PitBall
_pname=transmission-remote-gtk
pkgname=${_pname}-git
pkgver=20120203
pkgrel=1
pkgdesc="GTK client for remote management of the Transmission BitTorrent client, using its HTTP RPC protocol"
arch=(i686 x86_64)
license=('GPL2')
depends=('git' 'hicolor-icon-theme' 'geoip' 'libproxy' 'libunique' 'json-glib' 'libnotify' 'gconf' 'desktop-file-utils' 'curl')
makedepends=('intltool')
conflicts=('transmission-remote-gtk')
install=${pkgname}.install
options=('!libtool')
url="http://code.google.com/p/transmission-remote-gtk"
_gittrunk="https://code.google.com/p/transmission-remote-gtk/"
_gitmod=${pkgname}
build() {
cd ${srcdir}
# GIT checkout
if [[ -d ${_gitmod} ]]; then
(cd ${_gitmod} && git pull )
else
git clone ${_gittrunk} ${_gitmod}
fi
rm -rf ${srcdir}/${_gitmod}-build
cp -r ${srcdir}/${_gitmod} ${srcdir}/${_gitmod}-build
cd ${srcdir}/${_gitmod}-build
# Configure
./autogen.sh
./configure \
--prefix=/usr
# --prefix=/usr \
# --disable-schemas-install \
# --with-gconf-schema-file-dir=/usr/share/gconf/schemas
# Compile
make
# Install
make DESTDIR=${pkgdir} install
# License & Authors
install -dm755 ${pkgdir}/usr/share/licenses/${_pname}
ln -sf /usr/share/licenses/common/GPL2/license.txt ${pkgdir}/usr/share/licenses/${_pname}/LICENSE
install -Dm644 AUTHORS ${pkgdir}/usr/share/doc/${_pname}/AUTHORS
When doing a pacman -U 'pkgname' I get about 20 file "exists in filesystem". With my limited knolwedge I don't know how to fix this. pacman -Uf does it but is an ugly solution. What can I do with the PKGBUILD or maybe recommend users to uninstall the svn version first?
Furthermore; there was a bit of code looking for the .svn directory
# SVN checkout
if [[ -d ${_svnmod}/.svn ]]; then
(cd ${_svnmod} && svn up -r $pkgver)
else
svn co ${_svntrunk} --config-dir ./ -r ${pkgver} ${_svnmod}
fi
which I changed to this;
# GIT checkout
if [[ -d ${_gitmod} ]]; then
(cd ${_gitmod} && git pull )
else
git clone ${_gittrunk} ${_gitmod}
fi
The prupose is to look for previous source and not download it all again, just get the changes. svn up -r is quite straight forward but git pull, I find is not. I'd really appreciate some pointers on this.
By the way, it compiles just fine and with pacman -Uf it works, I'd just like to make a proper PKGBUILD.
Last edited by swanson (2012-02-03 22:35:17)Yes, that's the seems to be the easiest and cleanest way to go. Here's the new transmission-remote-gtk git version in AUR;
https://aur.archlinux.org/packages.php?ID=56377 -
[SOLVED] How to replace the source in a pkgbuild with a git repo?
I am trying to build csound (present in AUR: https://aur.archlinux.org/packages.php?ID=779), but compilation fails, as noted in the comments. One of the commenters says that he has successfully built the package by pulling the sources from the git repo.
How can I do that? I know how to use git. What I don't know is
(1) how to use git from within a PKGBUILD file,
or
(2) how to instruct the PKGBUILD file to use the locally pulled git repo
Cheers,
Stefano
Last edited by stefano (2012-10-06 15:11:14)Try csound-git https://aur.archlinux.org/packages.php?ID=48830 but see the comments - problems again.
You can see how to deal with git in the PKGBUILD.
Another way is to instal binary package from an unofficial user repository. archaudio-preview has csound 5.14.2-1.
https://wiki.archlinux.org/index.php/Un … positories
[archaudio-preview]
# unverified PKGBUILDs AND/OR untested packages
Server = http://repos.archaudio.org/$repo/$arch
Last edited by karol (2012-10-06 14:48:29) -
Rapid clone 11.5.10 from single node to Veritas cluster environment
Is anybody there who had done the same and working? Please shed some light.
version 11.5.10
Source
DB tier : DB, CM and Admin ( OS : Solaris 10 ), single node
App tier : FrmSrv, iAS ( OS : Solaris 10), single node
Target
DB tier : DB, CM, and Admin ( OS : Solaris 10), 2-nodes Veritas Cluster
(active/passive)
App tier : FrmSrv, iAS (OS : Solaris 10), 2-nodes load balancer
I've many time single node to single node rapid clone , no problem.
But with this single node to multi-nodes, no luck.
your input is much appreciatedHi
You can use the Advanced cloning (section 4) of the cloining document# 230672.1
to clone signle node to multi node systems.
for webserver load balancing follow the metalink note#:217368.1
Regards
Srinath -
Unable to clone git repository in Visual Studio Monaco
I am unable to clone from VSO Online repository. The following error is returned upon clicking the "Clone" button:
git clone "https://{name}.visualstudio.com/DefaultCollection/_git/{project}" .
Cloning into '.'...
fatal: https://{name}.visualstudio.com/DefaultCollection/_git/{project}/info/refs not valid: is this a git repository?
Any thoughts appreciated!Hi idodev,
Since this thread is more related to Visual Studio Online, I will move it to the right forum for a better response. Thanks for your understanding.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
WebIDE: Clone GIT repository issue
Hello Colleagues!
When I try to clone a GIT repository in the Web IDE, I am receiving the following error message:
4:34:48 PM (git) Clone request sent
4:38:01 PM (git) Clone request failed https://[email protected]/z_i840577_fiori: cannot open git-upload-pack
The GIT repository was created via Project Portal.
Does anyone know how to solve this issue?
Thanks and Regards,
Borin, LucasHello Firas!
This issue also happens when I clone a repository from the GitHub to WebIDE.
I added you to my project as a Project Team/Committers, so now you can clone the GIT repository. Please, try to clone it to your WebIDE and check if the same issue happens for you.
What kind of details do you want?
Thanks,
Borin, Lucas
Maybe you are looking for
-
My iPod doesn't turn on anymore. Even when I plug it into the computer or a charger, nothing happens. What's wrong with my iPod?
-
App error 552 PLEASE HELP ME!!!
Hi for days now i have had a white screen and small writing on saying app error 552. The phone will not come on at all, just resets to the same screen so I cant do anything via the phone. I asked on my facebook and was giving a link to try for some
-
Information Broadcasting - Event data changes
Hi Gurus, I am trying to trigger a broadcast settings, What i am trying to acheive is as soon as any data changes in data target, trigger a report to portal folder. Report is published to portal only when there is no data in data target, i.e. content
-
Problem - Playing media stops when CPU reaches 100%
Hi, I have a big problem, I use JMF for playing my videos and music for my video game. But if the CPU reaches 100 % the playing media stops and if the Processor is in the state less as 100% it continues playing. But windows media player continues pla
-
933 QS shuts down unexpectedly
I can be in the middle of a task and click, it's all gone. Recently, I have noticed that I would go away and leave the comp on sleep. On my return it would be shutdown. Now it's worse, it happens mid tune! During one one of its "difficult periods", i