Commit 0580c30c authored by Alexander Larsson's avatar Alexander Larsson
Browse files

Convert /self to /app

parent cbdf648a
......@@ -10,7 +10,7 @@ XDG_APP_HELPER=`which xdg-app-helper 2> /dev/null`
LINUX_USER_CHROOT=`which linux-user-chroot 2> /dev/null`
declare -x LC_ALL=en_US.utf8
declare -x HOME=/self/packages
declare -x HOME=/app/packages
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
......@@ -28,20 +28,20 @@ unset PKG_CONFIG_PATH
unset PYTHONPATH
unset XDG_CONFIG_DIRS
unset XDG_DATA_DIRS
declare -x PATH="/usr/bin:/self/packages/bin"
declare -x PATH="/usr/bin:/app/packages/bin"
if test -d packages/.ccache; then
declare -x PATH="/self/packages/bin/ccache:$PATH"
declare -x PATH="/app/packages/bin/ccache:$PATH"
fi
echo "builduser:x:`id -u`:`id -u`:Build user:/self/packages:/sbin/nologin" >> $ROOT/usr/etc/passwd
echo "builduser:x:`id -u`:`id -u`:Build user:/app/packages:/sbin/nologin" >> $ROOT/usr/etc/passwd
echo "builduser:x:`id -g`:" >> $ROOT/usr/etc/group
rc=1
if test "x${XDG_APP_HELPER}" != "x"; then
$XDG_APP_HELPER -w -W -E -a $SRC -v $VAR $ROOT/usr env PATH="$PATH" /self/cd.sh "$@"
$XDG_APP_HELPER -w -W -E -a $SRC -v $VAR $ROOT/usr env PATH="$PATH" /app/cd.sh "$@"
rc=$?;
elif test "x${LINUX_USER_CHROOT}" != "x"; then
$LINUX_USER_CHROOT --unshare-ipc --unshare-pid --unshare-net --mount-bind /dev /dev --mount-proc /proc --mount-bind $ROOT/usr /usr --mount-bind $VAR /var --mount-bind $SRC /self --chdir /self $CHROOT "$@"
$LINUX_USER_CHROOT --unshare-ipc --unshare-pid --unshare-net --mount-bind /dev /dev --mount-proc /proc --mount-bind $ROOT/usr /usr --mount-bind $VAR /var --mount-bind $SRC /app --chdir /app $CHROOT "$@"
rc=$?;
else
echo "No containment helper found"
......
#!/bin/sh
cd /self
cd /app
exec "$@"
%_topdir /self/packages
%_srcrpmdir /self/packages/SRPMS
%_topdir /app/packages
%_srcrpmdir /app/packages/SRPMS
%_buildrootdir %{_topdir}/BUILDROOT
%_builddir %{_topdir}/BUILD_XXXXX
......
......@@ -3,10 +3,10 @@
<fontconfig>
<cachedir>/usr/cache/fontconfig</cachedir>
<dir>/self/share/fonts</dir>
<cachedir>/self/cache/fontconfig</cachedir>
<dir>/app/share/fonts</dir>
<cachedir>/app/cache/fontconfig</cachedir>
<include ignore_missing="yes">/self/etc/fonts/local.conf</include>
<include ignore_missing="yes">/app/etc/fonts/local.conf</include>
<dir>/run/host/fonts</dir>
</fontconfig>
%_prefix /self
%_prefix /app
%_exec_prefix %{_prefix}
%_bindir %{_exec_prefix}/bin
%_sbindir %{_exec_prefix}/sbin
......
......@@ -8,7 +8,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
# Yocto builds without the normal find-provides, we supply those provides in the gnome-platform-base package
Provides: %(./find_prov.sh /self/freedesktop-platform/usr)
Provides: %(./find_prov.sh /app/freedesktop-platform/usr)
%if %{__isa_bits} == 64
%define provides_suffix (64bit)
......
......@@ -86,12 +86,12 @@ Meta package for Gnome SDK dependencies
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
install -m 0644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros
mkdir -p $RPM_BUILD_ROOT%{_libdir}/debug
ln -s /self/lib/debug $RPM_BUILD_ROOT%{_libdir}/debug/self
ln -s /app/lib/debug $RPM_BUILD_ROOT%{_libdir}/debug/app
%files
%doc
%{_sysconfdir}/rpm/macros
%{_libdir}/debug/self
%{_libdir}/debug/app
%changelog
* Fri Nov 7 2014 Alexander Larsson <alexl@redhat.com>
......
......@@ -5,5 +5,5 @@ mkdir -p packages/RPMS/x86_64
./setup_root.sh $1
./build.sh smart channel -y --add mydb type=rpm-sys name="RPM Database"
./build.sh smart channel -y --add noarch type=rpm-dir name="RPM Database" path=/self/packages/RPMS/noarch
./build.sh smart channel -y --add x86_64 type=rpm-dir name="RPM Database" path=/self/packages/RPMS/x86_64/
./build.sh smart channel -y --add noarch type=rpm-dir name="RPM Database" path=/app/packages/RPMS/noarch
./build.sh smart channel -y --add x86_64 type=rpm-dir name="RPM Database" path=/app/packages/RPMS/x86_64/
......@@ -15,7 +15,7 @@ IMAGE=`readlink -f $1`
rm -rf $ROOT $VAR $CHROOT
mkdir -p $ROOT $VAR $CHROOT
mkdir -p $CHROOT/var $CHROOT/usr $CHROOT/tmp $CHROOT/self $CHROOT/proc $CHROOT/dev
mkdir -p $CHROOT/var $CHROOT/usr $CHROOT/tmp $CHROOT/app $CHROOT/proc $CHROOT/dev
ln -s usr/lib $CHROOT/lib
ln -s usr/bin $CHROOT/bin
ln -s usr/sbin $CHROOT/sbin
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment