Merge remote-tracking branch 'x/master'

* x/master: (26 commits)
  xbps-src: added -V flag to print code version, add new obj into pkg metadata for that.
  xbps-src: only add files and links into the resulting binpkg.
  xbps-casper: fix perms on polkit dirs, renamed polkit script.
  dcron: added missing owned dirs, bumprev.
  ConsoleKit: use make_dirs for logdir, bumprev.
  cronie: own required runtime dirs.
  wicd: does not need keep_empty_dirs, bumprev.
  lvm2: own required runtime dirs.
  gdm: use make_dirs.
  os-prober: own required runtime dirs.
  accountsservice: own required runtime dirs.
  hicolor-icon-theme: own required runtime dirs.
  lightdm: use make_dirs, bumprev.
  xbps-casper: does not use keep_empty_dirs.
  ConsoleKit: use simple .owned files for required runtime dirs, bumprev.
  NetworkManager: use make_dirs, bumprev.
  systemd: use simple .owned files rather than make_dirs, bumprev.
  systemd: use make_dirs, bumprev.
  xbps-src: deprecate keep_empty_dirs, warn when an empty dir is removed.
  util-linux: use make_dirs, bumprev.
  ...
This commit is contained in:
davehome 2011-11-09 19:27:51 -07:00
commit 3a1605f083
28 changed files with 245 additions and 148 deletions

View File

@ -0,0 +1,8 @@
#
# This script removes leftovers dirs at purge time.
#
case "${ACTION}" in
purge)
[ -d var/log/ConsoleKit ] && rm -rf var/log/ConsoleKit
;;
esac

View File

@ -1,7 +1,7 @@
# Template file for 'ConsoleKit'
pkgname=ConsoleKit
version=0.4.5
revision=2
revision=4
distfiles="http://www.freedesktop.org/software/$pkgname/dist/$pkgname-$version.tar.bz2"
build_style=gnu-configure
configure_args="--enable-docbook-docs --enable-pam-module
@ -19,8 +19,8 @@ long_desc="
systemd_services="console-kit-daemon.service"
conf_files="/etc/logrotate.d/ConsoleKit"
keep_empty_dirs=yes
subpackages="$pkgname-devel $pkgname-x11"
make_dirs="/var/log/${pkgname} 0755 root root"
Add_dependency run glibc
Add_dependency run dbus-libs
@ -42,13 +42,13 @@ Add_dependency build zlib-devel
post_install()
{
install -d ${DESTDIR}/usr/lib/ConsoleKit/run-session.d
install -m755 ${FILESDIR}/pam-foreground-compat.ck \
${DESTDIR}/usr/lib/ConsoleKit/run-session.d
install -d ${DESTDIR}/etc/ConsoleKit/run-seat.d
install -d ${DESTDIR}/etc/ConsoleKit/run-session.d
install -D -m644 ${FILESDIR}/ck.logrotate \
${DESTDIR}/etc/logrotate.d/ConsoleKit
rm -rf ${DESTDIR}/var/run
vinstall ${FILESDIR}/pam-foreground-compat.ck 755 \
usr/lib/${pkgname}/run-session.d
for f in seat session; do
vmkdir etc/${pkgname}/run-${f}.d
touch ${DESTDIR}/etc/${pkgname}/run-${f}.d/.owned
done
vmkdir usr/lib/${pkgname}/run-seat.d
touch ${DESTDIR}/usr/lib/${pkgname}/run-seat.d/.owned
vinstall ${FILESDIR}/ck.logrotate 644 etc/logrotate.d ConsoleKit
}

View File

@ -1,7 +1,7 @@
# Template file for 'NetworkManager'
pkgname=NetworkManager
version=0.9.1.95
revision=1
revision=2
distfiles="${GNOME_SITE}/$pkgname/0.9/$pkgname-$version.tar.xz"
build_style=gnu-configure
configure_args="--with-distro=gentoo
@ -22,11 +22,16 @@ long_desc="
NetworkManager is _intended_ to replace default routes, obtain IP addresses
from a DHCP server, and change nameservers whenever it sees fit."
keep_empty_dirs=yes
systemd_services="${pkgname}.service"
conf_files="/etc/${pkgname}/${pkgname}.conf"
subpackages="$pkgname-devel libnm"
# Required dirs at run time.
make_dirs="
/etc/${pkgname}/dispatcher.d 0755 0 0
/etc/${pkgname}/system-connections 0755 0 0
/var/lib/${pkgname} 0700 0 0"
Add_dependency run glibc
Add_dependency run libnm
Add_dependency run libuuid
@ -60,7 +65,6 @@ Add_dependency full wpa_supplicant
post_install()
{
# Install config file.
install -d ${DESTDIR}/etc/NetworkManager/dispatcher.d
install -m644 ${FILESDIR}/*.conf ${DESTDIR}/etc/NetworkManager
rm -rf ${DESTDIR}/var/run
rm -rf ${DESTDIR}/etc/init.d

View File

@ -1,6 +1,7 @@
# Template file for 'accountsservice'
pkgname=accountsservice
version=0.6.15
revision=1
distfiles="http://www.freedesktop.org/software/$pkgname/$pkgname-$version.tar.xz"
build_style=gnu-configure
configure_args="--with-systemdsystemunitdir=/lib/systemd/system"
@ -14,7 +15,6 @@ long_desc="
querying and manipulating user account information and an implementation
of these interfaces, based on the useradd, usermod and userdel commands."
keep_empty_dirs=yes
systemd_services="accounts-daemon.service"
subpackages="$pkgname-devel"
@ -29,3 +29,10 @@ Add_dependency build intltool
Add_dependency build gobject-introspection
Add_dependency build dbus-glib-devel
Add_dependency build polkit-devel
post_install() {
for d in users icons; do
vmkdir var/lib/AccountsService/${d}
touch ${DESTDIR}/var/lib/AccountsService/${d}/.owned
done
}

View File

@ -1,7 +1,7 @@
# Template file for 'cronie'
pkgname=cronie
version=1.4.8
revision=7
revision=8
distfiles="https://fedorahosted.org/releases/c/r/cronie/cronie-$version.tar.gz"
build_style=gnu-configure
configure_args="--with-inotify --without-selinux --with-pam --disable-anacron
@ -17,7 +17,6 @@ long_desc="
has security and configuration enhancements like the ability to use PAM and
SELinux."
keep_empty_dirs=yes
conf_files="/etc/crontab /etc/pam.d/crond /etc/cron.deny"
systemd_services="cronie.service"
provides="cron-daemon-0"
@ -32,8 +31,8 @@ post_install()
{
install -d ${DESTDIR}/etc/cron.{d,hourly,daily,weekly,monthly}
touch ${DESTDIR}/etc/cron.{d,hourly,daily,weekly,monthly}/.owned
vmkdir etc/logrotate.d
vmkdir var/spool/cron
touch ${DESTDIR}/var/spool/cron/.owned
vinstall ${FILESDIR}/cronie.service 644 lib/systemd/system
vinstall ${FILESDIR}/crontab 644 etc

View File

@ -1,7 +1,7 @@
# Template file for 'dcron'
pkgname=dcron
version=4.5
revision=9
revision=11
distfiles="http://www.jimpryor.net/linux/releases/dcron-${version}.tar.gz"
short_desc="Dillon's lightweight cron daemon"
maintainer="Juan RP <xtraeme@gmail.com>"
@ -15,7 +15,6 @@ long_desc="
like anacron makes for too much complexity. So the goal is a simple cron daemon
that can also take over the central functions of anacron."
keep_empty_dirs=yes
replaces="cronie>=0"
systemd_services="dcron.service"
conf_files="/var/spool/cron/root"
@ -34,8 +33,11 @@ do_install()
{
make DESTDIR=${DESTDIR} install
install -d ${DESTDIR}/etc/cron.{hour,week,month}ly
touch ${DESTDIR}/etc/cron.{hour,week,month}ly/.owned
for f in etc/cron.d etc/cron.hourly etc/cron.weekly etc/cron.monthly \
var/spool/cronstamps; do
vmkdir ${f}
touch ${DESTDIR}/${f}/.owned
done
install -Dm755 extra/run-cron ${DESTDIR}/usr/sbin/run-cron
install -Dm600 extra/root.crontab ${DESTDIR}/var/spool/cron/root

View File

@ -3,11 +3,6 @@
#
case "${ACTION}" in
post)
if [ ! -d var/log/gdm ]; then
mkdir -p var/log/gdm
chown root:gdm var/log/gdm
fi
[ ! -d var/cache/gdm ] && mkdir -p var/cache/gdm
chown gdm:gdm var/lib/gdm > /dev/null
chown -R gdm:gdm var/lib/gdm/.gconf.mandatory
dconf update

View File

@ -1,7 +1,7 @@
# Template file for 'gdm'
pkgname=gdm
version=3.2.1.1
revision=1
revision=2
distfiles="${GNOME_SITE}/$pkgname/3.2/$pkgname-$version.tar.xz"
build_style=gnu-configure
configure_args="--disable-schemas-install --disable-scrollkeeper
@ -36,7 +36,14 @@ conf_files="
/etc/pam.d/gdm-smartcard
/etc/pam.d/gdm-welcome"
keep_empty_dirs=yes
# Required runtime directories.
make_dirs="
/var/cache/gdm 1755 root gdm
/var/log/gdm 1755 root gdm
/var/lib/gdm/.config/dconf 0755 gdm gdm
/var/lib/gdm/.local/share/applications 0755 gdm gdm
"
subpackages="gdm-devel"
gconf_schemas="gdm.schemas"
gtk_iconcache_dirs="/usr/share/icons/hicolor"
@ -108,7 +115,6 @@ post_install()
gconf-merge-schema ${DESTDIR}/usr/share/gconf/schemas/${gconf_schemas} \
--domain ${pkgname} ${wrksrc}/*.schemas
rm -rf ${DESTDIR}/var/run ${DESTDIR}/var/gdm
chmod 1770 ${DESTDIR}/var/log/gdm
chmod 700 ${DESTDIR}/var/lib/gdm/.config/dconf
}

View File

@ -1,7 +1,7 @@
# Template build file for 'hicolor-icon-theme'.
pkgname=hicolor-icon-theme
version=0.12
revision=1
revision=2
distfiles="http://icon-theme.freedesktop.org/releases/$pkgname-$version.tar.gz"
build_style=gnu-configure
short_desc="Standard icon theme called hicolor"
@ -10,5 +10,22 @@ checksum=9edca690617eaa19054951ca53501c802180262be8880ed84754ac46c93bec73
long_desc="
Default icon theme called hicolor, from freedesktop.org."
keep_empty_dirs=yes
noarch=yes
post_install() {
dest=usr/share/icons/hicolor
# Own all required run time directories.
for size in 16 22 24 32 36 48 64 72 96 128 192 256 scalable; do
for dir in actions animations apps categories devices \
emblems emotes filesystems intl mimetypes places \
status stock/chart stock/code stock/data stock/form \
stock/image stock/io stock/media stock/navigation \
stock/net stock/object stock/table stock/text; do
if [ "$size" = "scalable" ]; then
touch ${DESTDIR}/${dest}/${size}/${dir}/.owned
continue
fi
touch ${DESTDIR}/${dest}/${size}x${size}/${dir}/.owned
done
done
}

View File

@ -1,6 +1,6 @@
# Template file for 'initramfs-tools'
pkgname=initramfs-tools
_localver=107 # This is the XBPS version
_localver=108 # This is the XBPS version
_distver=0.99 # This should match debian version
version=${_distver}.${_localver}
short_desc="Tools for generating an initramfs"
@ -17,13 +17,28 @@ long_desc="
noextract=yes
noarch=yes
keep_empty_dirs=yes
triggers="initramfs-tools"
conf_files="
/etc/$pkgname/initramfs.conf
/etc/$pkgname/update-initramfs.conf
/etc/$pkgname/modules"
make_dirs="
/etc/$pkgname/hooks 0755 0 0
/etc/$pkgname/conf.d 0755 0 0
/etc/$pkgname/scripts/init-bottom 0755 0 0
/etc/$pkgname/scripts/init-premount 0755 0 0
/etc/$pkgname/scripts/init-top 0755 0 0
/etc/$pkgname/scripts/local-bottom 0755 0 0
/etc/$pkgname/scripts/local-top 0755 0 0
/usr/share/$pkgname/conf.d 0755 0 0
/usr/share/$pkgname/hooksconf.d 0755 0 0
/usr/share/$pkgname/modules.d 0755 0 0
/usr/share/$pkgname/scripts/init-premount 0755 0 0
/usr/share/$pkgname/scripts/local-top 0755 0 0
/var/lib/$pkgname 0755 0 0
"
Add_dependency full cpio
Add_dependency full util-linux
Add_dependency full gawk
@ -40,66 +55,44 @@ Add_dependency full klibc-resume
do_install()
{
local etcdir=$DESTDIR/etc/$pkgname
# Required dirs
install -d $etcdir/hooks
install -d $etcdir/conf.d
install -d $etcdir/scripts/init-bottom
install -d $etcdir/scripts/init-premount
install -d $etcdir/scripts/init-top
install -d $etcdir/scripts/local-bottom
install -d $etcdir/scripts/local-premount
install -d $etcdir/scripts/local-top
install -d $DESTDIR/usr/share/$pkgname
install -d $DESTDIR/usr/share/$pkgname/conf.d
install -d $DESTDIR/usr/share/$pkgname/hooks
install -d $DESTDIR/usr/share/$pkgname/hooksconf.d
install -d $DESTDIR/usr/share/$pkgname/modules.d
install -d $DESTDIR/usr/share/$pkgname/scripts
install -d $DESTDIR/usr/share/$pkgname/scripts/init-premount
install -d $DESTDIR/usr/share/$pkgname/scripts/init-top
install -d $DESTDIR/usr/share/$pkgname/scripts/local-premount
install -d $DESTDIR/usr/share/$pkgname/scripts/local-top
install -d $DESTDIR/usr/share/doc/$pkgname
install -d $DESTDIR/usr/share/doc/$pkgname/examples
install -d $DESTDIR/usr/share/man/man5
install -d $DESTDIR/usr/share/man/man8
install -d $DESTDIR/usr/sbin
install -d $DESTDIR/var/lib/$pkgname
# /etc config files
install -m 644 $FILESDIR/conf/initramfs.conf $etcdir
install -m 644 $FILESDIR/conf/update-initramfs.conf $etcdir
vinstall $FILESDIR/conf/initramfs.conf 644 etc/$pkgname
vinstall $FILESDIR/conf/update-initramfs.conf 644 etc/$pkgname
# Data
install -m 755 $FILESDIR/init $DESTDIR/usr/share/$pkgname
vinstall $FILESDIR/init 744 usr/share/$pkgname
for f in functions local nfs; do
install -m 644 $FILESDIR/scripts/$f \
$DESTDIR/usr/share/$pkgname/scripts
vinstall $FILESDIR/scripts/$f 644 usr/share/$pkgname/scripts
done
install -m 755 $FILESDIR/scripts/init-top/* \
vmkdir usr/share/$pkgname/scripts/init-top
install -m755 $FILESDIR/scripts/init-top/* \
$DESTDIR/usr/share/$pkgname/scripts/init-top
install -m 755 $FILESDIR/scripts/local-premount/* \
vmkdir usr/share/$pkgname/scripts/local-premount
install -m755 $FILESDIR/scripts/local-premount/* \
$DESTDIR/usr/share/$pkgname/scripts/local-premount
install -m 755 $FILESDIR/hooks/* $DESTDIR/usr/share/$pkgname/hooks
install -m 644 $FILESDIR/hook-functions $DESTDIR/usr/share/$pkgname
install -m 644 $FILESDIR/conf/modules $etcdir
vmkdir usr/share/$pkgname/hooks
install -m755 $FILESDIR/hooks/* $DESTDIR/usr/share/$pkgname/hooks
install -m644 $FILESDIR/hook-functions $DESTDIR/usr/share/$pkgname
vinstall $FILESDIR/conf/modules 644 etc/$pkgname
# Examples
install -m 644 $FILESDIR/docs/* $DESTDIR/usr/share/doc/$pkgname/examples
vmkdir usr/share/doc/$pkgname/examples
install -m644 $FILESDIR/docs/* $DESTDIR/usr/share/doc/$pkgname/examples
# Manpages
vmkdir usr/share/man/man5
install -m 644 $FILESDIR/*.5 $DESTDIR/usr/share/man/man5
vmkdir usr/share/man/man8
install -m 644 $FILESDIR/*.8 $DESTDIR/usr/share/man/man8
# Scripts
vmkdir usr/sbin
install -m 755 $FILESDIR/mkinitramfs $DESTDIR/usr/sbin
install -m 755 $FILESDIR/update-initramfs $DESTDIR/usr/sbin
sed -i -e "s|@VERSION@|${version}|g" $DESTDIR/usr/sbin/update-initramfs
# bash_completion.d
install -D -m644 $FILESDIR/bash_completion.d/initramfs-tools \
install -Dm644 $FILESDIR/bash_completion.d/initramfs-tools \
${DESTDIR}/etc/bash_completion.d/initramfs-tools
# Kernel hooks

View File

@ -1,7 +1,5 @@
case ${ACTION} in
post)
[ ! -d var/cache/lightdm ] && mkdir -p var/cache/lightdm
chown lightdm:lightdm var/cache/lightdm
cat <<_EOF
==========================================================================
To make lightdm work, a greeter package must be installed:

View File

@ -1,6 +1,7 @@
# Template file for 'lightdm'
pkgname=lightdm
version=1.0.6
revision=1
homepage="https://launchpad.net/lightdm"
distfiles="http://launchpad.net/lightdm/trunk/$version/+download/lightdm-$version.tar.gz"
build_style=gnu-configure
@ -25,7 +26,7 @@ conf_files="
system_accounts="lightdm"
lightdm_homedir="/var/cache/lightdm"
systemd_services="lightdm.service"
keep_empty_dirs=yes
make_dirs="/var/cache/lightdm 0755 lightdm lightdm"
subpackages="liblightdm-gobject liblightdm-qt lightdm-qt-greeter"
subpackages="${subpackages} lightdm-gtk-greeter lightdm-devel"

View File

@ -1,7 +1,7 @@
# Template file for 'lvm2'
pkgname=lvm2
version=2.02.85
revision=1
revision=2
wrksrc=LVM2.${version}
distfiles="ftp://sources.redhat.com/pub/lvm2/LVM2.${version}.tgz"
build_style=gnu-configure
@ -23,7 +23,6 @@ long_desc="
or more physical volumes and creating one or more logical volumes
(kind of logical partitions) in volume groups."
keep_empty_dirs=yes
subpackages="liblvm2app liblvm2app-devel device-mapper device-mapper-devel"
conf_files="/etc/lvm/lvm.conf"
triggers="initramfs-tools"
@ -36,14 +35,17 @@ Add_dependency build readline-devel
post_install()
{
local initramfsdir=${DESTDIR}/usr/share/initramfs-tools
local initramfsdir=usr/share/initramfs-tools
install -d ${DESTDIR}/etc/lvm/archive ${DESTDIR}/etc/lvm/backup \
${DESTDIR}/etc/init.d ${initramfsdir}/scripts/local-top \
${initramfsdir}/hooks
install -m755 ${FILESDIR}/lvm2.initramfs-hook ${initramfsdir}/hooks/lvm2
install -m755 ${FILESDIR}/lvm2.initramfs-local-top \
${initramfsdir}/scripts/local-top/lvm2
vmkdir etc/lvm/archive
touch ${DESTDIR}/etc/lvm/archive/.owned
vmkdir etc/lvm/backup
touch ${DESTDIR}/etc/lvm/backup/.owned
vinstall ${FILESDIR}/lvm2.initramfs-hook 755 \
${initramfsdir}/hooks lvm2
vinstall ${FILESDIR}/lvm2.initramfs-local-top 755 \
${initramfsdir}/scripts/local-top lvm2
rm -f ${DESTDIR}/lib/*.so ${DESTDIR}/usr/lib/*.so
cd ${DESTDIR}/usr/lib && \
ln -sf $(echo ../../lib/libdevmapper.so.*) libdevmapper.so

View File

@ -1,6 +1,7 @@
# Template file for 'os-prober'
pkgname=os-prober
version=1.49
revision=1
wrksrc=${pkgname}
distfiles="${DEBIAN_SITE}/main/o/$pkgname/${pkgname}_$version.tar.gz"
short_desc="Utility to detect other OSes on a set of drives"
@ -12,17 +13,13 @@ long_desc="
This package detects other OSes available on a system and outputs the
results in a generic machine-readable format."
keep_empty_dirs=yes
Add_dependency run glibc
do_build()
{
do_build() {
make ${makejobs}
}
do_install()
{
do_install() {
local ARCH
case "${XBPS_MACHINE}" in
@ -34,6 +31,8 @@ do_install()
vmkdir usr/share/os-prober
vmkdir var/lib/os-prober
vmkdir usr/lib/linux-boot-probes/mounted
vmkdir var/lib/os-prober
touch ${DESTDIR}/var/lib/os-prober/.owned
vinstall os-prober 755 usr/bin
vinstall linux-boot-prober 755 usr/bin

View File

@ -1,7 +1,7 @@
# Template file for 'systemd'
pkgname=systemd
version=37
revision=4
revision=6
distfiles="http://www.freedesktop.org/software/$pkgname/$pkgname-$version.tar.bz2"
build_style=gnu-configure
configure_args="--with-distro=other --with-rootdir=
@ -22,9 +22,8 @@ long_desc="
It can work as a drop-in replacement for sysvinit."
subpackages="systemd-admin systemd-analyze systemd-gnome-passwd-agent systemd-devel"
keep_empty_dirs=yes
system_groups="lock"
conf_files="
/etc/hostname
/etc/vconsole.conf
@ -62,6 +61,17 @@ pre_configure()
post_install()
{
for f in etc/binfmt.d etc/sysctl.d etc/modules-load.d etc/tmpfiles.d \
etc/systemd/user etc/systemd/system/local-fs.target.wants \
etc/systemd/system/sysinit.target.wants \
lib/systemd/system-shutdown \
lib/systemd/system/graphical.target.wants \
usr/libexec/systemd/user-generators \
usr/lib/binfmt.d usr/lib/sysctl.d usr/lib/modules-load.d; do
vmkdir ${f}
touch ${DESTDIR}/${f}/.owned
done
vinstall ${FILESDIR}/hostname 644 etc
vinstall ${FILESDIR}/vconsole.conf 644 etc
vinstall ${FILESDIR}/os-release 644 etc

View File

@ -3,6 +3,7 @@ pkgname=util-linux
_distver=2.20
_patchver=".1"
version=${_distver}${_patchver}
revision=1
wrksrc=${pkgname}-${version}
#distfiles="${KERNEL_SITE}/utils/${pkgname}/v${_distver}/${pkgname}-${version}.tar.bz2"
distfiles="ftp://ftp.infradead.org/pub/${pkgname}/v2.20/${pkgname}-${version}.tar.bz2"
@ -18,8 +19,7 @@ long_desc="
replaces="util-linux-ng>=0 e2fsprogs<=1.41.14_1"
subpackages="libmount libmount-devel libblkid libblkid-devel libuuid libuuid-devel"
# Required by /var/lib/hwclock
keep_empty_dirs=yes
make_dirs="/var/lib/hwclock 0755 0 0"
Add_dependency run glibc
Add_dependency run zlib

View File

@ -1,7 +1,7 @@
# Template file for 'wicd'
pkgname=wicd
version=1.7.0
revision=4
revision=5
patch_args="-Np1"
distfiles="${SOURCEFORGE_SITE}/$pkgname/$pkgname-$version.tar.bz2"
short_desc="Open source wired and wireless network manager"
@ -26,7 +26,6 @@ long_desc="
* Tray icon showing network activity and signal strength
* A full-featured console interface"
keep_empty_dirs=yes
noarch=yes
conf_files="
/etc/dbus-1/system.d/wicd.conf

View File

@ -25,8 +25,8 @@ fi
log_begin_msg "$DESCRIPTION"
# configure PolicyKit in live session
mkdir -p ${rootmnt}/etc/PolicyKit
cat << EOF > /root/etc/PolicyKit/PolicyKit.conf
mkdir -m0755 -p ${rootmnt}/etc/PolicyKit
cat << EOF > ${rootmnt}/etc/PolicyKit/PolicyKit.conf
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
@ -46,8 +46,8 @@ cat << EOF > /root/etc/PolicyKit/PolicyKit.conf
</config>
EOF
mkdir -p ${rootmnt}/var/lib/polkit-1/localauthority/10-vendor.d
cat << EOF > /root/var/lib/polkit-1/localauthority/10-vendor.d/10-live-cd.pkla
mkdir -m0750 -p ${rootmnt}/var/lib/polkit-1/localauthority/10-vendor.d
cat << EOF > ${rootmnt}/var/lib/polkit-1/localauthority/10-vendor.d/10-live-cd.pkla
# Policy to allow the livecd user to bypass policykit
[Live CD user permissions]
Identity=unix-user:$USERNAME

View File

@ -1,6 +1,6 @@
# Template file for 'xbps-casper'
pkgname=xbps-casper
_localver=0.21 # XBPS package version
_localver=0.22 # XBPS package version
_distver=1.236 # This should match the upstream (Ubuntu) version
version=${_localver}.${_distver}
short_desc="Run a live preinstalled system from read-only media"
@ -12,7 +12,6 @@ long_desc="
noextract=yes
noarch=yes
keep_empty_dirs=yes
conf_files="/etc/casper.conf"
Add_dependency full udev ">=174" # no path_id anymore

View File

@ -0,0 +1,59 @@
#!/bin/sh
#
# Creates or removes directories as specified by the make_dirs
# environment variable, as follows (relative to rootdir):
#
# dir mode uid gid
# blah 0755 0 0
#
# Arguments: $ACTION = [run/targets]
# $TARGET = [post-install/post-remove]
# $PKGNAME
# $VERSION
# $UPDATE = [yes/no]
#
ACTION="$1"
TARGET="$2"
PKGNAME="$3"
VERSION="$4"
UPDATE="$5"
export PATH="$PATH:/usr/local/bin"
case "$ACTION" in
targets)
echo "post-install post-remove"
;;
run)
[ -z "$make_dirs" ] && return 0
if [ "$TARGET" = "post-install" ]; then
# create directories
set -- ${make_dirs}
while [ $# -gt 0 ]; do
_dir="$1"; _mode="$2"; _uid="$3"; _gid="$4"
if [ ! -d ".${_dir}" ]; then
mkdir -m${_mode} -p ".${_dir}" && \
chown "${_uid}:${_gid}" ".${_dir}" ||
echo "Failed to create .${_dir}!"
fi
shift; shift; shift; shift
done
else
# remove directories
set -- ${make_dirs}
while [ $# -gt 0 ]; do
_dir="$1"
if [ -d ".${_dir}" ]; then
rmdir ".${_dir}" >/dev/null 2>&1
fi
shift; shift; shift; shift
done
fi
;;
*)
exit 1
;;
esac
exit 0

View File

@ -1,6 +1,6 @@
# Template file for 'xbps-triggers'
pkgname=xbps-triggers
version=0.25
version=0.26
short_desc="XBPS triggers"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://code.google.com/p/xbps"

View File

@ -99,12 +99,9 @@ install_src_phase()
find ${DESTDIR} -type f -name .packlist -delete
fi
# Remove empty directories by default.
if [ -z "$keep_empty_dirs" ]; then
msg_normal "$pkgver: removing empty dirs...\n"
find ${DESTDIR} -depth -type d -exec rmdir 2>/dev/null {} \;
fi
touch -f $XBPS_INSTALL_DONE
for f in $(find ${DESTDIR} -depth -type d); do
rmdir $f 2>/dev/null && msg_warn "removed empty dir: ${f##${DESTDIR}}\n"
done
#
# Build subpackages if found.
#
@ -127,12 +124,14 @@ install_src_phase()
set_tmpl_common_vars
if [ ! -f ${wrksrc}/.xbps_do_install_${pkgname}_done ]; then
run_func do_install
[ $? -eq 0 ] && \
if [ $? -eq 0 ]; then
touch -f ${wrksrc}/.xbps_do_install_${pkgname}_done
fi
else
msg_warn "$pkgver: skipping '$pkgname' subpkg, already installed into destdir.\n"
fi
done
touch -f $XBPS_INSTALL_DONE
}
[ -z "$PKG_TMPLNAME" ] && exit 2

View File

@ -53,7 +53,7 @@ install_pkg_from_repos()
tmplogf=$(mktemp)
tmpdepf=$(mktemp)
echo "'${1}'" > $tmpdepf
${cmd} $(cat $tmpdepf) >$tmplogf 2>&1
eval ${cmd} $(cat $tmpdepf) >$tmplogf 2>&1
rval=$?
rm -f $tmpdepf
if [ $rval -ne 0 -a $rval -ne 6 ]; then

View File

@ -59,7 +59,7 @@ binpkg_cleanup()
#
xbps_make_binpkg_real()
{
local mfiles binpkg pkgdir arch dirs _dirs d clevel
local mfiles binpkg pkgdir arch d clevel
if [ ! -d "${DESTDIR}" ]; then
msg_warn "cannot find destdir for $pkgname... skipping!\n"
@ -99,10 +99,14 @@ xbps_make_binpkg_real()
mfiles="./REMOVE"
fi
mfiles="$mfiles ./files.plist ./props.plist"
_dirs=$(find . -maxdepth 1 -type d -o -type l)
for d in ${_dirs}; do
[ "$d" = "." ] && continue
dirs="$d $dirs"
for d in $(find . -type f -o -type l); do
if [ "$d" = "./INSTALL" -o \
"$d" = "./REMOVE" -o \
"$d" = "./files.plist" -o \
"$d" = "./props.plist" ]; then
continue
fi
mfiles="$mfiles $d"
done
[ -n "$XBPS_COMPRESS_LEVEL" ] && clevel="-$XBPS_COMPRESS_LEVEL"
@ -113,7 +117,7 @@ xbps_make_binpkg_real()
msg_normal "Building $binpkg... "
${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} \
tar --exclude "var/db/xbps/metadata/*/flist" \
-cpf - ${mfiles} ${dirs} | \
-cpf - ${mfiles} | \
$XBPS_COMPRESS_CMD ${clevel} -qf > $pkgdir/$binpkg
rval=$?
trap - INT

View File

@ -44,11 +44,11 @@ xbps_write_metadata_pkg()
setup_tmpl ${sourcepkg}
unset run_depends conf_files noarch triggers replaces \
revision system_accounts system_groups \
preserve keep_empty_dirs xml_entries sgml_entries \
preserve xml_entries sgml_entries \
xml_catalogs sgml_catalogs gconf_entries gconf_schemas \
gtk_iconcache_dirs font_dirs dkms_modules provides \
kernel_hooks_version conflicts pycompile_dirs \
pycompile_module systemd_services
pycompile_module systemd_services make_dirs
. $XBPS_SRCPKGDIR/${sourcepkg}/${subpkg}.template
pkgname=${subpkg}
set_tmpl_common_vars
@ -313,6 +313,8 @@ _EOF
<string>$short_desc</string>
<key>long_desc</key>
<string>$long_desc</string>
<key>packaged-with</key>
<string>xbps-src $XBPS_SRC_BUILD_VERSION</string>
_EOF
#
# If package sets $dkms_modules, add dkms rundep.
@ -405,7 +407,7 @@ _EOF
echo "</plist>" >> $TMPFPROPS
if [ ! -d $metadir ]; then
mkdir -p $metadir >/dev/null 2>&1
mkdir -m0755 -p $metadir >/dev/null 2>&1
if [ $? -ne 0 ]; then
msg_red "you don't have enough perms for this!\n"
rm -f $TMPFLIST $TMPFPROPS

View File

@ -76,7 +76,6 @@ UPDATE="\$4"
# The following code will run the triggers.
#
_EOF
#
# Handle kernel hooks.
#
@ -84,15 +83,6 @@ _EOF
_add_trigger kernel-hooks
echo "export kernel_hooks_version=\"${kernel_hooks_version}\"" >> $tmpf
fi
#
# Handle systemd services.
#
if [ -n "${systemd_services}" ]; then
_add_trigger systemd-service
echo "export systemd_services=\"${systemd_services}\"" >> $tmpf
fi
#
# Handle DKMS modules.
#
@ -100,7 +90,6 @@ _EOF
_add_trigger dkms
echo "export dkms_modules=\"${dkms_modules}\"" >> $tmpf
fi
#
# Handle system groups.
#
@ -135,6 +124,20 @@ _EOF
done
fi
#
# Handle mkdirs trigger.
#
if [ -n "${make_dirs}" ]; then
_add_trigger mkdirs
echo "export make_dirs=\"${make_dirs}\"" >> $tmpf
fi
#
# Handle systemd services.
#
if [ -n "${systemd_services}" ]; then
_add_trigger systemd-service
echo "export systemd_services=\"${systemd_services}\"" >> $tmpf
fi
#
# Handle GNU Info files.
#
if [ -d "${DESTDIR}/usr/share/info" ]; then
@ -154,7 +157,6 @@ _EOF
echo "export info_files=\"${info_files}\"" >> $tmpf
fi
fi
#
# (Un)Register a shell in /etc/shells.
#
@ -162,7 +164,6 @@ _EOF
_add_trigger register-shell
echo "export register_shell=\"${register_shell}\"" >> $tmpf
fi
#
# Handle SGML/XML catalog entries via xmlcatmgr.
#
@ -185,7 +186,6 @@ _EOF
if [ -n "${sgml_entries}" -o -n "${xml_entries}" ]; then
_add_trigger xml-catalog
fi
#
# Handle X11 font updates via mkfontdir/mkfontscale.
#
@ -193,7 +193,6 @@ _EOF
_add_trigger x11-fonts
echo "export font_dirs=\"${font_dirs}\"" >> $tmpf
fi
#
# Handle GTK+ Icon cache directories.
#
@ -202,7 +201,6 @@ _EOF
echo "export gtk_iconcache_dirs=\"${gtk_iconcache_dirs}\"" \
>> $tmpf
fi
#
# Handle .desktop files in /usr/share/applications with
# desktop-file-utils.
@ -212,7 +210,6 @@ _EOF
_add_trigger update-desktopdb
fi
fi
#
# Handle GConf schemas/entries files with gconf-schemas.
#
@ -230,7 +227,6 @@ _EOF
>> $tmpf
fi
fi
#
# Handle gio-modules trigger.
#
@ -239,7 +235,6 @@ _EOF
_add_trigger gio-modules
fi
fi
#
# Handle gsettings schemas in /usr/share/glib-2.0/schemas with
# gsettings-schemas.
@ -249,7 +244,6 @@ _EOF
_add_trigger gsettings-schemas
fi
fi
#
# Handle mime database in /usr/share/mime with update-mime-database.
#
@ -258,7 +252,6 @@ _EOF
_add_trigger mimedb
fi
fi
#
# Handle python bytecode archives with pycompile trigger.
#

View File

@ -90,7 +90,7 @@ reset_tmpl_vars()
local TMPL_VARS="pkgname distfiles configure_args strip_cmd \
make_build_args make_install_args build_style \
short_desc maintainer long_desc checksum wrksrc \
make_cmd bootstrap register_shell keep_empty_dirs \
make_cmd bootstrap register_shell \
make_build_target configure_script noextract nofetch \
build_depends nostrip nonfree \
make_install_target version revision patch_args \
@ -98,7 +98,7 @@ reset_tmpl_vars()
disable_parallel_build run_depends font_dirs preserve \
only_for_archs conf_files keep_libtool_archives \
noarch subpackages sourcepkg gtk_iconcache_dirs \
abi_depends api_depends triggers \
abi_depends api_depends triggers make_dirs \
replaces system_accounts system_groups provides \
build_wrksrc create_wrksrc broken_as_needed pkgver \
ignore_vdeps_dir noverifyrdeps conflicts dkms_modules \

View File

@ -23,7 +23,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#-
readonly XBPS_SRC_BUILD_VERSION=20111109
XBPS_CONFIG_FILE=@@XBPS_INSTALL_ETCDIR@@/xbps-src.conf
PROGNAME=$(basename $0)
@ -227,7 +227,7 @@ check_config_vars()
#
# main()
#
while getopts "CBc:DhKm:p:Ss:" opt; do
while getopts "CBc:DhKm:p:Ss:V" opt; do
case $opt in
B) export BUILD_BINPKG=1;;
C) export KEEP_WRKSRC=1;;
@ -251,6 +251,7 @@ while getopts "CBc:DhKm:p:Ss:" opt; do
;;
S) UNSET_PREFER_BINPKG_DEPS=1;;
s) export XBPS_SRCDISTDIR="$OPTARG";;
V) echo $XBPS_SRC_BUILD_VERSION && exit 0;;
--) shift; break;;
esac
done