Talk:OpenRC

From ArchWiki
Revision as of 13:20, 8 April 2015 by Fengchao (talk | contribs) (Remove closed discussion.)
Jump to navigation Jump to search

Alternative way to install OpenRC and eudev (artoo's way)

Instead of the AUR, one can simply build from artoo's git repo, add all the packages to a local repo, and install from that.

Steps include:

# One time
mkdir -p ~/builds && cd ~/builds
git clone https://github.com/udeved/pkgbuilds openrc-eudev
# To keep up to date
cd ~/builds/openrc-eudev
git pull
cd sysvinit && makepkg -s
cd ..
cd openrc-core && makepkg -d # to ignore sysvinit dependency
cd ..
cd openrc-base && makepkg -s
cd ..
cd openrc-desktop && makepkg -s
cd ..
cd polkit-consolekit && makepkg -s
cd ..
cd consolekit && makepkg -s
cd ..
cd eudev && makepkg -s
cd ..
cd eudev-systemdcompat && makepkg -d # to ignore eudev dependency
cd ..
cd upower-pm-utils && makepkg -d
cd ..
# Copying built packages in one place
mkdir -p ~/builds/openrc-eudev/packages
cp ~/builds/openrc-eudev/*/*.pkg.tar.xz ~/builds/openrc-eudev/packages

This probably takes care of the base. The built packages could be added to a pacman local repo.

After that the built packages could be installed as:

sudo pacman -S openrc-base
sudo pacman -S openrc-desktop
sudo pacman -S eudev-base

Aaditya (talk) 17:05, 28 January 2015 (UTC)

Here's a "slightly" more complex script to automate this:
#/usr/bin/env bash

[[ -d openrc-eudev ]] || git clone https://github.com/udeved/pkgbuilds openrc-eudev
cd openrc-eudev       || exit 1

_nodep=(openrc-core eudev-systemdcompat upower-pm-utils)
_dep=(sysvinit openrc-base openrc-desktop polkit-consolekit consolekit eudev)
_fail() { echo "$i failed to build." > ../fail.log; }

for i in "${_dep[@]}"; do
    (cd "$i" && { makepkg -sr || _fail; })
done

for i in "${_nodep[@]}"; do
    (cd "$i" && { makepkg -d  || _fail; })
done

mkdir -p packages && cp */*.pkg.tar.xz packages/
-- Alad (talk) 13:30, 28 January 2015 (UTC)
Interesting script, I did not know about pushd and popd, thx. Aaditya (talk) 17:05, 28 January 2015 (UTC)
Yep, and edited to remove it. :P -- Alad (talk) 20:52, 23 February 2015 (UTC)